summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorHermes Wu <Hermes.wu@ite.com.tw>2025-01-21 15:01:51 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-04-10 14:33:32 +0200
commite713b514d2709249e8d6a573f07c2b0081804b94 (patch)
tree1ab6a5e02ae4a042f42a515c287ba7f1da921b04 /drivers
parent21daa13f7b643228703b56d029064ed72c04f116 (diff)
downloadlinux-e713b514d2709249e8d6a573f07c2b0081804b94.tar.gz
linux-e713b514d2709249e8d6a573f07c2b0081804b94.tar.bz2
linux-e713b514d2709249e8d6a573f07c2b0081804b94.zip
drm/bridge: it6505: fix HDCP V match check is not performed correctly
[ Upstream commit a5072fc77fb9e38fa9fd883642c83c3720049159 ] 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: 0989c02c7a5c ("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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/bridge/ite-it6505.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/drm/bridge/ite-it6505.c b/drivers/gpu/drm/bridge/ite-it6505.c
index 7c3bd539655b..cc2bf9c14373 100644
--- a/drivers/gpu/drm/bridge/ite-it6505.c
+++ b/drivers/gpu/drm/bridge/ite-it6505.c
@@ -2030,12 +2030,13 @@ static bool it6505_hdcp_part2_ksvlist_check(struct it6505 *it6505)
continue;
}
- for (i = 0; i < 5; i++) {
+ for (i = 0; i < 5; i++)
if (bv[i][3] != av[i][0] || bv[i][2] != av[i][1] ||
- av[i][1] != av[i][2] || bv[i][0] != av[i][3])
+ bv[i][1] != av[i][2] || bv[i][0] != av[i][3])
break;
- DRM_DEV_DEBUG_DRIVER(dev, "V' all match!! %d, %d", retry, i);
+ if (i == 5) {
+ DRM_DEV_DEBUG_DRIVER(dev, "V' all match!! %d", retry);
return true;
}
}