diff options
author | Donghan Ryu <dryu@nvidia.com> | 2011-07-27 06:34:18 +0900 |
---|---|---|
committer | Manish Tuteja <mtuteja@nvidia.com> | 2011-07-28 05:39:35 -0700 |
commit | 6437749423bc10de57eed1836a1a7c16dc139b20 (patch) | |
tree | 6c3fd143942401de8da0de0f5a0b9239a2dfb0f3 /drivers/video | |
parent | 0ad9d47423f4aaba7d90e1dbf0338de41690f428 (diff) |
video: tegra: dc: fix delay on hdmi modeset
wait_event_interruptible_timeout checks the condition before
it enters a sleep. Adding a real condition to the function
avoids an un-wanted aditional sleep.
Bug 833476
Reviewed-on: http://git-master/r/43225
Reviewed-on: http://git-master/r/43426
(cherry picked from commit 40a95f668b311b66212cf81638bb65f241835e98)
Change-Id: I46ebab6229d24d0977e1ce640bdec9611df621e7
Reviewed-on: http://git-master/r/43610
Reviewed-by: Donghan Ryu <dryu@nvidia.com>
Tested-by: Donghan Ryu <dryu@nvidia.com>
Reviewed-by: Jonathan Mayo <jmayo@nvidia.com>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/tegra/dc/nvhdcp.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/video/tegra/dc/nvhdcp.c b/drivers/video/tegra/dc/nvhdcp.c index 8f134e953425..c17b8f4d32c8 100644 --- a/drivers/video/tegra/dc/nvhdcp.c +++ b/drivers/video/tegra/dc/nvhdcp.c @@ -998,8 +998,8 @@ static void nvhdcp_downstream_worker(struct work_struct *work) goto failure; } mutex_unlock(&nvhdcp->lock); - wait_event_interruptible_timeout(wq_worker, 0, - msecs_to_jiffies(1500)); + wait_event_interruptible_timeout(wq_worker, + !nvhdcp_is_plugged(nvhdcp), msecs_to_jiffies(1500)); mutex_lock(&nvhdcp->lock); } @@ -1011,8 +1011,11 @@ failure: } else { nvhdcp_err("nvhdcp failure - renegotiating in 1.75 seconds\n"); mutex_unlock(&nvhdcp->lock); - msleep(1750); + wait_event_interruptible_timeout(wq_worker, + !nvhdcp_is_plugged(nvhdcp), msecs_to_jiffies(1750)); mutex_lock(&nvhdcp->lock); + if (!nvhdcp_is_plugged(nvhdcp)) + goto lost_hdmi; queue_work(nvhdcp->downstream_wq, &nvhdcp->work); } |