linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: "Krzysztof Hałasa" <khalasa@piap.pl>
Cc: Rui Miguel Silva <rmfrfs@gmail.com>,
	Martin Kepplinger <martink@posteo.de>,
	Purism Kernel Team <kernel@puri.sm>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	linux-media@vger.kernel.org, imx@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Enable MIPI filtering by DT on i.MX8M*
Date: Fri, 9 May 2025 12:37:33 +0200	[thread overview]
Message-ID: <20250509103733.GE28896@pendragon.ideasonboard.com> (raw)
In-Reply-To: <m3h61u9jy2.fsf@t19.piap.pl>

Hi Krzysztof,

Thank you for the patch.

On Fri, May 09, 2025 at 12:07:01PM +0200, Krzysztof Hałasa wrote:
> 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 */

The condition was added because the CSIS in the i.MX8MM doesn't
implement the INTERLEAVE_MODE field. We can't remove it unconditionally.

You mentioned i.MX8MP, that's a platform where I'd like to see proper
support for *capturing* embedded data, not just dropping it. Have you
looked at how this could be implemented ?

>  	mipi_csis_write(csis, MIPI_CSIS_CMN_CTRL, val);
>  
>  	__mipi_csis_set_format(csis, format, csis_fmt);

-- 
Regards,

Laurent Pinchart


  reply	other threads:[~2025-05-09 11:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-09 10:07 [PATCH] Enable MIPI filtering by DT on i.MX8M* Krzysztof Hałasa
2025-05-09 10:37 ` Laurent Pinchart [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250509103733.GE28896@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=festevam@gmail.com \
    --cc=imx@lists.linux.dev \
    --cc=kernel@pengutronix.de \
    --cc=kernel@puri.sm \
    --cc=khalasa@piap.pl \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=martink@posteo.de \
    --cc=mchehab@kernel.org \
    --cc=rmfrfs@gmail.com \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).