lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <26ed8563-b6d6-4e72-91a9-f4d5946cef8f@kwiboo.se>
Date: Mon, 23 Sep 2024 11:01:42 +0200
From: Jonas Karlman <jonas@...boo.se>
To: Krzysztof Kozlowski <krzk@...nel.org>,
 Krzysztof Kozlowski <krzk+dt@...nel.org>
Cc: Rob Herring <robh@...nel.org>, Conor Dooley <conor+dt@...nel.org>,
 Sandy Huang <hjc@...k-chips.com>, Heiko Stuebner <heiko@...ech.de>,
 Andy Yan <andy.yan@...k-chips.com>,
 Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
 Maxime Ripard <mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>,
 David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
 linux-rockchip@...ts.infradead.org, devicetree@...r.kernel.org,
 dri-devel@...ts.freedesktop.org, linux-arm-kernel@...ts.infradead.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/3] drm/rockchip: vop: Split rk3288-vop into big and lit

Hi Krzysztof,

On 2024-09-22 10:15, Krzysztof Kozlowski wrote:
> On 22/09/2024 00:20, Jonas Karlman wrote:
>> The Rockchip RK3288 SoC contain two different Visual Output Processor
>> (VOP) blocks, VOP_BIG and VOP_LIT. The VOP blocks support different max
>> output resolution, 3840x2160 and 2560x1600.
>>
>> Add support for the compatible used to differentiate between VOP_BIG and
>> VOP_LIT, support for the old compatible is kept for compatibility with
>> older device tree.
>>
>> Signed-off-by: Jonas Karlman <jonas@...boo.se>
>> ---
>>  drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 27 +++++++++++++++------
>>  1 file changed, 20 insertions(+), 7 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c
>> index e2c6ba26f437..978db93cda33 100644
>> --- a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c
>> +++ b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c
>> @@ -762,7 +762,7 @@ static const struct vop_intr rk3288_vop_intr = {
>>  	.clear = VOP_REG(RK3288_INTR_CTRL0, 0xf, 8),
>>  };
>>  
>> -static const struct vop_data rk3288_vop = {
>> +static const struct vop_data rk3288_vop_big = {
>>  	.version = VOP_VERSION(3, 1),
>>  	.feature = VOP_FEATURE_OUTPUT_RGB10,
>>  	.intr = &rk3288_vop_intr,
>> @@ -772,14 +772,22 @@ static const struct vop_data rk3288_vop = {
>>  	.win = rk3288_vop_win_data,
>>  	.win_size = ARRAY_SIZE(rk3288_vop_win_data),
>>  	.lut_size = 1024,
>> -	/*
>> -	 * This is the maximum resolution for the VOPB, the VOPL can only do
>> -	 * 2560x1600, but we can't distinguish them as they have the same
>> -	 * compatible.
>> -	 */
>>  	.max_output = { 3840, 2160 },
>>  };
>>  
>> +static const struct vop_data rk3288_vop_lit = {
>> +	.version = VOP_VERSION(3, 1),
>> +	.feature = VOP_FEATURE_OUTPUT_RGB10,
>> +	.intr = &rk3288_vop_intr,
>> +	.common = &rk3288_common,
>> +	.modeset = &rk3288_modeset,
>> +	.output = &rk3288_output,
>> +	.win = rk3288_vop_win_data,
>> +	.win_size = ARRAY_SIZE(rk3288_vop_win_data),
>> +	.lut_size = 1024,
>> +	.max_output = { 2560, 1600 },
>> +};
>> +
>>  static const int rk3368_vop_intrs[] = {
>>  	FS_INTR,
>>  	0, 0,
>> @@ -1245,8 +1253,13 @@ static const struct of_device_id vop_driver_dt_match[] = {
>>  	  .data = &rk3066_vop },
>>  	{ .compatible = "rockchip,rk3188-vop",
>>  	  .data = &rk3188_vop },
>> +	{ .compatible = "rockchip,rk3288-vop-big",
>> +	  .data = &rk3288_vop_big },
> 
> Hm... that's not really needed. Instead of having three compatibles, you
> could keep "rk3288-vop" as big and then my comment on bindings patch
> could be ignored (you keep the compatible).

Thanks, I guess that just adding a new compatible for vop-lit should be
enough.

VOP_BIG: rockchip,rk3288-vop
VOP_LIT: rockchip,rk3288-vop-lit, rockchip,rk3288-vop

That should ensure backward/forward compatibility with any mix of
old/new boot-firmware, DTs and kernels.

Will change to use that in v2.

Regards,
Jonas

> 
> 
> 
> Best regards,
> Krzysztof
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ