mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] media: i2c: alvium: cleanup media bus formats
@ 2025-09-09 13:59 Martin Hecht
  2025-09-11 12:14 ` Sakari Ailus
  0 siblings, 1 reply; 3+ messages in thread
From: Martin Hecht @ 2025-09-09 13:59 UTC (permalink / raw)
  To: linux-media
  Cc: sakari.ailus, michael.roeder, martin.hecht, Martin Hecht,
	Tommaso Merciai, Mauro Carvalho Chehab, linux-kernel

This patch removes MEDIA_BUS_FMT_RBG888_1X24 and MEDIA_BUS_FMT_BGR888_1X24
as of that formats are not supported by Alvium currently.
The missing and supported MEDIA_BUS_FMT_RGB565_1X16 has been added.

Signed-off-by: Martin Hecht <mhecht73@gmail.com>
---
changes since v1:
 - subject changed because typo

 drivers/media/i2c/alvium-csi2.c | 28 +++++++++-------------------
 drivers/media/i2c/alvium-csi2.h |  3 +--
 2 files changed, 10 insertions(+), 21 deletions(-)

diff --git a/drivers/media/i2c/alvium-csi2.c b/drivers/media/i2c/alvium-csi2.c
index c63af96d3b31..743b300fba4c 100644
--- a/drivers/media/i2c/alvium-csi2.c
+++ b/drivers/media/i2c/alvium-csi2.c
@@ -94,19 +94,9 @@ static const struct alvium_pixfmt alvium_csi2_fmts[] = {
 		.bay_fmt_regval = -1,
 		.is_raw = 0,
 	}, {
-		/* RBG888_1X24 */
-		.id = ALVIUM_FMT_RBG888_1X24,
-		.code = MEDIA_BUS_FMT_RBG888_1X24,
-		.colorspace = V4L2_COLORSPACE_SRGB,
-		.fmt_av_bit = ALVIUM_BIT_RGB888,
-		.bay_av_bit = ALVIUM_BIT_BAY_NONE,
-		.mipi_fmt_regval = MIPI_CSI2_DT_RGB888,
-		.bay_fmt_regval = -1,
-		.is_raw = 0,
-	}, {
-		/* BGR888_1X24 */
-		.id = ALVIUM_FMT_BGR888_1X24,
-		.code = MEDIA_BUS_FMT_BGR888_1X24,
+		/* RGB888_3X8 */
+		.id = ALVIUM_FMT_RGB888_3X8,
+		.code = MEDIA_BUS_FMT_RGB888_3X8,
 		.colorspace = V4L2_COLORSPACE_SRGB,
 		.fmt_av_bit = ALVIUM_BIT_RGB888,
 		.bay_av_bit = ALVIUM_BIT_BAY_NONE,
@@ -114,15 +104,15 @@ static const struct alvium_pixfmt alvium_csi2_fmts[] = {
 		.bay_fmt_regval = -1,
 		.is_raw = 0,
 	}, {
-		/* RGB888_3X8 */
-		.id = ALVIUM_FMT_RGB888_3X8,
-		.code = MEDIA_BUS_FMT_RGB888_3X8,
+		/* RGB565_1X16 */
+		.id = ALVIUM_FMT_RGB565_1X16,
+		.code = MEDIA_BUS_FMT_RGB565_1X16,
 		.colorspace = V4L2_COLORSPACE_SRGB,
-		.fmt_av_bit = ALVIUM_BIT_RGB888,
+		.fmt_av_bit = ALVIUM_BIT_RGB565,
 		.bay_av_bit = ALVIUM_BIT_BAY_NONE,
-		.mipi_fmt_regval = MIPI_CSI2_DT_RGB888,
+		.mipi_fmt_regval = MIPI_CSI2_DT_RGB565,
 		.bay_fmt_regval = -1,
-		.is_raw = 0,
+		.is_raw = 0,
 	}, {
 		/* Y8_1X8 */
 		.id = ALVIUM_FMT_Y8_1X8,
diff --git a/drivers/media/i2c/alvium-csi2.h b/drivers/media/i2c/alvium-csi2.h
index 978af44f76c7..0f1af5e5355c 100644
--- a/drivers/media/i2c/alvium-csi2.h
+++ b/drivers/media/i2c/alvium-csi2.h
@@ -224,9 +224,8 @@ enum alvium_mipi_fmt {
 	ALVIUM_FMT_YUYV8_2X8,
 	ALVIUM_FMT_YUYV10_1X20,
 	ALVIUM_FMT_RGB888_1X24,
-	ALVIUM_FMT_RBG888_1X24,
-	ALVIUM_FMT_BGR888_1X24,
 	ALVIUM_FMT_RGB888_3X8,
+	ALVIUM_FMT_RGB565_1X16,
 	ALVIUM_FMT_Y8_1X8,
 	ALVIUM_FMT_SGRBG8_1X8,
 	ALVIUM_FMT_SRGGB8_1X8,
-- 
2.43.0


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

* Re: [PATCH v2] media: i2c: alvium: cleanup media bus formats
  2025-09-09 13:59 [PATCH v2] media: i2c: alvium: cleanup media bus formats Martin Hecht
@ 2025-09-11 12:14 ` Sakari Ailus
  2025-09-11 15:11   ` Martin Hecht
  0 siblings, 1 reply; 3+ messages in thread
From: Sakari Ailus @ 2025-09-11 12:14 UTC (permalink / raw)
  To: Martin Hecht
  Cc: linux-media, michael.roeder, martin.hecht, Tommaso Merciai,
	Mauro Carvalho Chehab, linux-kernel

Hi Martin,

On Tue, Sep 09, 2025 at 03:59:37PM +0200, Martin Hecht wrote:
> This patch removes MEDIA_BUS_FMT_RBG888_1X24 and MEDIA_BUS_FMT_BGR888_1X24
> as of that formats are not supported by Alvium currently.
> The missing and supported MEDIA_BUS_FMT_RGB565_1X16 has been added.

What's the pixel order used by the format in Alvium case?

-- 
Regards,

Sakari Ailus

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

* Re: [PATCH v2] media: i2c: alvium: cleanup media bus formats
  2025-09-11 12:14 ` Sakari Ailus
@ 2025-09-11 15:11   ` Martin Hecht
  0 siblings, 0 replies; 3+ messages in thread
From: Martin Hecht @ 2025-09-11 15:11 UTC (permalink / raw)
  To: Sakari Ailus
  Cc: linux-media, michael.roeder, martin.hecht, Tommaso Merciai,
	Mauro Carvalho Chehab, linux-kernel

Hi Sakari,


On 9/11/25 14:14, Sakari Ailus wrote:
> Hi Martin,
> 
> On Tue, Sep 09, 2025 at 03:59:37PM +0200, Martin Hecht wrote:
>> This patch removes MEDIA_BUS_FMT_RBG888_1X24 and MEDIA_BUS_FMT_BGR888_1X24
>> as of that formats are not supported by Alvium currently.
>> The missing and supported MEDIA_BUS_FMT_RGB565_1X16 has been added.
> 
> What's the pixel order used by the format in Alvium case?
> 

The Alvium has a fixed pixel order currently what should be BGR during 
transmission of any RGB format as described in MIPI-CSI2 spec 1.3. We 
tested with MEDIA_BUS_FMT_RGB888_1X24 as well as 
MEDIA_BUS_FMT_RGB888_3X8 for RGB24 in several SoCs like imx8mm, imx8mp 
and Xilinx CSI2RX subsystem on ZynqMP and Versal.
Does that answer your question?

BR Martin


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

end of thread, other threads:[~2025-09-11 15:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-09 13:59 [PATCH v2] media: i2c: alvium: cleanup media bus formats Martin Hecht
2025-09-11 12:14 ` Sakari Ailus
2025-09-11 15:11   ` Martin Hecht

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

all inboxes | Powered by JetHome®