osd: don't call osd_wait_vsync_event during HW decoded video playback

This commit is contained in:
Arthur Liberman
2019-04-09 01:03:16 +03:00
committed by Dongjin Kim
parent 2617009f5a
commit 99903b4df9

View File

@@ -53,6 +53,9 @@
#ifdef CONFIG_INSTABOOT
#include <linux/amlogic/instaboot/instaboot.h>
#endif
#ifdef CONFIG_AMLOGIC_VPU
#include <linux/amlogic/media/vpu/vpu.h>
#endif
/* Local Headers */
#include "osd.h"
#include "osd_fb.h"
@@ -849,12 +852,19 @@ static int osd_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
ret = copy_from_user(&sync_request, argp,
sizeof(struct fb_sync_request_s));
break;
// Only wait for vsync when not HW decoding.
case FBIO_WAITFORVSYNC:
vsync_timestamp = (s32)osd_wait_vsync_event();
if (get_vpu_mem_pd_vmod(VPU_VIU_VD1))
vsync_timestamp = (s32)osd_wait_vsync_event();
else
vsync_timestamp = 0;
ret = copy_to_user(argp, &vsync_timestamp, sizeof(s32));
break;
case FBIO_WAITFORVSYNC_64:
vsync_timestamp_64 = osd_wait_vsync_event();
if (get_vpu_mem_pd_vmod(VPU_VIU_VD1))
vsync_timestamp_64 = osd_wait_vsync_event();
else
vsync_timestamp_64 = 0;
ret = copy_to_user(argp, &vsync_timestamp_64, sizeof(s64));
break;
case FBIOGET_OSD_SCALE_AXIS: