Re: [PATCH] drm/bridge: it6505: fix HDCP V match check is not performed correctly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Hermes,

On Thu, Jan 9, 2025 at 10:36 AM <Hermes.Wu@xxxxxxxxxx> wrote:
>
> hi
> >
> >-----Original Message-----
> >From: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx>
> >Sent: Wednesday, January 8, 2025 6:43 PM
> >To: Hermes Wu (吳佳宏) <Hermes.Wu@xxxxxxxxxx>
> >Cc: Andrzej Hajda <andrzej.hajda@xxxxxxxxx>; Neil Armstrong <neil.armstrong@xxxxxxxxxx>; Robert Foss <rfoss@xxxxxxxxxx>; Laurent Pinchart <Laurent.pinchart@xxxxxxxxxxxxxxxx>; Jonas Karlman <jonas@xxxxxxxxx>; Jernej Skrabec <jernej.skrabec@xxxxxxxxx>; Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>; Maxime Ripard <mripard@xxxxxxxxxx>; Thomas Zimmermann <tzimmermann@xxxxxxx>; David Airlie <airlied@xxxxxxxxx>; Simona Vetter <simona@xxxxxxxx>; AngeloGioacchino Del Regno <angelogioacchino.delregno@xxxxxxxxxxxxx>; dri-devel@xxxxxxxxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; Pet Weng (翁玉芬) <Pet.Weng@xxxxxxxxxx>; Kenneth Hung (洪家倫) <Kenneth.Hung@xxxxxxxxxx>; treapking@xxxxxxxxxxxx
> >Subject: Re: [PATCH] drm/bridge: it6505: fix HDCP V match check is not performed correctly
> >
> >On Wed, Jan 08, 2025 at 01:45:14PM +0800, Hermes Wu via B4 Relay wrote:
> >> From: Hermes Wu <Hermes.wu@xxxxxxxxxx>
> >>
> >> 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 before return
> >> true
> >>
> >> Fixes: 0989c02c7a5c ("drm/bridge: it6505: fix HDCP CTS compare V
> >> matching")
> >>
> >> Signed-off-by: Hermes Wu <Hermes.wu@xxxxxxxxxx>
> >
> >No empty lines between tags, please.
> >
> >> ---
> >>  drivers/gpu/drm/bridge/ite-it6505.c | 9 ++++++---
> >>  1 file changed, 6 insertions(+), 3 deletions(-)
> >>
> >> diff --git a/drivers/gpu/drm/bridge/ite-it6505.c
> >> b/drivers/gpu/drm/bridge/ite-it6505.c
> >> index
> >> 88ef76a37fe6accacdd343839ff2569b31b18ceb..e87247aea1d2ffbdad192e241056
> >> d34fdfb32163 100644
> >> --- a/drivers/gpu/drm/bridge/ite-it6505.c
> >> +++ b/drivers/gpu/drm/bridge/ite-it6505.c
> >> @@ -2254,9 +2254,12 @@ static bool it6505_hdcp_part2_ksvlist_check(struct it6505 *it6505)
> >>                      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])
> >>                              break;
> >> -
> >> -                    DRM_DEV_DEBUG_DRIVER(dev, "V' all match!! %d, %d", retry, i);
> >> -                    return true;
> >> +                    if (i == 4) {
> >
> >I think there was a similar patch yesteday.
>
> I can't find patch for it6505, would you provide link?
> If it also fixes this bug, should I just drop this patch?

I believe Dmitry is referring to
https://lore.kernel.org/all/20250107110740.42892-1-dheeraj.linuxdev@xxxxxxxxx/

You can upload a v2 for this and CC Dheeraj on your next patch.
>
> >Anyway, I have exactly the same feedback: please pull this out of the loop, this is how it's usually checked / done.
> >
> I will move it out the loop,
>
> Thanks.
>
> >> +                            DRM_DEV_DEBUG_DRIVER(dev,
> >> +                                                 "V' all match!! %d",
> >> +                                                 retry);
> >> +                            return true;
> >> +                    }
> >>              }
> >>      }
> >>
> >>
> >> ---
> >> base-commit: 938fbb16aba8f7b88e0fdcf56f315a5bbad41aad
> >> change-id: 20250107-fix-hdcp-v-comp-3ba8e3d7adf3
> >>
> >> Best regards,
> >> --
> >> Hermes Wu <Hermes.wu@xxxxxxxxxx>
> >>
> >>
> >
> >--
> >With best wishes
> >Dmitry
> >
>
> BR,
> Hermes

Regards,
Pin-yen




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux