Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/bridge: it6505: fix HDCP V match check is not performed correctly

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

authored by

Hermes Wu and committed by
Robert Foss
a5072fc7 93c7dd1b

+4 -3
+4 -3
drivers/gpu/drm/bridge/ite-it6505.c
··· 2250 2250 continue; 2251 2251 } 2252 2252 2253 - for (i = 0; i < 5; i++) { 2253 + for (i = 0; i < 5; i++) 2254 2254 if (bv[i][3] != av[i][0] || bv[i][2] != av[i][1] || 2255 - av[i][1] != av[i][2] || bv[i][0] != av[i][3]) 2255 + bv[i][1] != av[i][2] || bv[i][0] != av[i][3]) 2256 2256 break; 2257 2257 2258 - DRM_DEV_DEBUG_DRIVER(dev, "V' all match!! %d, %d", retry, i); 2258 + if (i == 5) { 2259 + DRM_DEV_DEBUG_DRIVER(dev, "V' all match!! %d", retry); 2259 2260 return true; 2260 2261 } 2261 2262 }