diff mbox series

[v4,05/11] drm/bridge: it6505: increase supports of HDCP repeater ksv devices

Message ID 20240926075018.22328-1-Hermes.Wu@ite.com.tw (mailing list archive)
State New, archived
Headers show
Series fix HDCP CTS fail items and add MCCS support | expand

Commit Message

Hermes Wu Sept. 26, 2024, 7:50 a.m. UTC
From: Hermes Wu <Hermes.wu@ite.com.tw>

A HDCP source shall support max downstream device to 127.

Change definition of MAX_HDCP_DOWN_STREAM_COUNT to 127

Fixes: b5c84a9edcd4 ("drm/bridge: add it6505 driver")
Signed-off-by: Hermes Wu <Hermes.wu@ite.com.tw>
---
 drivers/gpu/drm/bridge/ite-it6505.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Dmitry Baryshkov Sept. 26, 2024, 8:07 a.m. UTC | #1
On Thu, Sep 26, 2024 at 03:50:14PM GMT, Hermes Wu wrote:
> From: Hermes Wu <Hermes.wu@ite.com.tw>
> 
> A HDCP source shall support max downstream device to 127.
> 
> Change definition of MAX_HDCP_DOWN_STREAM_COUNT to 127

This results in struct it6505 growth by ~0.5 KiB. Please mention it in
the commit message.

Is it really required to have sha1_input in the constantly allocated
structure? I think it's a temporary data, which isn't necessary after
processing.

> 
> Fixes: b5c84a9edcd4 ("drm/bridge: add it6505 driver")
> Signed-off-by: Hermes Wu <Hermes.wu@ite.com.tw>
> ---
>  drivers/gpu/drm/bridge/ite-it6505.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/bridge/ite-it6505.c b/drivers/gpu/drm/bridge/ite-it6505.c
> index d1f5220e04a6..5d5ce12cd054 100644
> --- a/drivers/gpu/drm/bridge/ite-it6505.c
> +++ b/drivers/gpu/drm/bridge/ite-it6505.c
> @@ -296,7 +296,7 @@
>  #define MAX_LANE_COUNT 4
>  #define MAX_LINK_RATE HBR
>  #define AUTO_TRAIN_RETRY 3
> -#define MAX_HDCP_DOWN_STREAM_COUNT 10
> +#define MAX_HDCP_DOWN_STREAM_COUNT 127
>  #define MAX_CR_LEVEL 0x03
>  #define MAX_EQ_LEVEL 0x03
>  #define AUX_WAIT_TIMEOUT_MS 15
> -- 
> 2.34.1
>
Hermes Wu Sept. 27, 2024, 2:18 a.m. UTC | #2
>
>-----Original Message-----
>From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> 
>Sent: Thursday, September 26, 2024 4:07 PM
>To: Hermes Wu (吳佳宏) <Hermes.Wu@ite.com.tw>
>Cc: Kenneth Hung (洪家倫) <Kenneth.Hung@ite.com.tw>; 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>; Allen Chen <allen.chen@ite.com.tw>; AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>; open list:DRM DRIVERS <dri-devel@lists.freedesktop.org>; open list <linux-kernel@vger.kernel.org>
>Subject: Re: [PATCH v4 05/11] drm/bridge: it6505: increase supports of HDCP repeater ksv devices
>
>On Thu, Sep 26, 2024 at 03:50:14PM GMT, Hermes Wu wrote:
>> From: Hermes Wu <Hermes.wu@ite.com.tw>
>> 
>> A HDCP source shall support max downstream device to 127.
>> 
>> Change definition of MAX_HDCP_DOWN_STREAM_COUNT to 127
>
>This results in struct it6505 growth by ~0.5 KiB. Please mention it in the commit message.
>
>Is it really required to have sha1_input in the constantly allocated structure? I think it's a temporary data, which isn't necessary after processing.

Change sha1_input with dynamic memory into one commit or 

change to use temporary data in one and change definition of MAX_HDCP_DOWN_STREAM_COUN in another?

>> 
>> Fixes: b5c84a9edcd4 ("drm/bridge: add it6505 driver")
>> Signed-off-by: Hermes Wu <Hermes.wu@ite.com.tw>
>> ---
>>  drivers/gpu/drm/bridge/ite-it6505.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/drivers/gpu/drm/bridge/ite-it6505.c 
>> b/drivers/gpu/drm/bridge/ite-it6505.c
>> index d1f5220e04a6..5d5ce12cd054 100644
>> --- a/drivers/gpu/drm/bridge/ite-it6505.c
>> +++ b/drivers/gpu/drm/bridge/ite-it6505.c
>> @@ -296,7 +296,7 @@
>>  #define MAX_LANE_COUNT 4
>>  #define MAX_LINK_RATE HBR
>>  #define AUTO_TRAIN_RETRY 3
>> -#define MAX_HDCP_DOWN_STREAM_COUNT 10
>> +#define MAX_HDCP_DOWN_STREAM_COUNT 127
>>  #define MAX_CR_LEVEL 0x03
>>  #define MAX_EQ_LEVEL 0x03
>>  #define AUX_WAIT_TIMEOUT_MS 15
>> --
>> 2.34.1
>> 
>
>-- 
>With best wishes
>Dmitry
>

BR,
Hermes
Hermes Wu Sept. 27, 2024, 4:06 a.m. UTC | #3
>
>
>-----Original Message-----
>From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> 
>Sent: Thursday, September 26, 2024 4:07 PM
>To: Hermes Wu (吳佳宏) <Hermes.Wu@ite.com.tw>
>Cc: Kenneth Hung (洪家倫) <Kenneth.Hung@ite.com.tw>; 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>; Allen Chen <allen.chen@ite.com.tw>; AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>; open list:DRM DRIVERS <dri-devel@lists.freedesktop.org>; open list <linux-kernel@vger.kernel.org>
>Subject: Re: [PATCH v4 05/11] drm/bridge: it6505: increase supports of HDCP repeater ksv devices
>
>On Thu, Sep 26, 2024 at 03:50:14PM GMT, Hermes Wu wrote:
>> From: Hermes Wu <Hermes.wu@ite.com.tw>
>> 
>> A HDCP source shall support max downstream device to 127.
>> 
>> Change definition of MAX_HDCP_DOWN_STREAM_COUNT to 127
>
>This results in struct it6505 growth by ~0.5 KiB. Please mention it in the commit message.
>
>Is it really required to have sha1_input in the constantly allocated structure? I think it's a temporary data, which isn't necessary after processing.
>

For HDCP, KSV list must store for DRM check, constantly allocated is necessary.

>> 
>> Fixes: b5c84a9edcd4 ("drm/bridge: add it6505 driver")
>> Signed-off-by: Hermes Wu <Hermes.wu@ite.com.tw>
>> ---
>>  drivers/gpu/drm/bridge/ite-it6505.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/drivers/gpu/drm/bridge/ite-it6505.c 
>> b/drivers/gpu/drm/bridge/ite-it6505.c
>> index d1f5220e04a6..5d5ce12cd054 100644
>> --- a/drivers/gpu/drm/bridge/ite-it6505.c
>> +++ b/drivers/gpu/drm/bridge/ite-it6505.c
>> @@ -296,7 +296,7 @@
>>  #define MAX_LANE_COUNT 4
>>  #define MAX_LINK_RATE HBR
>>  #define AUTO_TRAIN_RETRY 3
>> -#define MAX_HDCP_DOWN_STREAM_COUNT 10
>> +#define MAX_HDCP_DOWN_STREAM_COUNT 127
>>  #define MAX_CR_LEVEL 0x03
>>  #define MAX_EQ_LEVEL 0x03
>>  #define AUX_WAIT_TIMEOUT_MS 15
>> --
>> 2.34.1
>> 
>
>-- 
>With best wishes
>Dmitry
>

BR,
Hermes
Dmitry Baryshkov Sept. 27, 2024, 8:50 a.m. UTC | #4
On Fri, Sep 27, 2024 at 02:18:54AM GMT, Hermes.Wu@ite.com.tw wrote:
> >
> >-----Original Message-----
> >From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> 
> >Sent: Thursday, September 26, 2024 4:07 PM
> >To: Hermes Wu (吳佳宏) <Hermes.Wu@ite.com.tw>
> >Cc: Kenneth Hung (洪家倫) <Kenneth.Hung@ite.com.tw>; 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>; Allen Chen <allen.chen@ite.com.tw>; AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>; open list:DRM DRIVERS <dri-devel@lists.freedesktop.org>; open list <linux-kernel@vger.kernel.org>
> >Subject: Re: [PATCH v4 05/11] drm/bridge: it6505: increase supports of HDCP repeater ksv devices
> >
> >On Thu, Sep 26, 2024 at 03:50:14PM GMT, Hermes Wu wrote:
> >> From: Hermes Wu <Hermes.wu@ite.com.tw>
> >> 
> >> A HDCP source shall support max downstream device to 127.
> >> 
> >> Change definition of MAX_HDCP_DOWN_STREAM_COUNT to 127
> >
> >This results in struct it6505 growth by ~0.5 KiB. Please mention it in the commit message.
> >
> >Is it really required to have sha1_input in the constantly allocated structure? I think it's a temporary data, which isn't necessary after processing.
> 
> Change sha1_input with dynamic memory into one commit or 
> 
> change to use temporary data in one and change definition of MAX_HDCP_DOWN_STREAM_COUN in another?

If it's needed during the lifetime, it's fine. Just explain the
necessity to grow the structure in the commit message.

> 
> >> 
> >> Fixes: b5c84a9edcd4 ("drm/bridge: add it6505 driver")
> >> Signed-off-by: Hermes Wu <Hermes.wu@ite.com.tw>
> >> ---
> >>  drivers/gpu/drm/bridge/ite-it6505.c | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >> 
> >> diff --git a/drivers/gpu/drm/bridge/ite-it6505.c 
> >> b/drivers/gpu/drm/bridge/ite-it6505.c
> >> index d1f5220e04a6..5d5ce12cd054 100644
> >> --- a/drivers/gpu/drm/bridge/ite-it6505.c
> >> +++ b/drivers/gpu/drm/bridge/ite-it6505.c
> >> @@ -296,7 +296,7 @@
> >>  #define MAX_LANE_COUNT 4
> >>  #define MAX_LINK_RATE HBR
> >>  #define AUTO_TRAIN_RETRY 3
> >> -#define MAX_HDCP_DOWN_STREAM_COUNT 10
> >> +#define MAX_HDCP_DOWN_STREAM_COUNT 127
> >>  #define MAX_CR_LEVEL 0x03
> >>  #define MAX_EQ_LEVEL 0x03
> >>  #define AUX_WAIT_TIMEOUT_MS 15
> >> --
> >> 2.34.1
> >> 
> >
> >-- 
> >With best wishes
> >Dmitry
> >
> 
> BR,
> Hermes
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/bridge/ite-it6505.c b/drivers/gpu/drm/bridge/ite-it6505.c
index d1f5220e04a6..5d5ce12cd054 100644
--- a/drivers/gpu/drm/bridge/ite-it6505.c
+++ b/drivers/gpu/drm/bridge/ite-it6505.c
@@ -296,7 +296,7 @@ 
 #define MAX_LANE_COUNT 4
 #define MAX_LINK_RATE HBR
 #define AUTO_TRAIN_RETRY 3
-#define MAX_HDCP_DOWN_STREAM_COUNT 10
+#define MAX_HDCP_DOWN_STREAM_COUNT 127
 #define MAX_CR_LEVEL 0x03
 #define MAX_EQ_LEVEL 0x03
 #define AUX_WAIT_TIMEOUT_MS 15