osd: wait for vsync no need lock [1/1]
authorshuze.ma <shuze.ma@amlogic.com>
Thu, 19 Jul 2018 13:59:30 +0000 (21:59 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Fri, 10 Aug 2018 09:13:23 +0000 (02:13 -0700)
PD#170791

wait for vsync no need lock

Change-Id: I61f9090b03c3b1d6971265bd1aacf9740a6ce168
Signed-off-by: shuze.ma <shuze.ma@amlogic.com>
drivers/amlogic/media/osd/osd_fb.c

index 7fed76a..2e2cf92 100644 (file)
@@ -758,7 +758,13 @@ static int osd_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
                                sizeof(struct fb_sync_request_s));
                break;
        case FBIO_WAITFORVSYNC:
+               vsync_timestamp = (s32)osd_wait_vsync_event();
+               ret = copy_to_user(argp, &vsync_timestamp, sizeof(s32));
+               break;
        case FBIO_WAITFORVSYNC_64:
+               vsync_timestamp_64 = osd_wait_vsync_event();
+               ret = copy_to_user(argp, &vsync_timestamp_64, sizeof(s64));
+               break;
        case FBIOGET_OSD_SCALE_AXIS:
        case FBIOPUT_OSD_ORDER:
        case FBIOGET_OSD_ORDER:
@@ -1039,15 +1045,6 @@ static int osd_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
                        ? -EFAULT : 0;
                break;
 #endif
-
-       case FBIO_WAITFORVSYNC:
-               vsync_timestamp = (s32)osd_wait_vsync_event();
-               ret = copy_to_user(argp, &vsync_timestamp, sizeof(s32));
-               break;
-       case FBIO_WAITFORVSYNC_64:
-               vsync_timestamp_64 = osd_wait_vsync_event();
-               ret = copy_to_user(argp, &vsync_timestamp_64, sizeof(s64));
-               break;
        case FBIOPUT_OSD_CURSOR:
 #ifdef CONFIG_AMLOGIC_MEDIA_FB_OSD2_CURSOR
                osd_cursor(info, &cursor);