161698ddd7c8a017d413913f34ecbbc2dcb216e4
[openwrt.git] / target / linux / omap24xx / patches-3.1 / 309-omapfb-circular-mutex-workaround.patch
1 Index: linux-3.1.1/drivers/video/omap/omapfb_main.c
2 ===================================================================
3 --- linux-3.1.1.orig/drivers/video/omap/omapfb_main.c 2011-11-11 21:19:27.000000000 +0100
4 +++ linux-3.1.1/drivers/video/omap/omapfb_main.c 2011-11-16 23:10:16.554325659 +0100
5 @@ -419,10 +419,10 @@ static void set_fb_fix(struct fb_info *f
6 fbi->screen_base = rg->vaddr;
7
8 if (!from_init) {
9 - mutex_lock(&fbi->mm_lock);
10 + preempt_disable();
11 fix->smem_start = rg->paddr;
12 fix->smem_len = rg->size;
13 - mutex_unlock(&fbi->mm_lock);
14 + preempt_enable();
15 } else {
16 fix->smem_start = rg->paddr;
17 fix->smem_len = rg->size;
18 @@ -932,10 +932,10 @@ static int omapfb_setup_mem(struct fb_in
19 * plane memory is dealloce'd, the other
20 * screen parameters in var / fix are invalid.
21 */
22 - mutex_lock(&fbi->mm_lock);
23 + preempt_disable();
24 fbi->fix.smem_start = 0;
25 fbi->fix.smem_len = 0;
26 - mutex_unlock(&fbi->mm_lock);
27 + preempt_enable();
28 }
29 }
30 }
31 Index: linux-3.1.1/drivers/video/fbmem.c
32 ===================================================================
33 --- linux-3.1.1.orig/drivers/video/fbmem.c 2011-11-11 21:19:27.000000000 +0100
34 +++ linux-3.1.1/drivers/video/fbmem.c 2011-11-16 23:20:56.055698968 +0100
35 @@ -1369,8 +1369,10 @@ fb_mmap(struct file *file, struct vm_are
36 }
37
38 /* frame buffer memory */
39 + preempt_disable();
40 start = info->fix.smem_start;
41 len = PAGE_ALIGN((start & ~PAGE_MASK) + info->fix.smem_len);
42 + preempt_enable();
43 if (off >= len) {
44 /* memory mapped io */
45 off -= len;
This page took 0.042162 seconds and 3 git commands to generate.