From: Arthur Liberman Date: Mon, 8 Apr 2019 22:03:16 +0000 (+0300) Subject: osd: don't call osd_wait_vsync_event during HW decoded video playback X-Git-Tag: khadas-vims-v0.9.6-release~585 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4802d809fbfe99b033815ff08eaa3e89f9e445d9;p=platform%2Fkernel%2Flinux-amlogic.git osd: don't call osd_wait_vsync_event during HW decoded video playback --- diff --git a/drivers/amlogic/media/osd/osd_fb.c b/drivers/amlogic/media/osd/osd_fb.c index 9b17748..c4bcbb3 100644 --- a/drivers/amlogic/media/osd/osd_fb.c +++ b/drivers/amlogic/media/osd/osd_fb.c @@ -53,6 +53,9 @@ #ifdef CONFIG_INSTABOOT #include #endif +#ifdef CONFIG_AMLOGIC_VPU +#include +#endif /* Local Headers */ #include "osd.h" #include "osd_fb.h" @@ -786,12 +789,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: