[libcamera-devel,0/8] IPU3 Debug improvements
mbox series

Message ID 20210312061131.854849-1-kieran.bingham@ideasonboard.com
Headers show
Series
  • IPU3 Debug improvements
Related show

Message

Kieran Bingham March 12, 2021, 6:11 a.m. UTC
These patches have been split from the IPU3 stability series, as they
do not by themselves contribute to resolving the issues seen on the
IPU3.

There were however some potentially interesting developments while
investigating that may be worth integrating or discussing further.

Patches [1/8] and [2/8] extend the Request object to contain a sequence
number, and facilitate easily reporting the state of a request. I found
this to be incredibily useful while debugging to visualise what was
happening.

Patch [3/8] is somewhat RFC as it may or may not be desirable to reset
the sequence counter for each run of the camara, and also it may be
better to do so in a base class to ensure all pipeline handlers have
consistent behaviour.

Patch [4/8] ties the FrameInfo sequence id to the Request sequence
number, and makes it easy to pair relevant debug prints with the correct
request operation that it relates to.

Patch [5/8] adds the ability to inspect the state of the FrameInfo
structures which was invaluable to seeing what and why the state of
requests were when they were left in the pending requests queue.

Patch [6/8] and [7\/8] reorganise the FrameInfo and set the request
object on the internal buffers. This may allow future optimisations to
obtain the request faster than with a search by buffer on internal
buffers.

Finally patch [8/8] is RFC only as I thought it was helpful, but don't
expect to see it integrated unless it's highly favoured, but I couldn't
throw it away without at least posting it to the list first.

Kieran Bingham (8):
  libcamera: request: Provide a sequence number
  libcamera: request: Add a toString()
  libcamera: pipeline: ipu3: Reset sequence counts to zero on stop
  libcamera: pipeline: ipu3: frames: Use the request sequence
  libcamera: pipeline: ipu3: frames: Add FrameInfo state tracing
  libcamera: pipeline: ipu3: frames: Group FrameBuffer operations
  libcamera: pipeline: ipu3: frames: Associate buffers with the reqeust
  [RFC-Only] libcamera: request: A request canary

 include/libcamera/internal/pipeline_handler.h |  4 ++-
 include/libcamera/request.h                   |  6 ++++
 src/libcamera/pipeline/ipu3/frames.cpp        | 33 ++++++++++++++---
 src/libcamera/pipeline/ipu3/frames.h          |  5 ++-
 src/libcamera/pipeline/ipu3/ipu3.cpp          |  2 ++
 src/libcamera/pipeline_handler.cpp            |  2 ++
 src/libcamera/request.cpp                     | 35 ++++++++++++++++++-
 7 files changed, 80 insertions(+), 7 deletions(-)