mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] media: ipu3-cio2: support concurrent CSI-2 streams
@ 2026-10-31  0:23 Joe Dzado
  2026-10-31  0:23 ` [PATCH 1/3] media: ipu3-cio2: track the streaming queue by DMA channel Joe Dzado
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Joe Dzado @ 2026-10-31  0:23 UTC (permalink / raw)
  To: Sakari Ailus, Dan Scally, Yong Zhi
  Cc: Mauro Carvalho Chehab, linux-media, linux-kernel, Joe Dzado

The ipu3-cio2 driver currently assumes a single active capture: every
stream is pinned to DMA channel 0 (CIO2_DMA_CHAN) and tracked through a
single cur_queue pointer, with the IRQ handler assuming all completion
and start-of-frame events belong to that one queue. On platforms with
more than one sensor wired to separate CSI-2 ports (e.g. the Microsoft
Surface RGB + IR cameras), starting a second stream reprograms channel 0
and cur_queue out from under the first, so only one sensor can capture
at a time.

This series lets the driver use the DMA channels the hardware actually
has, so multiple sensors can stream concurrently:

  1/3 dispatches interrupts by DMA channel instead of a single cur_queue
      and converts the streaming state to a per-queue count (no
      functional change);
  2/3 serialises concurrent hw_init()/hw_exit() with a new lock and
      guards the block-shared setup so bringing up a second stream does
      not tear down the first (still single-channel, no functional
      change);
  3/3 maps each CSI-2 port to its own DMA channel (2*port), with a
      dma_per_port module parameter to restore the old behaviour.

Each patch builds on its own and is bisectable. Tested on a Microsoft
Surface Laptop (i5-7200U, Kaby Lake) with the OV9734 (colour) and OV7251
(IR) sensors streaming concurrently on CIO2 ports 1 and 2 for several
days without errors.

Joe Dzado (3):
  media: ipu3-cio2: track the streaming queue by DMA channel
  media: ipu3-cio2: serialise concurrent stream start and stop
  media: ipu3-cio2: give each CSI-2 port its own DMA channel

 drivers/media/pci/intel/ipu3/ipu3-cio2.c | 283 ++++++++++++++---------
 drivers/media/pci/intel/ipu3/ipu3-cio2.h |  10 +-
 2 files changed, 188 insertions(+), 105 deletions(-)

-- 
2.56.0


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

end of thread, other threads:[~2026-10-31  0:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-31  0:23 [PATCH 0/3] media: ipu3-cio2: support concurrent CSI-2 streams Joe Dzado
2026-10-31  0:23 ` [PATCH 1/3] media: ipu3-cio2: track the streaming queue by DMA channel Joe Dzado
2026-10-31  0:23 ` [PATCH 2/3] media: ipu3-cio2: serialise concurrent stream start and stop Joe Dzado
2026-10-31  0:23 ` [PATCH 3/3] media: ipu3-cio2: give each CSI-2 port its own DMA channel Joe Dzado
2026-10-31  0:24 ` [PATCH 0/3] media: ipu3-cio2: support concurrent CSI-2 streams joe.dzado

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®