[libcamera-devel,00/11] Rockchip ISP pipeline handler
mbox series

Message ID 20190415165700.22970-1-laurent.pinchart@ideasonboard.com
Headers show
Series
  • Rockchip ISP pipeline handler
Related show

Message

Laurent Pinchart April 15, 2019, 4:56 p.m. UTC
Hello everybody,

This patch series implements a pipeline handler for the Rockchip ISP1.

The first eight patches, from 01/11 to 08/11, are miscellaneous fixes
and improvements, with the most notable change related to comparison
operators for geometry classes. Patch 09/11 and 10/11 are were the fun
begins, with a new CameraSensor class that factors out code related to
the sensor from the IPU3 pipeline handler. Patch 11/11 finally adds the
RkISP1 pipeline handler, using the new CameraSensor class.

Features are limited, as explained in patch 11/11. Only CSI-2 raw Bayer
sensors are supported, and while only one camera can be used at a time,
mutual exclusion isn't implemented yet.

The rkisp1 driver prints warnings in the kernel log when the stream is
started and stopped, as well as during capture:

[ 2527.336629] rkisp1: CIF_ISP_PIC_SIZE_ERROR (0x00000001)
[ 2527.344146] rkisp1: CIF_ISP_PIC_SIZE_ERROR (0x00000000)

This doesn't seem to prevent proper operation so far, but will need to
be fixed. Please note that the kernel driver isn't upstream yet, the
version used for this development can be found at

	git://linuxtv.org/pinchartl/media.git rockchip

The branch is based on the latest version of the driver as posted to the
linux-media mailing list, plus two additional patches that address the
bitrotting, and contains DT integration.

The patches have been tested on a Acer Chromebook Tab 10 device, based
on the Rockchip RK3399 SoC. The RK399 has two ISP instances, with one
CSI-2 receiver each, and it should be possible, at least in theory, to
use both ISPs for the same camera, one in live streaming mode and one in
memory-to-memory mode. This isn't supported on the kernel side, and thus
out of scope for this initial pipeline handler implementation in
libcamera.

Laurent Pinchart (11):
  Install the cam and qcam utilities
  libcamera: log: Mark Loggable::_log() methods as const
  libcamera: camera: Log requested configuration in configureStreams()
  libcamera: geometry: Sort classes alphabetically
  libcamera: geometry: Use Size to store min and max in SizeRange
  libcamera: geometry: Add comparison operators to geometry classes
  test: geometry: Add tests for Size class comparison operators
  libcamera: v4l2-subdevice: Add method to retrieve the media entity
  libcamera: camera_sensor: Add a new class to model a camera sensor
  libcamera: pipeline: ipu3: Use the new CameraSensor class
  libcamera: pipeline: Add RKISP1 pipeline

 include/libcamera/geometry.h                |  67 ++-
 src/cam/meson.build                         |   1 +
 src/libcamera/camera.cpp                    |  14 +
 src/libcamera/camera_sensor.cpp             | 245 +++++++++++
 src/libcamera/geometry.cpp                  | 166 ++++++--
 src/libcamera/include/camera_sensor.h       |  56 +++
 src/libcamera/include/log.h                 |   5 +-
 src/libcamera/include/v4l2_subdevice.h      |   3 +-
 src/libcamera/log.cpp                       |   5 +-
 src/libcamera/meson.build                   |   2 +
 src/libcamera/pipeline/ipu3/ipu3.cpp        |  87 +---
 src/libcamera/pipeline/meson.build          |   1 +
 src/libcamera/pipeline/rkisp1/meson.build   |   3 +
 src/libcamera/pipeline/rkisp1/rkisp1.cpp    | 448 ++++++++++++++++++++
 src/libcamera/v4l2_subdevice.cpp            |  22 +-
 src/qcam/meson.build                        |   1 +
 test/geometry.cpp                           | 125 ++++++
 test/meson.build                            |   1 +
 test/v4l2_subdevice/list_formats.cpp        |  14 +-
 test/v4l2_subdevice/v4l2_subdevice_test.cpp |   2 +-
 20 files changed, 1112 insertions(+), 156 deletions(-)
 create mode 100644 src/libcamera/camera_sensor.cpp
 create mode 100644 src/libcamera/include/camera_sensor.h
 create mode 100644 src/libcamera/pipeline/rkisp1/meson.build
 create mode 100644 src/libcamera/pipeline/rkisp1/rkisp1.cpp
 create mode 100644 test/geometry.cpp