Linux Media Controller development
 help / color / mirror / Atom feed
* [PATCH] media: mali-c55: Disable colour space conversion for RGB outputs
@ 2026-10-06 23:42 David Carlier
  2026-10-07  9:11 ` Dan Scally
  0 siblings, 1 reply; 2+ messages in thread
From: David Carlier @ 2026-10-06 23:42 UTC (permalink / raw)
  To: linux-media
  Cc: dan.scally, jacopo.mondi, mchehab, hverkuil+cisco, linux-kernel,
	David Carlier, stable

The colour space conversion block is only programmed for YUV formats,
and its configuration is kept across streaming sessions. An RGB stream
started after a YUV one thus still converts its output to YUV.

Clear the conversion configuration for non-YUV formats.

Fixes: d5f281f3dd29 ("media: mali-c55: Add Mali-C55 ISP driver")
Cc: stable@vger.kernel.org
Assisted-by: LLM
Signed-off-by: David Carlier <devnexen@gmail.com>
---
 drivers/media/platform/arm/mali-c55/mali-c55-capture.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/media/platform/arm/mali-c55/mali-c55-capture.c b/drivers/media/platform/arm/mali-c55/mali-c55-capture.c
index ff01553026fb..2425a069a939 100644
--- a/drivers/media/platform/arm/mali-c55/mali-c55-capture.c
+++ b/drivers/media/platform/arm/mali-c55/mali-c55-capture.c
@@ -577,6 +577,10 @@ static void mali_c55_cap_dev_format_configure(struct mali_c55_cap_dev *cap_dev)
 				MALI_C55_REG_CS_CONV_CONFIG,
 				MALI_C55_CS_CONV_FILTER_MASK,
 				MALI_C55_CS_CONV_FILTER_ENABLE);
+	} else {
+		/* Don't inherit the conversion set up by a previous YUV stream. */
+		mali_c55_cap_dev_write(cap_dev, MALI_C55_REG_CS_CONV_CONFIG,
+				       0);
 	}
 }
 
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] media: mali-c55: Disable colour space conversion for RGB outputs
  2026-10-06 23:42 [PATCH] media: mali-c55: Disable colour space conversion for RGB outputs David Carlier
@ 2026-10-07  9:11 ` Dan Scally
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Scally @ 2026-10-07  9:11 UTC (permalink / raw)
  To: David Carlier, linux-media
  Cc: jacopo.mondi, mchehab, hverkuil+cisco, linux-kernel, stable

Morning David, thanks for the patch

On 07/10/2026 00:42, David Carlier wrote:
> The colour space conversion block is only programmed for YUV formats,
> and its configuration is kept across streaming sessions. An RGB stream
> started after a YUV one thus still converts its output to YUV.
> 
> Clear the conversion configuration for non-YUV formats.
> 
> Fixes: d5f281f3dd29 ("media: mali-c55: Add Mali-C55 ISP driver")
> Cc: stable@vger.kernel.org
> Assisted-by: LLM
> Signed-off-by: David Carlier <devnexen@gmail.com>
> ---
>   drivers/media/platform/arm/mali-c55/mali-c55-capture.c | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/media/platform/arm/mali-c55/mali-c55-capture.c b/drivers/media/platform/arm/mali-c55/mali-c55-capture.c
> index ff01553026fb..2425a069a939 100644
> --- a/drivers/media/platform/arm/mali-c55/mali-c55-capture.c
> +++ b/drivers/media/platform/arm/mali-c55/mali-c55-capture.c
> @@ -577,6 +577,10 @@ static void mali_c55_cap_dev_format_configure(struct mali_c55_cap_dev *cap_dev)
>   				MALI_C55_REG_CS_CONV_CONFIG,
>   				MALI_C55_CS_CONV_FILTER_MASK,
>   				MALI_C55_CS_CONV_FILTER_ENABLE);
> +	} else {
> +		/* Don't inherit the conversion set up by a previous YUV stream. */
> +		mali_c55_cap_dev_write(cap_dev, MALI_C55_REG_CS_CONV_CONFIG,
> +				       0);

Makes sense to me:

Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>

>   	}
>   }
>   


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-10-07  9:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-06 23:42 [PATCH] media: mali-c55: Disable colour space conversion for RGB outputs David Carlier
2026-10-07  9:11 ` Dan Scally

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox