[v5,0/2] imx8-isi: Move isi routing into acquireDevice
mbox series

Message ID 20251104075609.94310-1-antoine.bouyer@nxp.com
Headers show
Series
  • imx8-isi: Move isi routing into acquireDevice
Related show

Message

Antoine Bouyer Nov. 4, 2025, 7:56 a.m. UTC
Submit imx8-isi fix on behalf of Andrei. As stated in the commit message,
this patch fixes an issue introduced by the imx8-isi multicamera support
patch, merged in v0.5.2.

Issue is about running multiple processes trying to list cameras while
one process is already using one (or more) camera(s).

Tested on i.MX8MP evk.

---
Changes in v5:
- Move debug log into PipelineHandler acquire() and release() instead of
  PipelineHandlerISI.
- Add 'const' after accessor function to mark it as non-mutating, like 
  other accessors.
- Rephrase accessor description as suggested by Barnabás.
- Fix coding style issue in comments paragraph.
- Add 'maybe_unused' flag in PipelineHandlerISI::acquireDevice camera
  parameter as it is not used anymore.

link to v4: https://patchwork.libcamera.org/cover/24950/

Changes in v4:
- Add an accessor for PipelineHandler::useCount_, and move back the
  variable into private to avoid documentation build issue.

link to v3: https://patchwork.libcamera.org/cover/24850/

Changes in v3:
- Move PipelineHandler::useCount_ variable to protected instead of private.
- Use PipelineHandler::useCount_ variable instead of local acquireCount_.
- Remove useless PipelineHandlerISI::releaseDevice().

link to v2: https://patchwork.libcamera.org/patch/24720/ 

Changes in v2:
- Return boolean instead of int if an error is returned by setRouting in
  acquireDevice.
- Check acquireCount_ is higher than 0 instead of 1, and increase counter
  only when setRouting is successful, or if counter is already non null.

link to v1: https://patchwork.libcamera.org/patch/24706/

---
Andrei Gansari (1):
  pipeline: imx8-isi: Delay ISI routes config to acquire() time

Antoine Bouyer (1):
  libcamera: pipeline_handler: Add accessor for useCount_

 include/libcamera/internal/pipeline_handler.h |  1 +
 src/libcamera/pipeline/imx8-isi/imx8-isi.cpp  | 26 ++++++++++++++-----
 src/libcamera/pipeline_handler.cpp            | 14 ++++++++++
 3 files changed, 35 insertions(+), 6 deletions(-)