framebuffer: remove lock in fbmem ioctl. [1/1]
authorsky zhou <sky.zhou@amlogic.com>
Sat, 24 Nov 2018 13:56:30 +0000 (21:56 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Mon, 26 Nov 2018 07:54:58 +0000 (23:54 -0800)
PD#SWPL-2497

Problem:
on 32bit kernel, when user space call WAITFORVSYNC,
we cannot send other command to framebuffer.

Solution:
remove lock in fbioctl as fb compat_ioctl do.
Our driver have locks to protect internal resources.

Verify:
verified on franklin.

Change-Id: I1789c09a7ea459aed4b782748847687c7f974526
Signed-off-by: sky zhou <sky.zhou@amlogic.com>
drivers/video/fbdev/core/fbmem.c

index 76c1ad9..b342fa3 100644 (file)
@@ -1212,14 +1212,23 @@ static long do_fb_ioctl(struct fb_info *info, unsigned int cmd,
                console_unlock();
                break;
        default:
+               #ifndef CONFIG_AMLOGIC_MODIFY
+               /*
+                * display may have several command passed to fbdev
+                * at the same time. do as the compat ioctl,
+                * let hw driver to take care of lock.
+                */
                if (!lock_fb_info(info))
                        return -ENODEV;
+               #endif
                fb = info->fbops;
                if (fb->fb_ioctl)
                        ret = fb->fb_ioctl(info, cmd, arg);
                else
                        ret = -ENOTTY;
+               #ifndef CONFIG_AMLOGIC_MODIFY
                unlock_fb_info(info);
+               #endif
        }
        return ret;
 }