libcamera: software_isp: Make input buffer copying configurable

On some platforms, working directly on the input buffer is very slow due
to disabled caching.  This is why we copy the input buffer into standard
(cached) memory.  This is an unnecessary overhead on platforms with
cached buffers.

Let's make input buffer copying configurable.  The default is still
copying, as its overhead is much lower than contingent operations on
non-cached memory.  Ideally, we should improve this in future to set the
default to non-copying if we can be sure under observable circumstances
that we are working with cached buffers.

Completes software ISP TODO #6.

Signed-off-by: Milan Zamazal <mzamazal@redhat.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
Milan Zamazal
2025-09-12 16:29:11 +02:00
committed by Laurent Pinchart
parent e367cd9c74
commit 6e1d889cfe
5 changed files with 25 additions and 15 deletions
+13
View File
@@ -46,6 +46,8 @@ file structure:
supported_devices:
- driver: # driver name, e.g. `mxc-isi`
software_isp: # true/false
software_isp:
copy_input_buffer: # true/false
Configuration file example
--------------------------
@@ -74,6 +76,8 @@ Configuration file example
supported_devices:
- driver: mxc-isi
software_isp: true
software_isp:
copy_input_buffer: false
List of variables and configuration options
-------------------------------------------
@@ -136,6 +140,15 @@ pipelines.simple.supported_devices.driver, pipelines.simple.supported_devices.so
Example `software_isp` value: ``true``
software_isp.copy_input_buffer
Define whether input buffers should be copied into standard (cached)
memory in software ISP. This is done by default to prevent very slow
processing on platforms with non-cached buffers. It can be set to
false on platforms with cached buffers to avoid an unnecessary
overhead.
Example value: ``false``
Further details
---------------