[PATCH v4 2/9] ipa: rkisp1: Pass parameters buffer format to IPA module
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Tue Aug 27 03:40:36 CEST 2024
The rkisp1 driver supports two formats for the ISP parameters buffer,
the legacy fixed format and the new extensible format. In preparation of
support for the new format, pass the parameters buffer format from the
pipeline handler to the IPA module and store it.
Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi at ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder at ideasonboard.com>
---
Changes since v3:
- Store parameter format in IPASessionConfiguration
---
include/libcamera/ipa/rkisp1.mojom | 1 +
src/ipa/rkisp1/ipa_context.cpp | 5 +++++
src/ipa/rkisp1/ipa_context.h | 1 +
src/ipa/rkisp1/rkisp1.cpp | 2 ++
src/libcamera/pipeline/rkisp1/rkisp1.cpp | 1 +
5 files changed, 10 insertions(+)
diff --git a/include/libcamera/ipa/rkisp1.mojom b/include/libcamera/ipa/rkisp1.mojom
index 1009e970a1b5..585d38572aa2 100644
--- a/include/libcamera/ipa/rkisp1.mojom
+++ b/include/libcamera/ipa/rkisp1.mojom
@@ -11,6 +11,7 @@ import "include/libcamera/ipa/core.mojom";
struct IPAConfigInfo {
libcamera.IPACameraSensorInfo sensorInfo;
libcamera.ControlInfoMap sensorControls;
+ uint32 paramFormat;
};
interface IPARkISP1Interface {
diff --git a/src/ipa/rkisp1/ipa_context.cpp b/src/ipa/rkisp1/ipa_context.cpp
index 9f3f576afcf7..730a55b4465a 100644
--- a/src/ipa/rkisp1/ipa_context.cpp
+++ b/src/ipa/rkisp1/ipa_context.cpp
@@ -105,6 +105,11 @@ namespace libcamera::ipa::rkisp1 {
* \brief Indicates if the camera is configured to capture raw frames
*/
+/**
+ * \var IPASessionConfiguration::paramFormat
+ * \brief The fourcc of the parameters buffers format
+ */
+
/**
* \struct IPAActiveState
* \brief Active state for algorithms
diff --git a/src/ipa/rkisp1/ipa_context.h b/src/ipa/rkisp1/ipa_context.h
index 061efc0c578e..24c4b2471bb4 100644
--- a/src/ipa/rkisp1/ipa_context.h
+++ b/src/ipa/rkisp1/ipa_context.h
@@ -59,6 +59,7 @@ struct IPASessionConfiguration {
} sensor;
bool raw;
+ uint32_t paramFormat;
};
struct IPAActiveState {
diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp
index 23e0826cc335..de2998ab57fe 100644
--- a/src/ipa/rkisp1/rkisp1.cpp
+++ b/src/ipa/rkisp1/rkisp1.cpp
@@ -226,6 +226,8 @@ int IPARkISP1::configure(const IPAConfigInfo &ipaConfig,
context_.activeState = {};
context_.frameContexts.clear();
+ context_.configuration.paramFormat = ipaConfig.paramFormat;
+
const IPACameraSensorInfo &info = ipaConfig.sensorInfo;
const ControlInfo vBlank = sensorControls_.find(V4L2_CID_VBLANK)->second;
context_.configuration.sensor.defVBlank = vBlank.def().get<int32_t>();
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
index eec5bf949bed..1cdb9a44f900 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
@@ -814,6 +814,7 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)
return ret;
ipaConfig.sensorControls = data->sensor_->controls();
+ ipaConfig.paramFormat = paramFormat.fourcc;
ret = data->ipa_->configure(ipaConfig, streamConfig, &data->controlInfo_);
if (ret) {
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list