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] [thread-next>] [day] [month] [year] [list]
Message-ID: <1f4720ea-fa9c-41b7-9a6c-24abffa4bd77@pengutronix.de>
Date: Wed, 7 Jan 2026 15:52:04 +0100
From: Sven Püschel <s.pueschel@...gutronix.de>
To: Nicolas Dufresne <nicolas@...fresne.ca>,
 Jacob Chen <jacob-chen@...wrt.com>,
 Ezequiel Garcia <ezequiel@...guardiasur.com.ar>,
 Mauro Carvalho Chehab <mchehab@...nel.org>, Heiko Stuebner
 <heiko@...ech.de>, Rob Herring <robh@...nel.org>,
 Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>
Cc: linux-media@...r.kernel.org, linux-rockchip@...ts.infradead.org,
 linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
 devicetree@...r.kernel.org, kernel@...gutronix.de
Subject: Re: [PATCH v2 18/22] media: rockchip: rga: move rga_fmt to rga-hw.h

Hi,

On 12/24/25 4:59 PM, Nicolas Dufresne wrote:
> Le mercredi 03 décembre 2025 à 16:52 +0100, Sven Püschel a écrit :
>> Move rga_fmt to rga-hw in preparation of the RGA3 addition, as the struct
>> contains many RGA2 specific values. They are used to write the correct
>> register values quickly based on the chosen format. Therefore the
>> pointer to the rga_fmt struct is kept but changed to an opaque void
>> pointer outside of the rga-hw.h.
[...]
>> diff --git a/drivers/media/platform/rockchip/rga/rga-hw.h b/drivers/media/platform/rockchip/rga/rga-hw.h
>> index fffcab0131225..3bc4b1f5acba2 100644
>> --- a/drivers/media/platform/rockchip/rga/rga-hw.h
>> +++ b/drivers/media/platform/rockchip/rga/rga-hw.h
>> @@ -6,6 +6,8 @@
>>   #ifndef __RGA_HW_H__
>>   #define __RGA_HW_H__
>>   
>> +#include <linux/types.h>
>> +
>>   #define RGA_CMDBUF_SIZE 0x20
>>   
>>   /* Hardware limits */
>> @@ -431,4 +433,14 @@ union rga_pat_con {
>>   	} data;
>>   };
>>   
>> +struct rga_fmt {
>> +	u32 fourcc;
>> +	int depth;
>> +	u8 uv_factor;
>> +	u8 y_div;
>> +	u8 x_div;
>> +	u8 color_swap;
>> +	u8 hw_format;
>> +};

[...]

>>   
>> -struct rga_fmt {
>> -	u32 fourcc;
>> -	int depth;
>> -	u8 uv_factor;
>> -	u8 y_div;
>> -	u8 x_div;
>> -	u8 color_swap;
>> -	u8 hw_format;
>> -};
> Ah! here's the removal of the unused variable. Not review friendly, but at last
> removed.

I've just moved it, so your review comments are still right. x_div/y_div 
is still used at one place in rga_hw.c, but I'll remove it too in my v3 
(and have these removals in the other commits to keep this reviewed-by).

Sincerely
     Sven

>
> Reviewed-by: Nicolas Dufresne <nicolas.dufresne@...labora.com>
>
>> -
>>   struct rga_frame {
>>   	/* Crop */
>>   	struct v4l2_rect crop;
>>   
>>   	/* Image format */
>> -	struct rga_fmt *fmt;
>> +	void *fmt;
>>   	struct v4l2_pix_format_mplane pix;
>>   };
>>   
>> @@ -145,8 +135,6 @@ static inline void rga_mod(struct rockchip_rga *rga, u32 reg, u32 val, u32 mask)
>>   struct rga_hw {
>>   	const char *card_type;
>>   	bool has_internal_iommu;
>> -	struct rga_fmt *formats;
>> -	u32 num_formats;
>>   	size_t cmdbuf_size;
>>   	u32 min_width, min_height;
>>   	u32 max_width, max_height;
>> @@ -158,6 +146,9 @@ struct rga_hw {
>>   		      struct rga_vb_buffer *src, struct rga_vb_buffer *dst);
>>   	bool (*handle_irq)(struct rockchip_rga *rga);
>>   	void (*get_version)(struct rockchip_rga *rga);
>> +	void *(*adjust_and_map_format)(struct v4l2_pix_format_mplane *format,
>> +				       bool is_output);
>> +	int (*enum_format)(struct v4l2_fmtdesc *f);
>>   };
>>   
>>   static inline bool rga_has_internal_iommu(const struct rockchip_rga *rga)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ