Re: [PATCH v2 1/2] gpu: ipu-v3: vdic: Simplify ipu_vdi_setup()

2024-09-25 Thread Marek Vasut

On 9/25/24 6:43 PM, Philipp Zabel wrote:

On Di, 2024-09-24 at 12:47 +0200, Marek Vasut wrote:

On 9/4/24 11:05 AM, Philipp Zabel wrote:

On Mi, 2024-07-24 at 02:19 +0200, Marek Vasut wrote:

The 'code' parameter only ever selects between YUV 4:2:0 and 4:2:2
subsampling, turn it into boolean to select exactly that and update
related code accordingly.

Signed-off-by: Marek Vasut 


I'd prefer this to be an enum ipu_chroma_subsampling or similar,
instead of a boolean. Otherwise,


I'm afraid this introduces unnecessary back and forth conversions
between the boolean and either of the two enum ipu_chroma_subsampling
values in the code.


Fair enough. I dislike the opaque usage in vdic_start() a bit, but with
the in422 variable in ipu_mem2mem_vdic_setup_hardware() it is clear
enough.
I'll keep the rework for V3 and then we can decide whether or not to 
undo it.


Re: [PATCH v2 1/2] gpu: ipu-v3: vdic: Simplify ipu_vdi_setup()

2024-09-25 Thread Philipp Zabel
On Di, 2024-09-24 at 12:47 +0200, Marek Vasut wrote:
> On 9/4/24 11:05 AM, Philipp Zabel wrote:
> > On Mi, 2024-07-24 at 02:19 +0200, Marek Vasut wrote:
> > > The 'code' parameter only ever selects between YUV 4:2:0 and 4:2:2
> > > subsampling, turn it into boolean to select exactly that and update
> > > related code accordingly.
> > > 
> > > Signed-off-by: Marek Vasut 
> > 
> > I'd prefer this to be an enum ipu_chroma_subsampling or similar,
> > instead of a boolean. Otherwise,
> 
> I'm afraid this introduces unnecessary back and forth conversions 
> between the boolean and either of the two enum ipu_chroma_subsampling 
> values in the code.

Fair enough. I dislike the opaque usage in vdic_start() a bit, but with
the in422 variable in ipu_mem2mem_vdic_setup_hardware() it is clear
enough.

regards
Philipp


Re: [PATCH v2 1/2] gpu: ipu-v3: vdic: Simplify ipu_vdi_setup()

2024-09-24 Thread Marek Vasut

On 9/4/24 11:05 AM, Philipp Zabel wrote:

On Mi, 2024-07-24 at 02:19 +0200, Marek Vasut wrote:

The 'code' parameter only ever selects between YUV 4:2:0 and 4:2:2
subsampling, turn it into boolean to select exactly that and update
related code accordingly.

Signed-off-by: Marek Vasut 


I'd prefer this to be an enum ipu_chroma_subsampling or similar,
instead of a boolean. Otherwise,


I'm afraid this introduces unnecessary back and forth conversions 
between the boolean and either of the two enum ipu_chroma_subsampling 
values in the code.


Re: [PATCH v2 1/2] gpu: ipu-v3: vdic: Simplify ipu_vdi_setup()

2024-09-04 Thread Philipp Zabel
On Mi, 2024-07-24 at 02:19 +0200, Marek Vasut wrote:
> The 'code' parameter only ever selects between YUV 4:2:0 and 4:2:2
> subsampling, turn it into boolean to select exactly that and update
> related code accordingly.
> 
> Signed-off-by: Marek Vasut 

I'd prefer this to be an enum ipu_chroma_subsampling or similar,
instead of a boolean. Otherwise,

Reviewed-by: Philipp Zabel 

regards
Philipp