Skip to content

Commit 0fd2ff4

Browse files
Hermes Wulumag
authored andcommitted
drm/bridge: it6505: fix HDCP Bstatus check
When HDCP is activated, a DisplayPort source receiving CP_IRQ from the sink shall check Bstatus from DPCD and process the corresponding value Reviewed-by: Dmitry Baryshkov <[email protected]> Signed-off-by: Hermes Wu <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Signed-off-by: Dmitry Baryshkov <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/20241230-v7-upstream-v7-5-e0fdd4844703@ite.corp-partner.google.com
1 parent 85597bc commit 0fd2ff4

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

drivers/gpu/drm/bridge/ite-it6505.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2323,14 +2323,20 @@ static int it6505_process_hpd_irq(struct it6505 *it6505)
23232323
DRM_DEV_DEBUG_DRIVER(dev, "dp_irq_vector = 0x%02x", dp_irq_vector);
23242324

23252325
if (dp_irq_vector & DP_CP_IRQ) {
2326-
it6505_set_bits(it6505, REG_HDCP_TRIGGER, HDCP_TRIGGER_CPIRQ,
2327-
HDCP_TRIGGER_CPIRQ);
2328-
23292326
bstatus = it6505_dpcd_read(it6505, DP_AUX_HDCP_BSTATUS);
23302327
if (bstatus < 0)
23312328
return bstatus;
23322329

23332330
DRM_DEV_DEBUG_DRIVER(dev, "Bstatus = 0x%02x", bstatus);
2331+
2332+
/*Check BSTATUS when recive CP_IRQ */
2333+
if (bstatus & DP_BSTATUS_R0_PRIME_READY &&
2334+
it6505->hdcp_status == HDCP_AUTH_GOING)
2335+
it6505_set_bits(it6505, REG_HDCP_TRIGGER, HDCP_TRIGGER_CPIRQ,
2336+
HDCP_TRIGGER_CPIRQ);
2337+
else if (bstatus & (DP_BSTATUS_REAUTH_REQ | DP_BSTATUS_LINK_FAILURE) &&
2338+
it6505->hdcp_status == HDCP_AUTH_DONE)
2339+
it6505_start_hdcp(it6505);
23342340
}
23352341

23362342
ret = drm_dp_dpcd_read_link_status(&it6505->aux, link_status);

0 commit comments

Comments
 (0)