Commit Graph

6170 Commits

Author SHA1 Message Date
Laurent Pinchart
6657a19247 libcamera: yaml_parser: Add function to set a YamlObject value
Add a YamlObject::set() function to set the value of an object, with
specializations for scalar types.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
2026-04-24 18:07:57 +03:00
Laurent Pinchart
3a387cc81d libcamera: yaml_parser: Replace getList() with get() specializations
The YamlObject class has two member function templates to get values:
the get() function gets a scalar value, while the getList() function
gets a vector of scalar values.

As get() is a function template, we can provide specializations for
vector types. This makes the code more systematic, and therefore more
readable. Replace all getList() occurrences, and drop the getList()
function.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
2026-04-24 18:07:53 +03:00
Laurent Pinchart
56e679ee09 libcamera: yaml_parser: Rename Getter to Accessor
In preparation for support to set the value of a YamlObject, rename the
Getter structure to Accessor. The structure will be extended with a
set() function.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>
2026-04-24 18:07:50 +03:00
Laurent Pinchart
c6aace4467 libcamera: yaml_parser: Rename Container to ValueContainer
The YamlObject class defines two private types, Container and
ListContainer. The format is an alias to std::vector<Value>, and is used
to store child elements. The latter hasn't been used since commit
38987e165c ("libcamera: yaml_parser: Preserve order of items in
dictionary").

To prepare for upcoming reworks that will use the name 'Container' as a
template parameter, rename Container to ValueContainer for clarity, and
drop the unused ListContainer type.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>
2026-04-24 18:07:48 +03:00
Laurent Pinchart
01f5db9559 libcamera: yaml_parser: Use std::make_unique<>
The YamlParser::parse() function constructs a std::unique_ptr<> instance
with a manual call to operator new. Replace it with std::make_unique<>.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>
2026-04-24 18:07:44 +03:00
Jacopo Mondi
178007f8ad libcamera: mali-c55: Fix sensor size computation
The last size in the list is always selected unconditionally because
the current best distance is not updated properly during the search.

Fix the size computation procedure which has an inverted assignment.

Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
Tested-by: Daniel Scally <dan.scally@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2026-04-24 14:38:44 +01:00
Jacopo Mondi
88c636b097 libcamera: mali-c55: Implement capture for memory-to-memory
Plumb in the MaliC55 pipeline handler support for capturing frames
from memory using the CRU.

Introduce a data flow which uses the CRU to feed the ISP through
the IVC.

In detail:

- push incoming request to a pending queue until a buffer from the CRU
  is available
- delay the call to ipa_->fillParams() to the CRU buffer ready event
- once the IPA has computed parameters feed the ISP through the IVC
  with buffers from the CRU, params and statistics
- Handle completion of in-flight requests: in m2m mode buffers are
  queued earlier to the ISP capture devices. If the camera is stopped
  these buffers are returned earlier in error state: complete the
  Request bypassing the IPA operations
- As cancelled Requests might now be completed earlier then IPA events,
  modify the IPA event handler to ignore Requests that have been
  completed already

Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2026-04-24 14:38:27 +01:00
Jacopo Mondi
e14c06c19a libcamera: mali-c55: Do not rely on bufferCount
Do not rely on bufferCount for the allocation of parameters and stats
buffers but add instead kMaliC55BufferCount which is also used to limit
the number of in-flight requests supported by the pipeline handler.

Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
2026-04-24 10:22:48 +02:00
Jacopo Mondi
3b6c01fd94 libcamera: mali-c55: Configure camera in memory-to-memory
Add support for memory-to-memory Camera to the
PipelineHandlerMaliC55::configure() function.

Start by enabling the IVC links, then configure the CRU and
propagate the format to the IVC.

Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
2026-04-24 10:22:48 +02:00
Jacopo Mondi
ac9e8dd724 libcamera: mali-c55: Register memory input camera
Add support to Mali C55 pipeline handler for memory-to-memory camera
mode.

The Mali-C55, as integrated in the Renesas RZ/V2H(P) SoC, is fed with
images saved to memory by the CRU unit and read on behalf of the ISP
by the IVC.

Update the pipeline handler's match() function to search for the CRU
media entity necessary to register a memory input camera. Create and
initialize a CameraData instance for the memory camera use case if a
valid CRU is found and initialize the IVC components used to feed the
ISP with images read from memory.

Do not implement camera configuration for the time being to reuce
the patch size. It will be provided in the following patches.

Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2026-04-24 10:22:48 +02:00
Jacopo Mondi
2dc20dcba0 libcamera: mali-c55: Split TPG and Inline camera handling
In order to prepare to support memory input cameras, split the handling of
the TPG and Inline camera cases.

The Mali C55 pipeline handler uses the entity and subdevice stored in the
CameraData to support both the handling of the TPG and of the Inline (CSI-2
+ sensor) use cases. Adding support for memory cameras by using the CRU unit
would add yet-another special case making the code harder to follow and
more prone to errors.

Split the handling of the TPG and Inline cameras by introducing an
std::variant<> variable and to deflect the functions called on the
camera data to the correct type by using overloaded std::visit<>().

Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
2026-04-24 10:22:48 +02:00
Jacopo Mondi
c52e8cde3e libcamera: utils: Add overloaded visitor helpers
std::visit() allows quite elegant type-matching implementation of the
visitor pattern.

The 'overloaded' type helpers allow to define a hierarchy of overloaded
operator() implementations which can be used by std::visit().

Currently only the Virtual pipeline handler uses this type-matching
implementation of std::visit(). To prepare to add another user in the
Mali C55 pipeline handler move the 'overloaded' helper type to
libcamera::utils for easier re-use.

Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
2026-04-24 10:22:48 +02:00
Daniel Scally
157f03e2df libcamera: mali-c55: Add RZG2LCRU class
Add a class allowing us to control the RZ/G2L Camera Receiver Unit.

The class is named after the media device it handles, which is called
"rzg2l_cru" but the CRU is actually found in other SoCs than the RZ/G2L
one, such as the RZ/V2H(P).

The RZG2LCRU class models the CSI-2 receiver found on those SoCs and
allows to add support for memory-to-memory operations on the RZ/V2H(P)
SoC which integrates a Mali-C55 ISP and a specialized DMA engine named
IVC that feeds images from memory, where the CRU has saved them.

Signed-off-by: Daniel Scally <dan.scally@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2026-04-24 10:22:47 +02:00
Laurent Pinchart
9bd7dc3a69 libcamera: camera_manager: Move IPAManager creation to start() time
The IPAManager is currently instantiated when constructing the
CameraManager constructor, in the CameraManager::Private constructor.
This is the only sizeable object constructed with the CameraManager, all
other components are constructed when starting the manager.

Early construction of the IPAManager isn't wrong per-se, but prevents
accessing the CameraManager from the IPAManager constructor (as the
former isn't fully constructed). It also results in internal objects
constructed in different threads, which isn't an issue at the moment as
none of the objects constructed by the IPAManager are thread-bound, but
could cause issues later. Finally, it prevents influencing the
IPAManager creation with parameters passed to the CameraManager::start()
function once we implement this, which would be useful for applications
to override configuration parameters related to IPA modules.

Move the instantiation of the IPAManager to start time to fix all those
issues.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>
2026-04-24 01:17:49 +03:00
Laurent Pinchart
bcaed97380 test: ipa: ipa_interface: Replace FIFO with pipe
The ipa_interface unit test uses a FIFO to communicate with the vimc IPA
module. FIFOs are named pipes, created in the file system. The path to
the FIFO is hardcoded so that both the unit test and IPA module know
where to locate the file.

If the ipa_interface crashes for any reason, the FIFO will not be
removed, and subsequent usage of the vimc IPA module will hang when
trying to write to the FIFO in the IPA module.

Fix this by replacing the FIFO with a pipe. Pipes are unidirectional
data channels that are represented by a pair of file descriptors,
without any presence in the file system. The write end of the pipe is
passed to the vimc IPA module init() function, and then used the same
way as the FIFO.

While at it, use a std::unique_ptr to manage the notifier in the unit
test instead of manually allocating and deleting the object.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>
2026-04-24 01:17:47 +03:00
Laurent Pinchart
b97c6f2883 test: ipa: ipa_interface: Use IPAManager::createIPA()
The goal of ipa_interface is to unit test the IPA interface. It
currently creates the IPA proxy through the higher level PipelineHandler
class. Use the IPAManager::createIPA() function instead to keep the
focus on the components that were meant to be tested.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>
2026-04-24 01:17:45 +03:00
Laurent Pinchart
db998e618a libcamera: pipeline_handler: Add createIPA() function
IPA proxies are created with a call to IPAManager::createIPA(), which is
a static member function. This requires a complicated dance in the
createIPA() function to retrieve the IPAManager instance through the
camera manager, itself retrieved from the pipeline handler. Simplify the
code by turning IPAManager::createIPA() into a non-static member
function, and providing a wrapper in the PipelineHandler class to keep
instantiation of IPA proxies easy in pipeline handlers.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>
2026-04-24 01:17:42 +03:00
Laurent Pinchart
1e4e158d98 libcamera: Replace plain pointers with std::unique<>
libcamera uses std::unique_ptr<> to simplify life time management of
objects and avoid leaks. For historical reasons there are a fair number
of plain pointers with manual memory management. Replace them with
std::unique_ptr<> when the conversion is simple.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Milan Zamazal <mzamazal@redhat.com>
Reviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
2026-04-24 01:17:37 +03:00
Laurent Pinchart
0f9b73bae2 libcamera: Drop unneeded usage of this pointer
A few unneeded usages of the this pointer to qualify access to class
members have been introduced over time. Drop them.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>
2026-04-24 01:17:33 +03:00
Laurent Pinchart
44da13f85f utils: checkstyle: Add license commit checker
Add a checker, based on the reuse tool, to detect files without a valid
license. The tool is optional, the checker will be skipped when not
available.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
2026-04-24 01:17:31 +03:00
Barnabás Pőcze
63fd8476d8 libcamera: pipeline: rkisp1: Fix buffer queue memleaks
`RkISP1Frames::{clear,destroy}()` always push all buffers from the
`RkISP1FrameInfo` object to the corresponding `available*Buffers_`
queues. This is not entirely correct.

If no dewarper is used, then `availableMainPathBuffers_` is never
consumed, so it will grow with each request. Fix it by only queueing
the buffer if `RkISP1CameraData::usesDewarper_`.

Additionally, in raw capture mode, no parameter or statistics buffers are
used, so those queues will be filled up with `nullptr`s without limit.
Fix that by only queueing them if they are not null.

Fixes: c8f63760e5 ("pipeline: rkisp1: Support raw Bayer capture at runtime")
Fixes: 12b553d691 ("libcamera: rkisp1: Plumb the dw100 dewarper as V4L2M2M converter")
Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>
2026-04-23 14:10:05 +02:00
Laurent Pinchart
ee6e0bf926 tuning: Handle macbeth_ref.pgm license through REUSE.toml
Despite the file starting with a text header, the reuse tool considers
macbeth_ref.pgm as a binary, and doesn't parse it to look for SPDX tags.
Handle it through REUSE.toml instead.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2026-04-23 12:28:35 +01:00
Barnabás Pőcze
4e85ce87f1 libcamera: software_isp: debayer_egl: Remove unnecessary declarations
These functions are not defined, so remove them.

Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Bryan O'Donoghue <bod.linux@nxsw.ie>
2026-04-23 12:30:24 +02:00
Barnabás Pőcze
c88b6e259c libcamera: software_isp: debayer: Add missing override
Add the missing `override` specifiers in the derived classes of `Debayer`,
so that the compiler can ensure that the functions in the derived classes
really override the functions in the base class.

Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Bryan O'Donoghue <bod.linux@nxsw.ie>
2026-04-23 12:30:16 +02:00
Gianfranco Mariotti
b4ca5e6ff8 libcamera: egl: Remove eGLImage::image_
This member stores an egl image handle, but currently there is no need for it
since the image handle is only really used in `createDMABufTexture2D()`.
(`destroyDMABufTexture()` is an unused function.)

So remove the member (and the unused function), and instead destroy the image
immediately after calling `glEGLImageTargetTexture2DOES()`. The texture will
keep a reference to the image, so this is safe to do. In fact, this solves
an issue, specifically, the egl images were never destroyed, and continuously
leaked during streaming.

Fixes: f520b29fe9 ("libcamera: software_isp: debayer_egl: Add an eGL Debayer class")
Closes: https://gitlab.freedesktop.org/camera/libcamera/-/work_items/322
Signed-off-by: Gianfranco Mariotti <gianfranco.mariotti94@gmail.com>
Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2026-04-23 12:30:03 +02:00
Laurent Pinchart
3ca844bd94 meson: Use <version> header for C++ library version check
The ciso646 header has been removed in C++20. Use the version header
instead.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
2026-04-20 01:27:31 +03:00
Laurent Pinchart
cfa7520a22 Documentation: Update to C++20
libcamera has switched to C++20, update the coding style documentation
that still mentions C++17.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
2026-04-20 01:27:30 +03:00
Laurent Pinchart
6c40aa5a20 utils: update-kernel-headers: Fix destination path
The update-kernel-headers.sh script copies all headers to include/linux/
without creating subdirectories. This behaviour was correct until the
addition of linux/media/v4l2-isp.h, which should be copied to
include/linux/media/v4l2-isp.h, not include/linux/v4l2-isp.h. Fix it.

Fixes: ee8f88fc64 ("include: linux: Add v4l2-isp.h")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
2026-04-20 01:27:29 +03:00
Laurent Pinchart
5785d9649f meson: Print missing application options in summary
The recently added application options (DNG output support, KMS and SDL2
outputs for cam, and JPEG support for cam) are not printed in the
summary. This makes it more difficult to quickly assess the
configuration when those options are set to the 'auto' value. Add them
to the summary, and move all application configuration options to a
dedicated section of the summary to improve readability.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2026-04-20 01:27:25 +03:00
Laurent Pinchart
89b1b7617c meson: Print soft ISP boolean options as YES/NO
All boolean options in libcamera other than the soft ISP options are
printed as YES/NO (with colours when supported by the terminal). Extend
this to the soft ISP options for consistency.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
2026-04-20 01:27:24 +03:00
Laurent Pinchart
57f5ee99ba include: linux: Convert drm_fourcc.h to use SPDX
drm_fourcc.h is the last file in libcamera to miss machine-parseable
license information. A patch to convert it to SPDX license identifiers
has been submitted to the kernel. Until it gets merged, apply the change
locally.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
2026-04-20 01:27:23 +03:00
Laurent Pinchart
2c5834f6d5 libcamera: rpi: Add missing SPDX headers
Multiple files in the Raspberry Pi pipeline handler and IPA module are
missing SPDX headers. Add them with the following licenses:

- For code and documentation, use the BSD-2-Clause license, as for the
  rest of the Raspberry Pi code.

- For the example pipeline handler configuration files, use the CC0-1.0
  license to facilitate their usage.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
2026-04-20 01:27:22 +03:00
Laurent Pinchart
f6f7bf0afa libcamera: Add missing SPDX headers
Multiple files in libcamera are missing SPDX headers. Add them with the
following licenses:

- CC-BY-SA-4.0 for documentation

- CC0-1.0 for build system, development tool configuration files and
  TODO lists, as we consider them non-copyrightable, and for example
  configuration files to facilitate their use

- BSD-2-Clause for a file copied from the Raspberry Pi tuning tool (and
  add the corresponding copyright information)

While at it, add a missing blank line to
src/libcamera/pipeline/virtual/README.md.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
2026-04-20 01:27:21 +03:00
Laurent Pinchart
d268ecec00 utils: ipc: extract-docs: Work around reuse tool problem
The reuse tool fails to lint the extract-docs.py file because it
considers the 'SPDX-License-Identifier' string in a regex as a malformed
license identifier. Work around the issue by adding parentheses in the
regular expression, which doesn't affect the behaviour of the regex
matching but prevents the reuse tool from seeing the line.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
2026-04-20 01:27:18 +03:00
Laurent Pinchart
05a4b531c2 reuse: Add missing files to REUSE.toml
The skipping.svg image and the Raspberry Pi 5 tuning files are missing.
Add them.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
2026-04-20 01:27:16 +03:00
Laurent Pinchart
3647ac93ee reuse: Drop unnecessary entry from REUSE.toml
The Documentation/camera-sensor-model.rst file contains an SPDX license
identifier. There's no need to list it in REUSE.toml. Drop it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
2026-04-20 01:27:13 +03:00
Laurent Pinchart
09886912f8 reuse: Update file paths in REUSE.toml
Multiple files listed in REUSE.toml have moved within the repository
without any update to the REUSE.toml file. Fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
2026-04-20 01:27:11 +03:00
Laurent Pinchart
3c445256bf reuse: Convert to REUSE.toml
Reuse dep5 support is deprecated. Convert to the recommended REUSE.toml.
The change was generated by `reuse convert-dep5`.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
2026-04-20 01:27:09 +03:00
Laurent Pinchart
53b0f26599 subprojects: Add nlohmann_json to .gitignore
libcamera use the nlohmann_json wrap indirectly through libpisp. This
causes the nlohmann_json.wrap being copied to /subprojects at configure
time, and nlohmann_json being downloaded to /nlohmann_json-3.11.2. Add
an entryto .gitignore to cover both.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
2026-04-20 01:27:06 +03:00
Laurent Pinchart
b225b2874f libcamera: software_isp: Move GPU TODO items to TODO.md
There's no need to store GPU-specific TODO items in a separate file,
that clutters the software_isp directory. Move them from gpuisp-todo.txt
to TODO.md.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
2026-04-20 01:27:04 +03:00
Laurent Pinchart
56334ef5c6 libcamera: software_isp: Convert TODO list to markdown
To prepare for merging the two software ISP TODO lists (TODO and
gpuisp-todo.txt), convert the TODO file to markdown.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
2026-04-20 01:26:59 +03:00
David Plowman
0eddf9dc01 gstreamer: Add sensor-config property
The sensor-config property may optionally be specified to give the
outputSize and bitDepth of the SensorConfiguration that is applied to
the camera configuration. For example, use

libcamerasrc sensor-config="sensor/config,width=2304,height=1296,depth=10"

to request the 10-bit 2304x1296 mode of a sensor.

All three parameters, width, height and bit depth, must be present, or
it will issue a warning and revert to automatic mode selection (as if
there were no sensor-config at all).

If a mode is requested that doesn't exist then camera configuration
will fail and the pipeline won't start.

As future-proofing, the SensorConfiguration's binning, increment and
analog-crop parameters may be specified, though libcamera currently
ignores them.

Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Closes: https://gitlab.freedesktop.org/camera/libcamera/-/issues/300
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Tested-by: Fabien Danieau <fabien.danieau@pollen-robotics.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2026-04-17 09:25:19 +01:00
Kieran Bingham
8e5eedc851 cam: Add option to report libcamera version
The cam tool is our swiss army knife for interogating libcamera.

A frequently needed piece of information is to determine what version of
libcamera is installed or being run on a system.

This information is available in the debug logs of libcamera when a
CameraManager is instantiated. However without actually starting the
CameraManager this information is not presented.

Add an option to 'cam' to allow it to report the version.  Whilst this
is the version from the 'cam' command, it directly gets the version of
the libcamera library to which cam is linked.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2026-04-17 09:05:10 +01:00
Stefan Klug
2e8a518784 Documentation: Enable treeview generation for doxygen < 1.13.0
Between v2 and the now merged v3 of commit 42d914f20c ("Documentation:
Enable doxygen-awesome-css") the GENERATE_TREEVIEW = YES was dropped
because it defaults to YES according to the doxygen web documentation.
Unfortunately for doxygen < 1.13.0 the default was NO.  Fix the value to
YES so that doxygen-awesome-css works properly even with older versions
of doxygen.

Fixes: 42d914f20c ("Documentation: Enable doxygen-awesome-css")
Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
Tested-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
2026-04-17 10:00:01 +02:00
Kieran Bingham
4b6c47bd66 libcamera: camera: Report the pipeline handler name
Add the Pipeline handler name to the Camera Properties when a camera is
constructed.

This helps support and identify how the camera is being managed
internally and what configuration has taken effect, especially as the
pipeline handler chosen can be impacted by both environment variables
and configuration files.

Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2026-04-03 16:16:20 +01:00
Kieran Bingham
71e188f58f libcamera: properties: Add a pipeline handler name property
Allow the camera properties to report what pipeline handler is managing
the camera device.

Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2026-04-03 16:16:04 +01:00
Kieran Bingham
33dc1f24d9 utils: Introduce libcamera-bug-report
Introduce a script which can be installed into the system to aide
reporting potential camera and media related issues.

The script shall capture system information and store it in a temporary
file - but it remains the users responsibilty to choose to share this
data, and no automatic bug submissions are anticipated.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2026-04-03 16:08:54 +01:00
Hans de Goede
5f770f748c libcamera: Make converter/softISP configure()'s outputCfgs argument really const
The intent of the outputCfgs argument to the configure() function of
converter classes and the softISP is to allow the passed in stream-configs
to not be changed.

But only the vector is const, the reference inside the vector are not
const, which allows modifying the stream-configs as can be seen inside
DebayerEGL::configure() which was using a non const reference outputCfg
helper variable.

Fix this by making the references inside the vector const.

Signed-off-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2026-04-01 14:59:38 +01:00
Naushir Patuck
1500ef15d1 utils: raspberrypi: Add a README.md to the old RPi CTT directory
This points to the GitHub repo hosting the RPi CTT source code and the
python package on pypi.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
[Kieran: Apply cleanup and reformat lines]
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2026-04-01 14:56:22 +01:00
Naushir Patuck
585c5c7a49 utils: raspberrypi: Remove Raspberry Pi CTT from the source tree
This commit removes the Raspberry Pi CTT from the libcamera source tree.
This change is introduced to help a number of RPi users who are not so
faimilar with git and cloing the libcamera tree to run the CTT. The
library is also modularised in python for our users to incorporate into
their own "tuning" applications if needed. Licensing for our CTT tool
remains the same.

The Raspberry Pi CTT now lives at the following repo:
https://github.com/raspberrypi/ctt

and a package is avilable on pypi to install:
https://pypi.org/project/rpi-ctt/

This commit also removes the delayedctrls_parse.py script that has long
since code rotted.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Acked-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
2026-04-01 14:56:22 +01:00