aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/omap24xx
diff options
context:
space:
mode:
authorMichael Büsch <mb@bu3sch.de>2011-11-16 22:34:38 +0000
committerMichael Büsch <mb@bu3sch.de>2011-11-16 22:34:38 +0000
commit46a5094e4e12d607754b2943fdefa58037205db1 (patch)
tree4f4cd09757d0ed730d3cdde6ba1d9cff4491ca10 /target/linux/omap24xx
parent354c5772ba9095e38595d721fdae4800b9b720dc (diff)
downloadupstream-46a5094e4e12d607754b2943fdefa58037205db1.tar.gz
upstream-46a5094e4e12d607754b2943fdefa58037205db1.tar.bz2
upstream-46a5094e4e12d607754b2943fdefa58037205db1.zip
omap24xx: Add workaround for omapfb locking bug.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29201 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/omap24xx')
-rw-r--r--target/linux/omap24xx/patches-3.1/309-omapfb-circular-mutex-workaround.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/target/linux/omap24xx/patches-3.1/309-omapfb-circular-mutex-workaround.patch b/target/linux/omap24xx/patches-3.1/309-omapfb-circular-mutex-workaround.patch
new file mode 100644
index 0000000000..161698ddd7
--- /dev/null
+++ b/target/linux/omap24xx/patches-3.1/309-omapfb-circular-mutex-workaround.patch
@@ -0,0 +1,45 @@
+Index: linux-3.1.1/drivers/video/omap/omapfb_main.c
+===================================================================
+--- linux-3.1.1.orig/drivers/video/omap/omapfb_main.c 2011-11-11 21:19:27.000000000 +0100
++++ linux-3.1.1/drivers/video/omap/omapfb_main.c 2011-11-16 23:10:16.554325659 +0100
+@@ -419,10 +419,10 @@ static void set_fb_fix(struct fb_info *f
+ fbi->screen_base = rg->vaddr;
+
+ if (!from_init) {
+- mutex_lock(&fbi->mm_lock);
++ preempt_disable();
+ fix->smem_start = rg->paddr;
+ fix->smem_len = rg->size;
+- mutex_unlock(&fbi->mm_lock);
++ preempt_enable();
+ } else {
+ fix->smem_start = rg->paddr;
+ fix->smem_len = rg->size;
+@@ -932,10 +932,10 @@ static int omapfb_setup_mem(struct fb_in
+ * plane memory is dealloce'd, the other
+ * screen parameters in var / fix are invalid.
+ */
+- mutex_lock(&fbi->mm_lock);
++ preempt_disable();
+ fbi->fix.smem_start = 0;
+ fbi->fix.smem_len = 0;
+- mutex_unlock(&fbi->mm_lock);
++ preempt_enable();
+ }
+ }
+ }
+Index: linux-3.1.1/drivers/video/fbmem.c
+===================================================================
+--- linux-3.1.1.orig/drivers/video/fbmem.c 2011-11-11 21:19:27.000000000 +0100
++++ linux-3.1.1/drivers/video/fbmem.c 2011-11-16 23:20:56.055698968 +0100
+@@ -1369,8 +1369,10 @@ fb_mmap(struct file *file, struct vm_are
+ }
+
+ /* frame buffer memory */
++ preempt_disable();
+ start = info->fix.smem_start;
+ len = PAGE_ALIGN((start & ~PAGE_MASK) + info->fix.smem_len);
++ preempt_enable();
+ if (off >= len) {
+ /* memory mapped io */
+ off -= len;