summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeongho Joo <sjoo@nvidia.com>2011-06-14 10:58:19 +0900
committerYuhao Ding <yding@nvidia.com>2011-06-14 13:59:54 -0700
commitd697392e32fa0c7f84a2bdb5554ffad6af5c8522 (patch)
tree9564aa9ba30fd5b055b376f0c06d0544ad9a815a
parent0ed502c214e7ca093e534420f9215cd65a68b0ee (diff)
video: tegra: dc: make hdcp respond quickly on HDMI modeset.
hdcp worker could be in sleep during modeset. The front part of the video could be lost because of it. This change makes hdcp respond quickly to shorten the delay. bug 826468 Reviewed-on: http://git-master/r/#change,35449 Change-Id: I4e0105b1bc5815b223810d23ca8595747e541ee6 Reviewed-on: http://git-master/r/36417 Tested-by: Seongho Joo <sjoo@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
-rw-r--r--drivers/video/tegra/dc/nvhdcp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/video/tegra/dc/nvhdcp.c b/drivers/video/tegra/dc/nvhdcp.c
index 69b8161119de..49c5c9bea46e 100644
--- a/drivers/video/tegra/dc/nvhdcp.c
+++ b/drivers/video/tegra/dc/nvhdcp.c
@@ -36,6 +36,8 @@
#include "hdmi_reg.h"
#include "hdmi.h"
+DECLARE_WAIT_QUEUE_HEAD(wq_worker);
+
/* for 0x40 Bcaps */
#define BCAPS_REPEATER (1 << 6)
#define BCAPS_READY (1 << 5)
@@ -996,7 +998,8 @@ static void nvhdcp_downstream_worker(struct work_struct *work)
goto failure;
}
mutex_unlock(&nvhdcp->lock);
- msleep(1500);
+ wait_event_interruptible_timeout(wq_worker, 0,
+ msecs_to_jiffies(1500));
mutex_lock(&nvhdcp->lock);
}
@@ -1038,6 +1041,7 @@ static int tegra_nvhdcp_off(struct tegra_nvhdcp *nvhdcp)
nvhdcp->state = STATE_OFF;
nvhdcp_set_plugged(nvhdcp, false);
mutex_unlock(&nvhdcp->lock);
+ wake_up_interruptible(&wq_worker);
flush_workqueue(nvhdcp->downstream_wq);
return 0;
}