From 374968b424420234c93ddd8a86d67077f8af3444 Mon Sep 17 00:00:00 2001 From: Mark Yao Date: Mon, 17 Nov 2014 09:18:42 +0800 Subject: [PATCH] rk_fb: wait extend lcdc vsync before release fence before release fence, we should make sure extend lcdc config take effect. if not, maybe GPU would access the buffer which hdmi using, and cause tearing. Signed-off-by: Mark Yao --- drivers/video/rockchip/rk_fb.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/video/rockchip/rk_fb.c b/drivers/video/rockchip/rk_fb.c index 74b870c80beb..78ccdba29fff 100755 --- a/drivers/video/rockchip/rk_fb.c +++ b/drivers/video/rockchip/rk_fb.c @@ -1998,6 +1998,19 @@ ext_win_exit: timeout = wait_event_interruptible_timeout(dev_drv->vsync_info.wait, ktime_compare(dev_drv->vsync_info.timestamp, timestamp) > 0, msecs_to_jiffies(25)); + if ((rk_fb->disp_mode == DUAL) && + (hdmi_get_hotplug() == HDMI_HPD_ACTIVED) && + hdmi_switch_complete) { + /* + * If dual output, we need make sure the extend display + * cfg take effect before release fence. + */ + ext_dev_drv = rk_get_extend_lcdc_drv(); + timeout = wait_event_interruptible_timeout(ext_dev_drv->vsync_info.wait, + ktime_compare(ext_dev_drv->vsync_info.timestamp, timestamp) > 0, + msecs_to_jiffies(25)); + } + dev_drv->ops->get_dsp_addr(dev_drv, dsp_addr); wait_for_vsync = false; for (i = 0; i < dev_drv->lcdc_win_num; i++) { -- 2.34.1