Skip to content

Commit dd8e644

Browse files
Hermes Wugregkh
authored andcommitted
drm/bridge: it6505: fix HDCP V match check is not performed correctly
[ Upstream commit a5072fc ] Fix a typo where V compare incorrectly compares av[] with av[] itself, which can result in HDCP failure. The loop of V compare is expected to iterate for 5 times which compare V array form av[0][] to av[4][]. It should check loop counter reach the last statement "i == 5" before return true Fixes: 0989c02 ("drm/bridge: it6505: fix HDCP CTS compare V matching") Signed-off-by: Hermes Wu <Hermes.wu@ite.com.tw> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Signed-off-by: Robert Foss <rfoss@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20250121-fix-hdcp-v-comp-v4-1-185f45c728dc@ite.com.tw Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 69e90c1 commit dd8e644

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2042,12 +2042,13 @@ static bool it6505_hdcp_part2_ksvlist_check(struct it6505 *it6505)
20422042
continue;
20432043
}
20442044

2045-
for (i = 0; i < 5; i++) {
2045+
for (i = 0; i < 5; i++)
20462046
if (bv[i][3] != av[i][0] || bv[i][2] != av[i][1] ||
2047-
av[i][1] != av[i][2] || bv[i][0] != av[i][3])
2047+
bv[i][1] != av[i][2] || bv[i][0] != av[i][3])
20482048
break;
20492049

2050-
DRM_DEV_DEBUG_DRIVER(dev, "V' all match!! %d, %d", retry, i);
2050+
if (i == 5) {
2051+
DRM_DEV_DEBUG_DRIVER(dev, "V' all match!! %d", retry);
20512052
return true;
20522053
}
20532054
}

0 commit comments

Comments
 (0)