diff options
| author | Naseer Ahmed <naseer@codeaurora.org> | 2013-05-21 11:34:23 -0400 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 20:17:20 -0700 |
| commit | c855791a1bc86dc53ef87f57dc931d17d76531b4 (patch) | |
| tree | 13726a749d3d3029947ef0217243ab761a7696c7 | |
| parent | 7b679554c67300b156019c2e3420da382ff3be31 (diff) | |
msm: mdss: Do not time out for vsync reads
The userspace does a blocking read on the vsync node. However,
when the screen is idle the read returns after timeout waking up
the userspace thread. Remove the timeout so that the read blocks
until the vsync is updated.
Change-Id: Ieaa1c180d473256da14302875dfc0558d23123aa
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
| -rw-r--r-- | drivers/video/fbdev/msm/mdp3_ctrl.c | 10 | ||||
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_mdp_overlay.c | 12 |
2 files changed, 6 insertions, 16 deletions
diff --git a/drivers/video/fbdev/msm/mdp3_ctrl.c b/drivers/video/fbdev/msm/mdp3_ctrl.c index b5134a7bcdf7..037ab511b131 100644 --- a/drivers/video/fbdev/msm/mdp3_ctrl.c +++ b/drivers/video/fbdev/msm/mdp3_ctrl.c @@ -192,13 +192,9 @@ static ssize_t mdp3_vsync_show_event(struct device *dev, mdp3_session = (struct mdp3_session_data *)mfd->mdp.private1; - rc = wait_for_completion_interruptible_timeout( - &mdp3_session->vsync_comp, - msecs_to_jiffies(VSYNC_PERIOD * 5)); - if (rc <= 0) { - pr_warn("vsync wait on fb%d interrupted (%d)\n", - mfd->index, rc); - } + rc = wait_for_completion_interruptible(&mdp3_session->vsync_comp); + if (rc < 0) + return rc; spin_lock_irqsave(&mdp3_session->vsync_lock, flag); vsync_ticks = ktime_to_ns(mdp3_session->vsync_time); diff --git a/drivers/video/fbdev/msm/mdss_mdp_overlay.c b/drivers/video/fbdev/msm/mdss_mdp_overlay.c index c96464a2dcaf..4a03e13d3da8 100644 --- a/drivers/video/fbdev/msm/mdss_mdp_overlay.c +++ b/drivers/video/fbdev/msm/mdss_mdp_overlay.c @@ -1286,20 +1286,14 @@ static ssize_t mdss_mdp_vsync_show_event(struct device *dev, struct mdss_overlay_private *mdp5_data = mfd_to_mdp5_data(mfd); unsigned long flags; u64 vsync_ticks; - unsigned long timeout; int ret; if (!mdp5_data->ctl || !mdp5_data->ctl->power_on) return 0; - timeout = msecs_to_jiffies(VSYNC_PERIOD * 5); - ret = wait_for_completion_interruptible_timeout(&mdp5_data->vsync_comp, - timeout); - if (ret <= 0) { - pr_debug("Sending current time as vsync timestamp for fb%d\n", - mfd->index); - mdp5_data->vsync_time = ktime_get(); - } + ret = wait_for_completion_interruptible(&mdp5_data->vsync_comp); + if (ret < 0) + return ret; spin_lock_irqsave(&mdp5_data->vsync_lock, flags); vsync_ticks = ktime_to_ns(mdp5_data->vsync_time); |
