From: sky zhou Date: Sat, 24 Nov 2018 13:56:30 +0000 (+0800) Subject: framebuffer: remove lock in fbmem ioctl. [1/1] X-Git-Tag: hardkernel-4.9.236-104~2175 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d4935088286d45d025cab4987b3a3e17478f1657;p=platform%2Fkernel%2Flinux-amlogic.git framebuffer: remove lock in fbmem ioctl. [1/1] 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 --- diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c index 76c1ad9..b342fa3 100644 --- a/drivers/video/fbdev/core/fbmem.c +++ b/drivers/video/fbdev/core/fbmem.c @@ -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; }