mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: <Hermes.Wu@ite.com.tw>
To: <dmitry.baryshkov@linaro.org>
Cc: <andrzej.hajda@intel.com>, <neil.armstrong@linaro.org>,
	<rfoss@kernel.org>, <Laurent.pinchart@ideasonboard.com>,
	<jonas@kwiboo.se>, <jernej.skrabec@gmail.com>,
	<maarten.lankhorst@linux.intel.com>, <mripard@kernel.org>,
	<tzimmermann@suse.de>, <airlied@gmail.com>, <simona@ffwll.ch>,
	<angelogioacchino.delregno@collabora.com>,
	<dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>,
	<Pet.Weng@ite.com.tw>, <Kenneth.Hung@ite.com.tw>,
	<treapking@chromium.org>
Subject: RE: [PATCH] drm/bridge: it6505: fix HDCP V match check is not performed correctly
Date: Thu, 9 Jan 2025 02:36:23 +0000	[thread overview]
Message-ID: <cb8f9927d2874ef29bdea3f16c4a9de1@ite.com.tw> (raw)
In-Reply-To: <lu2haon4sj3kvge6cowqgratgnoxg26kiwrjyjdgh7pt5v2hwi@v3xulffewwy6>

hi
>
>-----Original Message-----
>From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> 
>Sent: Wednesday, January 8, 2025 6:43 PM
>To: Hermes Wu (吳佳宏) <Hermes.Wu@ite.com.tw>
>Cc: Andrzej Hajda <andrzej.hajda@intel.com>; Neil Armstrong <neil.armstrong@linaro.org>; Robert Foss <rfoss@kernel.org>; Laurent Pinchart <Laurent.pinchart@ideasonboard.com>; Jonas Karlman <jonas@kwiboo.se>; Jernej Skrabec <jernej.skrabec@gmail.com>; Maarten Lankhorst <maarten.lankhorst@linux.intel.com>; Maxime Ripard <mripard@kernel.org>; Thomas Zimmermann <tzimmermann@suse.de>; David Airlie <airlied@gmail.com>; Simona Vetter <simona@ffwll.ch>; AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>; dri-devel@lists.freedesktop.org; linux-kernel@vger.kernel.org; Pet Weng (翁玉芬) <Pet.Weng@ite.com.tw>; Kenneth Hung (洪家倫) <Kenneth.Hung@ite.com.tw>; treapking@chromium.org
>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@ite.com.tw>
>> 
>> 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@ite.com.tw>
>
>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?  

>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@ite.com.tw>
>> 
>> 
>
>--
>With best wishes
>Dmitry
>

BR,
Hermes

  reply	other threads:[~2025-01-09  2:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-08  5:45 Hermes Wu via B4 Relay
2025-01-08 10:43 ` Dmitry Baryshkov
2025-01-09  2:36   ` Hermes.Wu [this message]
2025-01-09  3:56     ` Pin-yen Lin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cb8f9927d2874ef29bdea3f16c4a9de1@ite.com.tw \
    --to=hermes.wu@ite.com.tw \
    --cc=Kenneth.Hung@ite.com.tw \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=Pet.Weng@ite.com.tw \
    --cc=airlied@gmail.com \
    --cc=andrzej.hajda@intel.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=rfoss@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=treapking@chromium.org \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome