Root/target/linux/omap24xx/patches-3.3/309-omapfb-circular-mutex-workaround.patch

1--- a/drivers/video/omap/omapfb_main.c
2+++ b/drivers/video/omap/omapfb_main.c
3@@ -420,10 +420,10 @@ static void set_fb_fix(struct fb_info *f
4     fbi->screen_base = rg->vaddr;
5 
6     if (!from_init) {
7- mutex_lock(&fbi->mm_lock);
8+ preempt_disable();
9         fix->smem_start = rg->paddr;
10         fix->smem_len = rg->size;
11- mutex_unlock(&fbi->mm_lock);
12+ preempt_enable();
13     } else {
14         fix->smem_start = rg->paddr;
15         fix->smem_len = rg->size;
16@@ -933,10 +933,10 @@ static int omapfb_setup_mem(struct fb_in
17                  * plane memory is dealloce'd, the other
18                  * screen parameters in var / fix are invalid.
19                  */
20- mutex_lock(&fbi->mm_lock);
21+ preempt_disable();
22                 fbi->fix.smem_start = 0;
23                 fbi->fix.smem_len = 0;
24- mutex_unlock(&fbi->mm_lock);
25+ preempt_enable();
26             }
27         }
28     }
29--- a/drivers/video/fbmem.c
30+++ b/drivers/video/fbmem.c
31@@ -1383,8 +1383,10 @@ fb_mmap(struct file *file, struct vm_are
32     }
33 
34     /* frame buffer memory */
35+ preempt_disable();
36     start = info->fix.smem_start;
37     len = PAGE_ALIGN((start & ~PAGE_MASK) + info->fix.smem_len);
38+ preempt_enable();
39     if (off >= len) {
40         /* memory mapped io */
41         off -= len;
42

Archive Download this file



interactive