[libcamera-devel,v4,00/11] libcamera: Add support for Fence
mbox series

Message ID 20211201142936.107405-1-jacopo@jmondi.org
Headers show
Series
  • libcamera: Add support for Fence
Related show

Message

Jacopo Mondi Dec. 1, 2021, 2:29 p.m. UTC
Take into account Laurent's comments on V3

v3->v4
- Documentation fixes
- Rationalize reset()/release() function naming
- Call Request::Private::cancel() in Request::Private::timeout() and simplify
  PipelineHandlers::doQueueRequest()
- Fix Camera HAL requestComplete() fences handling

v2->v3
- Documentation

- Fence:
  - use UniqueFD
  - drop Extensible

- Framebuffer:
  - Add FrameBuffer::resetFence

- Request:
  - do not overload addBuffer but use optional argument
  - Remove Private::Status
  - simplify prepare() by using a map of buffers to notifiers
  - Add the prepared_ flag

- PipelineHandler:
  - Simplify request preparation

- Android
  - Use UniqueFD

v1->v2:
Major changes:
- removed notifiers and timers from Fence. A Fence is now an wrapper that owns
  a file descriptor
- Add timers and notifiers to Request::Private and add the
  Request::Private::prepare interface

Smaller changes:
- Expand Request::Private to move all internal fields
- Remove Fence move semantic. A Fence lives in a Framebuffer.
- A few minor patches on top

Jacopo Mondi (10):
  libcamera: Print Timer identifier
  libcamera: fence: Introduce Fence
  libcamera: framebuffer: Add Fence to FrameBuffer
  libcamera: request: Add Fence to Request::addBuffer()
  test: fence: Add test for the Fence class
  libcamera: pipeline_handler: Split request queueing
  libcamera: pipeline: Introduce stopDevice()
  libcamera: request: Add Request::Private::prepare()
  libcamera: pipeline_handler: Prepare Request
  android: Remove CameraWorker

Laurent Pinchart (1):
  libcamera: request: Make Request class Extensible

 include/libcamera/fence.h                     |  31 ++
 include/libcamera/framebuffer.h               |   4 +
 include/libcamera/internal/framebuffer.h      |   8 +
 include/libcamera/internal/meson.build        |   1 +
 include/libcamera/internal/pipeline_handler.h |   9 +-
 include/libcamera/internal/request.h          |  64 +++
 .../libcamera/internal/tracepoints/request.tp |  22 +-
 include/libcamera/meson.build                 |   1 +
 include/libcamera/request.h                   |  23 +-
 src/android/camera_device.cpp                 |  39 +-
 src/android/camera_device.h                   |   3 -
 src/android/camera_request.cpp                |   8 +-
 src/android/camera_request.h                  |   6 +-
 src/android/camera_stream.cpp                 |  10 +-
 src/android/camera_worker.cpp                 | 129 ------
 src/android/camera_worker.h                   |  70 ----
 src/android/meson.build                       |   1 -
 src/libcamera/base/event_dispatcher_poll.cpp  |   9 +-
 src/libcamera/base/timer.cpp                  |   4 +-
 src/libcamera/fence.cpp                       | 113 +++++
 src/libcamera/framebuffer.cpp                 |  58 +++
 src/libcamera/meson.build                     |   1 +
 src/libcamera/pipeline/ipu3/ipu3.cpp          |   4 +-
 .../pipeline/raspberrypi/raspberrypi.cpp      |   4 +-
 src/libcamera/pipeline/rkisp1/rkisp1.cpp      |   4 +-
 src/libcamera/pipeline/simple/simple.cpp      |   4 +-
 src/libcamera/pipeline/uvcvideo/uvcvideo.cpp  |   4 +-
 src/libcamera/pipeline/vimc/vimc.cpp          |   4 +-
 src/libcamera/pipeline_handler.cpp            | 101 ++++-
 src/libcamera/request.cpp                     | 386 ++++++++++++++----
 test/fence.cpp                                | 340 +++++++++++++++
 test/meson.build                              |   1 +
 32 files changed, 1094 insertions(+), 372 deletions(-)
 create mode 100644 include/libcamera/fence.h
 create mode 100644 include/libcamera/internal/request.h
 delete mode 100644 src/android/camera_worker.cpp
 delete mode 100644 src/android/camera_worker.h
 create mode 100644 src/libcamera/fence.cpp
 create mode 100644 test/fence.cpp

--
2.33.1