diff options
author | Matt Wagner <mwagner@nvidia.com> | 2013-05-21 17:50:34 -0700 |
---|---|---|
committer | Mandar Padmawar <mpadmawar@nvidia.com> | 2013-05-23 23:06:53 -0700 |
commit | ef8716389cbed56cba95dae87e50ef040c969892 (patch) | |
tree | 39865de5bfdb0c2a796045a5179f871ed57987eb | |
parent | 2a0feb217145d3bad31f87f9e68c795f97c17c87 (diff) |
HDCP: Only Wait for Communication to stop if HDMI is Plugged
Don't wait for communication to stop if HDMI isn't plugged
Bug 1275577
Change-Id: Ifb56bc8a4b36ac2cb40614811398920b7e293e04
Signed-off-by: Matt Wagner <mwagner@nvidia.com>
Reviewed-on: http://git-master/r/231350
(cherry picked from commit fc774f94ffa54b1a6ce1771ac82b82c3a1eea39f)
Reviewed-on: http://git-master/r/231692
Reviewed-by: Automatic_Commit_Validation_User
-rw-r--r-- | drivers/video/tegra/dc/nvhdcp.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/video/tegra/dc/nvhdcp.c b/drivers/video/tegra/dc/nvhdcp.c index 8c545c2bd513..af1f3fcdbc6f 100644 --- a/drivers/video/tegra/dc/nvhdcp.c +++ b/drivers/video/tegra/dc/nvhdcp.c @@ -1069,13 +1069,19 @@ static int tegra_nvhdcp_on(struct tegra_nvhdcp *nvhdcp) static int tegra_nvhdcp_off(struct tegra_nvhdcp *nvhdcp) { + bool plugged_at_start = nvhdcp_is_plugged(nvhdcp); + mutex_lock(&nvhdcp->lock); nvhdcp->state = STATE_OFF; nvhdcp_set_plugged(nvhdcp, false); mutex_unlock(&nvhdcp->lock); wake_up_interruptible(&wq_worker); flush_workqueue(nvhdcp->downstream_wq); - msleep(1000); + + /* wait for communication to halt */ + if (plugged_at_start) + msleep(1000); + return 0; } |