summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Mayo <jmayo@nvidia.com>2011-04-06 13:20:15 -0700
committerErik Gilling <konkers@android.com>2011-04-07 16:48:57 -0700
commit98ed9cb6c4bc11a844edfb5d993568cbf77fe737 (patch)
treefc8f00ffa3a28177a7e13558ca84507465af85a1
parent237d326d61bbda05e90dd531d2057efe365db498 (diff)
video: tegra: reset hdcp failure count on hotplug
use tegra_nvhdcp_on/tegra_nvhdcp_off in hotplug handler to clean up state machine. Change-Id: I62fe503f0628ad4b49d5d7d66fe1702122179877 Signed-off-by: Erik Gilling <konkers@android.com>
-rw-r--r--drivers/video/tegra/dc/nvhdcp.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/drivers/video/tegra/dc/nvhdcp.c b/drivers/video/tegra/dc/nvhdcp.c
index 2229c6b93ad3..faa15c6081fc 100644
--- a/drivers/video/tegra/dc/nvhdcp.c
+++ b/drivers/video/tegra/dc/nvhdcp.c
@@ -1016,20 +1016,6 @@ err:
return;
}
-void tegra_nvhdcp_set_plug(struct tegra_nvhdcp *nvhdcp, bool hpd)
-{
- nvhdcp_debug("hdmi hotplug detected (hpd = %d)\n", hpd);
-
- nvhdcp_set_plugged(nvhdcp, hpd);
-
- if (hpd) {
- nvhdcp->fail_count = 0;
- queue_work(nvhdcp->downstream_wq, &nvhdcp->work);
- } else {
- flush_workqueue(nvhdcp->downstream_wq);
- }
-}
-
static int tegra_nvhdcp_on(struct tegra_nvhdcp *nvhdcp)
{
nvhdcp->state = STATE_UNAUTHENTICATED;
@@ -1050,6 +1036,18 @@ static int tegra_nvhdcp_off(struct tegra_nvhdcp *nvhdcp)
return 0;
}
+void tegra_nvhdcp_set_plug(struct tegra_nvhdcp *nvhdcp, bool hpd)
+{
+ nvhdcp_debug("hdmi hotplug detected (hpd = %d)\n", hpd);
+
+ if (hpd) {
+ nvhdcp_set_plugged(nvhdcp, true);
+ tegra_nvhdcp_on(nvhdcp);
+ } else {
+ tegra_nvhdcp_off(nvhdcp);
+ }
+}
+
int tegra_nvhdcp_set_policy(struct tegra_nvhdcp *nvhdcp, int pol)
{
if (pol == TEGRA_NVHDCP_POLICY_ALWAYS_ON) {