summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev
diff options
context:
space:
mode:
authorAravind Venkateswaran <aravindh@codeaurora.org>2017-07-14 21:40:02 -0700
committerAravind Venkateswaran <aravindh@codeaurora.org>2017-07-14 21:46:34 -0700
commit8832c1bcedeb429d072639cc45c5c89ee7910189 (patch)
tree9ef2f3b4f2c252ba7a9189a0113e9caba8ff2e7f /drivers/video/fbdev
parentd9fbe4b9210bcf0b7553d224f1c7390c15b91022 (diff)
msm: mdss: hdcp2p2: fix check for sink support for HDCP 2.x
Current implementation only checks if the sink is HDCP capable. In addition, it is required that the source also checks for the HDCP version supported by the sink prior to initiating HDCP 2.x authentication sequence. CRs-Fixed: 2062951 Change-Id: I24901202a0abc2ff4336ab9c6c2fd708a53559f2 Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Diffstat (limited to 'drivers/video/fbdev')
-rw-r--r--drivers/video/fbdev/msm/mdss_dp_hdcp2p2.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/video/fbdev/msm/mdss_dp_hdcp2p2.c b/drivers/video/fbdev/msm/mdss_dp_hdcp2p2.c
index 5a677dfe7484..36a062dc5207 100644
--- a/drivers/video/fbdev/msm/mdss_dp_hdcp2p2.c
+++ b/drivers/video/fbdev/msm/mdss_dp_hdcp2p2.c
@@ -894,22 +894,24 @@ static bool dp_hdcp2p2_supported(struct dp_hdcp2p2_ctrl *ctrl)
{
struct edp_cmd cmd = {0};
const u32 offset = 0x6921d;
- u8 buf;
+ u8 buf[3];
cmd.read = 1;
cmd.addr = offset;
- cmd.len = sizeof(buf);
- cmd.out_buf = &buf;
+ cmd.len = ARRAY_SIZE(buf);
+ cmd.out_buf = buf;
if (dp_aux_read(ctrl->init_data.cb_data, &cmd)) {
pr_err("RxCaps read failed\n");
goto error;
}
- pr_debug("rxcaps 0x%x\n", buf);
+ pr_debug("HDCP_CAPABLE=%lu\n", (buf[2] & BIT(1)) >> 1);
+ pr_debug("VERSION=%d\n", buf[0]);
- if (buf & BIT(1))
+ if ((buf[2] & BIT(1)) && (buf[0] == 0x2))
return true;
+
error:
return false;
}