From a16456fc2b4d2d2d5c4484ea2dfd237bb7cba326 Mon Sep 17 00:00:00 2001 From: Siddhartha Agrawal Date: Mon, 26 Nov 2012 15:57:42 -0800 Subject: [PATCH] msm_fb: display: Send current timestamp in case of timeout On timeout while waiting for the vsync, send the current timestamp to the userspace. This resolves the infinite wait seen during the bootup. Change-Id: Ib1426c7c9a21c37758d7352740938627d4613fd6 Signed-off-by: Siddhartha Agrawal --- drivers/video/msm/mdp4_overlay_dsi_cmd.c | 2 +- drivers/video/msm/mdp4_overlay_dsi_video.c | 2 +- drivers/video/msm/mdp4_overlay_dtv.c | 2 +- drivers/video/msm/mdp4_overlay_lcdc.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/video/msm/mdp4_overlay_dsi_cmd.c b/drivers/video/msm/mdp4_overlay_dsi_cmd.c index 3044d363321..7c4cff89269 100644 --- a/drivers/video/msm/mdp4_overlay_dsi_cmd.c +++ b/drivers/video/msm/mdp4_overlay_dsi_cmd.c @@ -673,7 +673,7 @@ ssize_t mdp4_dsi_cmd_show_event(struct device *dev, msecs_to_jiffies(VSYNC_PERIOD * 4)); if (ret <= 0) { vctrl->wait_vsync_cnt = 0; - return -EBUSY; + vctrl->vsync_time = ktime_get(); } spin_lock_irqsave(&vctrl->spin_lock, flags); diff --git a/drivers/video/msm/mdp4_overlay_dsi_video.c b/drivers/video/msm/mdp4_overlay_dsi_video.c index bcb020351d5..f023bb1bc0b 100644 --- a/drivers/video/msm/mdp4_overlay_dsi_video.c +++ b/drivers/video/msm/mdp4_overlay_dsi_video.c @@ -399,7 +399,7 @@ ssize_t mdp4_dsi_video_show_event(struct device *dev, msecs_to_jiffies(VSYNC_PERIOD * 4)); if (ret <= 0) { vctrl->wait_vsync_cnt = 0; - return -EBUSY; + vctrl->vsync_time = ktime_get(); } spin_lock_irqsave(&vctrl->spin_lock, flags); diff --git a/drivers/video/msm/mdp4_overlay_dtv.c b/drivers/video/msm/mdp4_overlay_dtv.c index 33813d8c397..20e769ae750 100644 --- a/drivers/video/msm/mdp4_overlay_dtv.c +++ b/drivers/video/msm/mdp4_overlay_dtv.c @@ -342,7 +342,7 @@ ssize_t mdp4_dtv_show_event(struct device *dev, msecs_to_jiffies(VSYNC_PERIOD * 4)); if (ret <= 0) { vctrl->wait_vsync_cnt = 0; - return -EBUSY; + vctrl->vsync_time = ktime_get(); } spin_lock_irqsave(&vctrl->spin_lock, flags); diff --git a/drivers/video/msm/mdp4_overlay_lcdc.c b/drivers/video/msm/mdp4_overlay_lcdc.c index 192570bc213..c3b82314017 100644 --- a/drivers/video/msm/mdp4_overlay_lcdc.c +++ b/drivers/video/msm/mdp4_overlay_lcdc.c @@ -384,7 +384,7 @@ ssize_t mdp4_lcdc_show_event(struct device *dev, msecs_to_jiffies(VSYNC_PERIOD * 4)); if (ret <= 0) { vctrl->wait_vsync_cnt = 0; - return -EBUSY; + vctrl->vsync_time = ktime_get(); } spin_lock_irqsave(&vctrl->spin_lock, flags);