[PATCH] Enable MIPI filtering by DT on i.MX8M*
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Fri May 9 03:37:33 PDT 2025
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 at 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
More information about the linux-arm-kernel
mailing list