From: Martin Kepplinger <martink@posteo.de>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
linux-media@vger.kernel.org
Cc: Rui Miguel Silva <rmfrfs@gmail.com>,
Purism Kernel Team <kernel@puri.sm>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
imx@lists.linux.dev, Frank Li <Frank.Li@nxp.com>,
Stefan Klug <stefan.klug@ideasonboard.com>,
Sakari Ailus <sakari.ailus@iki.fi>
Subject: Re: [PATCH v1 0/6] media: imx-mipi-csis: Add streams support
Date: Fri, 07 Nov 2025 09:31:39 +0000 [thread overview]
Message-ID: <60dac85af5ed941c40cfb55dff0ccf7864f0e681.camel@posteo.de> (raw)
In-Reply-To: <20251107015813.5834-1-laurent.pinchart@ideasonboard.com>
Am Freitag, dem 07.11.2025 um 03:58 +0200 schrieb Laurent Pinchart:
> Hello,
>
> The reference manual for the NXP i.MX7D in which the CSIS is
> integrated
> lists four outputs named "channels" in various diagrams and tables,
> but
> only documents registers for channel 0. Reference manuals for i.MX8
> SoCs
> that integrate the CSIS gradually removed mentions of channels 1 to 3
> as
> newer revisions of the documents got released, which was interpreted
> as
> an indication that the CSIS has only a single output.
>
> That interpretation turned out not to be correct. In the i.MX8MP, the
> CSIS features multiple output channels. Channel 0 is connected to the
> ISI, and channels 0, 1 and 2 are connected to the ISP. Multi-channel
> support towards the ISP is meant to support HDR, where camera sensors
> transmit multiple exposures or gains over different virtual channels.
> The glue logic between the CSIS and ISP hardcodes this use case and
> combines the channels in a way suitable for the ISP's single input
> port.
Hi Laurent,
This is going to be a dumb question, I know this, but I'm equally
confused as interested:
What you implement here is *not* muxing CSIS to (one of the 2) ISI-
pipes, right? This specifically is something I still need to do on
mainline (nxp-tree has a way to "mux" this, with rather cryptic
devicetree properties) where a board physically has the camera
connected to the *second* CSI interface but I need data to run through
the *first* ISI pipe. By default the second ISI pipe is used for the
second CSI interface but only the first ISI pipe can do 4k. Is this
"muxing" implemented in mainline right now? (ISI driver most
probably?).
Also, your patch is not about the connection CSIS->ISP, right? Because
that is something I tested using libcamera a while ago and have a dtso
lying around for.
Can you put this new functionality into perspective for lazy people
like me? :) For the ISI-case this doesn't seem to have any implication
right?
anyways, fascinating :)
martin
>
> With a time machine, we would probably redesign the CSIS DT bindings
> to
> model each output channel with a port, and the V4L2 subdev would use
> multiple source pads. Without a time machine, we need to preserve
> backward compatibility with userspace. Not only would the addition of
> new ports and pads make this tricky, they would also require
> modelling
> the glue logic between the CSIS and ISP with a subdev. This would
> conflict with the need to preserve backward compatibility.
>
> Fortunately for us, the CSIS is an old IP. The NXP i.MX9 series uses
> a
> different CSI-2 receiver, and the probability of needing to support
> an
> SoC that connects different output channels to different devices is
> extremely low. We can therefore implement a solution tailored to the
> needs of the i.MX8MP, and model the output channels as separate
> streams
> instead of separate pads. Should the need arise in the future to
> support
> connecting output channels to different devices in a new SoC, we will
> still be able to model this with extra ports in the device tree
> without
> breaking backward compatibility. The driver could then create extra
> subdev pads accordingly.
>
> The series starts with 5 preparatory patches to ease review. Patch
> 1/6
> adds missing register definitions. Patch 2/6 then switches from
> .s_stream() to .enable_streams() and .disable_streams(), a pre-
> requisite
> for multi-stream support. Patch 3/6 follows by implementing the
> .s_routing() operation, supporting a single route exactly as done
> implicitly so far. Patches 4/6 and 5/6 refactor the code to group
> parameters in structures and clean up how they are written to
> registers.
> Finally, patch 6/6 adds multi-channel support.
>
> The series has been tested on an i.MX8MP with libcamera, both without
> changes to verify that backward compatibility is preserved, and with
> HDR
> support (work still in progress) to verify that VC filtering works as
> expected.
>
> Laurent Pinchart (6):
> media: imx-mipi-csis: Add VC-related register fields
> media: imx-mipi-csis: Switch to .enable_streams()
> media: imx-mipi-csis: Implement the .set_routing() operation
> media: imx-mipi-csis: Group runtime parameters in structure
> media: imx-mipi-csis: Set all per-channel registers in one function
> media: imx-mipi-csis: Add multi-channel support
>
> drivers/media/platform/nxp/imx-mipi-csis.c | 551 ++++++++++++++++---
> --
> 1 file changed, 429 insertions(+), 122 deletions(-)
>
>
> base-commit: dcb6fa37fd7bc9c3d2b066329b0d27dedf8becaa
next prev parent reply other threads:[~2025-11-07 9:31 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-07 1:58 [PATCH v1 0/6] media: imx-mipi-csis: Add streams support Laurent Pinchart
2025-11-07 1:58 ` [PATCH v1 1/6] media: imx-mipi-csis: Add VC-related register fields Laurent Pinchart
2025-11-07 16:19 ` Frank Li
2025-11-07 18:44 ` Laurent Pinchart
2025-11-07 20:37 ` Frank Li
2025-11-07 1:58 ` [PATCH v1 2/6] media: imx-mipi-csis: Switch to .enable_streams() Laurent Pinchart
2025-11-07 16:29 ` Frank Li
2025-11-07 18:32 ` Laurent Pinchart
2025-11-07 1:58 ` [PATCH v1 3/6] media: imx-mipi-csis: Implement the .set_routing() operation Laurent Pinchart
2025-11-07 16:36 ` Frank Li
2025-11-07 18:30 ` Laurent Pinchart
2025-11-07 20:38 ` Frank Li
2025-11-09 21:48 ` kernel test robot
2025-11-07 1:58 ` [PATCH v1 4/6] media: imx-mipi-csis: Group runtime parameters in structure Laurent Pinchart
2025-11-07 16:40 ` Frank Li
2025-11-07 1:58 ` [PATCH v1 5/6] media: imx-mipi-csis: Set all per-channel registers in one function Laurent Pinchart
2025-11-07 16:37 ` Frank Li
2025-11-07 1:58 ` [PATCH v1 6/6] media: imx-mipi-csis: Add multi-channel support Laurent Pinchart
2025-11-07 16:48 ` Frank Li
2025-11-07 18:43 ` Laurent Pinchart
2025-11-20 3:12 ` G.N. Zhou
2025-11-20 15:23 ` Frank Li
2025-11-20 16:22 ` Laurent Pinchart
2025-12-02 0:59 ` [EXT] " G.N. Zhou
2025-11-07 9:31 ` Martin Kepplinger [this message]
2025-11-07 18:28 ` [PATCH v1 0/6] media: imx-mipi-csis: Add streams support Laurent Pinchart
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=60dac85af5ed941c40cfb55dff0ccf7864f0e681.camel@posteo.de \
--to=martink@posteo.de \
--cc=Frank.Li@nxp.com \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=kernel@puri.sm \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=rmfrfs@gmail.com \
--cc=sakari.ailus@iki.fi \
--cc=stefan.klug@ideasonboard.com \
/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