aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/omap24xx/patches-3.3/309-omapfb-circular-mutex-workaround.patch
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2012-05-18 20:22:32 +0000
committerGabor Juhos <juhosg@openwrt.org>2012-05-18 20:22:32 +0000
commitbfdcb53577eff8fc744b81f0d4ee03bfba4e563d (patch)
treee47bafe43922f57ee5bba887328fcbe15b6fc6f6 /target/linux/omap24xx/patches-3.3/309-omapfb-circular-mutex-workaround.patch
parent020b9941036f4dd9fde62e9e3666b5e44704bb27 (diff)
downloadmaster-187ad058-bfdcb53577eff8fc744b81f0d4ee03bfba4e563d.tar.gz
master-187ad058-bfdcb53577eff8fc744b81f0d4ee03bfba4e563d.tar.bz2
master-187ad058-bfdcb53577eff8fc744b81f0d4ee03bfba4e563d.zip
omap24xx: add support for 3.3
Compile tested only. git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31810 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/omap24xx/patches-3.3/309-omapfb-circular-mutex-workaround.patch')
-rw-r--r--target/linux/omap24xx/patches-3.3/309-omapfb-circular-mutex-workaround.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/target/linux/omap24xx/patches-3.3/309-omapfb-circular-mutex-workaround.patch b/target/linux/omap24xx/patches-3.3/309-omapfb-circular-mutex-workaround.patch
new file mode 100644
index 0000000000..e5e083e241
--- /dev/null
+++ b/target/linux/omap24xx/patches-3.3/309-omapfb-circular-mutex-workaround.patch
@@ -0,0 +1,41 @@
+--- a/drivers/video/omap/omapfb_main.c
++++ b/drivers/video/omap/omapfb_main.c
+@@ -420,10 +420,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;
+@@ -933,10 +933,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();
+ }
+ }
+ }
+--- a/drivers/video/fbmem.c
++++ b/drivers/video/fbmem.c
+@@ -1383,8 +1383,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;