summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Zu <pzu@nvidia.com>2011-05-27 23:13:15 -0700
committerRohan Somvanshi <rsomvanshi@nvidia.com>2011-06-16 06:11:30 -0700
commitae5cbd7bd05d46ac11169b32345d3937bc4b3717 (patch)
tree2c168b8c762f822b487e43145fc7a022731cbdae
parent14e0e21a7357722b8be6bba191665e3ead17dd11 (diff)
video: tegra: dc: fix ksv_list query sequence and timeout handling
- remove delay on i2c r/w success to fix hdcp test case 1b-03 failure - do not turn on hdcp crypt before verifying repeater bug 829599 (cherry picked from commit 44aa4eac6285e1b95865cc79b345999b1d3eab55) Change-Id: I51ac55bf619821aa7af948799330ee11661bb6b7 Reviewed-on: http://git-master/r/36639 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
-rw-r--r--drivers/video/tegra/dc/nvhdcp.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/video/tegra/dc/nvhdcp.c b/drivers/video/tegra/dc/nvhdcp.c
index 49c5c9bea46e..49bd189d9615 100644
--- a/drivers/video/tegra/dc/nvhdcp.c
+++ b/drivers/video/tegra/dc/nvhdcp.c
@@ -142,7 +142,7 @@ static int nvhdcp_i2c_read(struct tegra_nvhdcp *nvhdcp, u8 reg,
}
status = i2c_transfer(nvhdcp->client->adapter,
msg, ARRAY_SIZE(msg));
- if (retries > 1)
+ if ((status < 0) && (retries > 1))
msleep(250);
} while ((status < 0) && retries--);
@@ -179,7 +179,7 @@ static int nvhdcp_i2c_write(struct tegra_nvhdcp *nvhdcp, u8 reg,
}
status = i2c_transfer(nvhdcp->client->adapter,
msg, ARRAY_SIZE(msg));
- if (retries > 1)
+ if ((status < 0) && (retries > 1))
msleep(250);
} while ((status < 0) && retries--);
@@ -965,14 +965,6 @@ static void nvhdcp_downstream_worker(struct work_struct *work)
goto failure;
}
- tmp = tegra_hdmi_readl(hdmi, HDMI_NV_PDISP_RG_HDCP_CTRL);
- tmp |= CRYPT_ENABLED;
- if (b_caps & BCAPS_11) /* HDCP 1.1 ? */
- tmp |= ONEONE_ENABLED;
- tegra_hdmi_writel(hdmi, tmp, HDMI_NV_PDISP_RG_HDCP_CTRL);
-
- nvhdcp_vdbg("CRYPT enabled\n");
-
/* if repeater then get repeater info */
if (b_caps & BCAPS_REPEATER) {
e = get_repeater_info(nvhdcp);
@@ -982,6 +974,14 @@ static void nvhdcp_downstream_worker(struct work_struct *work)
}
}
+ tmp = tegra_hdmi_readl(hdmi, HDMI_NV_PDISP_RG_HDCP_CTRL);
+ tmp |= CRYPT_ENABLED;
+ if (b_caps & BCAPS_11) /* HDCP 1.1 ? */
+ tmp |= ONEONE_ENABLED;
+ tegra_hdmi_writel(hdmi, tmp, HDMI_NV_PDISP_RG_HDCP_CTRL);
+
+ nvhdcp_vdbg("CRYPT enabled\n");
+
nvhdcp->state = STATE_LINK_VERIFY;
nvhdcp_info("link verified!\n");