linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Enable MIPI filtering by DT on i.MX8M*
@ 2025-05-09 10:07 Krzysztof Hałasa
  2025-05-09 10:37 ` Laurent Pinchart
  0 siblings, 1 reply; 12+ messages in thread
From: Krzysztof Hałasa @ 2025-05-09 10:07 UTC (permalink / raw)
  To: Rui Miguel Silva, Laurent Pinchart, Martin Kepplinger
  Cc: Purism Kernel Team, Mauro Carvalho Chehab, Shawn Guo,
	Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam, linux-media,
	imx, linux-arm-kernel, linux-kernel

In addition to raw image data, certain MIPI sensors send additional
information like NULL packets or "embedded 8-bit non-image data".
Without DT (data type) filtering, these packets end up in the frame
buffer, corrupting it.

Tested on i.MX8MP with IMX290 sensor.

Signed-off-by: Krzysztof Hałasa <khalasa@piap.pl>

diff --git a/drivers/media/platform/nxp/imx-mipi-csis.c b/drivers/media/platform/nxp/imx-mipi-csis.c
index 29523bb84d95..d53a4262b63d 100644
--- a/drivers/media/platform/nxp/imx-mipi-csis.c
+++ b/drivers/media/platform/nxp/imx-mipi-csis.c
@@ -654,8 +654,7 @@ static void mipi_csis_set_params(struct mipi_csis_device *csis,
 	val = mipi_csis_read(csis, MIPI_CSIS_CMN_CTRL);
 	val &= ~MIPI_CSIS_CMN_CTRL_LANE_NR_MASK;
 	val |= (lanes - 1) << MIPI_CSIS_CMN_CTRL_LANE_NR_OFFSET;
-	if (csis->info->version == MIPI_CSIS_V3_3)
-		val |= MIPI_CSIS_CMN_CTRL_INTER_MODE;
+	val |= MIPI_CSIS_CMN_CTRL_INTER_MODE; /* enable filtering by DT */
 	mipi_csis_write(csis, MIPI_CSIS_CMN_CTRL, val);
 
 	__mipi_csis_set_format(csis, format, csis_fmt);

-- 
Krzysztof "Chris" Hałasa

Sieć Badawcza Łukasiewicz
Przemysłowy Instytut Automatyki i Pomiarów PIAP
Al. Jerozolimskie 202, 02-486 Warszawa


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

end of thread, other threads:[~2025-05-30 10:51 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-09 10:07 [PATCH] Enable MIPI filtering by DT on i.MX8M* Krzysztof Hałasa
2025-05-09 10:37 ` Laurent Pinchart
2025-05-20 12:35   ` Krzysztof Hałasa
2025-05-21  9:08     ` Jacopo Mondi
2025-05-22 12:06       ` Krzysztof Hałasa
2025-05-23  9:58         ` Krzysztof Hałasa
2025-05-23 15:34           ` Sébastien Szymanski
2025-05-29  9:25             ` Krzysztof Hałasa
2025-05-23 11:33         ` Jacopo Mondi
2025-05-29 11:27           ` Krzysztof Hałasa
2025-05-30  7:56             ` Jacopo Mondi
2025-05-30 10:48               ` Krzysztof Hałasa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).