[libcamera-devel] [PATCH v3 2/4] pipeline: ipa: raspberrypi: Tidy-ups after IPAInterface changes

Naushir Patuck naush at raspberrypi.com
Thu Feb 18 13:48:22 CET 2021


This commit addresses a couple of tidy-ups after the IPAInterface
rework:
- Rename ConfigStaggeredWrite -> ConfigSensorParams
- Rename setIsp -> setIspControls

There is no functional change in this commit.

Signed-off-by: Naushir Patuck <naush at raspberrypi.com>
Reviewed-by: Paul Elder <paul.elder at ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
---
 include/libcamera/ipa/raspberrypi.mojom            |  8 ++++----
 src/ipa/raspberrypi/raspberrypi.cpp                |  8 ++++----
 src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 12 ++++++------
 3 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/include/libcamera/ipa/raspberrypi.mojom b/include/libcamera/ipa/raspberrypi.mojom
index bab19a946e18..9c05cc68cceb 100644
--- a/include/libcamera/ipa/raspberrypi.mojom
+++ b/include/libcamera/ipa/raspberrypi.mojom
@@ -16,7 +16,7 @@ enum BufferMask {
 const uint32 MaxLsGridSize = 0x8000;
 
 enum ConfigOutputParameters {
-	ConfigStaggeredWrite = 0x01,
+	ConfigSensorParams = 0x01,
 };
 
 struct SensorConfig {
@@ -27,8 +27,8 @@ struct SensorConfig {
 };
 
 struct ISPConfig {
-	uint32 embeddedbufferId;
-	uint32 bayerbufferId;
+	uint32 embeddedBufferId;
+	uint32 bayerBufferId;
 };
 
 struct ConfigInput {
@@ -126,6 +126,6 @@ interface IPARPiEventInterface {
 	statsMetadataComplete(uint32 bufferId, ControlList controls);
 	runIsp(uint32 bufferId);
 	embeddedComplete(uint32 bufferId);
-	setIsp(ControlList controls);
+	setIspControls(ControlList controls);
 	setDelayedControls(ControlList controls);
 };
diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp
index 81a3195c82e9..974f4ec63058 100644
--- a/src/ipa/raspberrypi/raspberrypi.cpp
+++ b/src/ipa/raspberrypi/raspberrypi.cpp
@@ -344,7 +344,7 @@ void IPARPi::configure(const CameraSensorInfo &sensorInfo,
 		helper_->GetDelays(exposureDelay, gainDelay);
 		sensorMetadata = helper_->SensorEmbeddedDataPresent();
 
-		result->params |= ipa::rpi::ConfigStaggeredWrite;
+		result->params |= ipa::rpi::ConfigSensorParams;
 		result->sensorConfig.gainDelay = gainDelay;
 		result->sensorConfig.exposureDelay = exposureDelay;
 		result->sensorConfig.vblank = exposureDelay;
@@ -447,11 +447,11 @@ void IPARPi::signalIspPrepare(const ipa::rpi::ISPConfig &data)
 	 * avoid running the control algos for a few frames in case
 	 * they are "unreliable".
 	 */
-	prepareISP(data.embeddedbufferId);
+	prepareISP(data.embeddedBufferId);
 	frameCount_++;
 
 	/* Ready to push the input buffer into the ISP. */
-	runIsp.emit(data.bayerbufferId & ipa::rpi::MaskID);
+	runIsp.emit(data.bayerBufferId & ipa::rpi::MaskID);
 }
 
 void IPARPi::reportMetadata()
@@ -968,7 +968,7 @@ void IPARPi::prepareISP(unsigned int bufferId)
 			applyDPC(dpcStatus, ctrls);
 
 		if (!ctrls.empty())
-			setIsp.emit(ctrls);
+			setIspControls.emit(ctrls);
 	}
 }
 
diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
index 75d57c2a2ffd..aac285b44748 100644
--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
@@ -152,7 +152,7 @@ public:
 	void statsMetadataComplete(uint32_t bufferId, const ControlList &controls);
 	void runIsp(uint32_t bufferId);
 	void embeddedComplete(uint32_t bufferId);
-	void setIsp(const ControlList &controls);
+	void setIspControls(const ControlList &controls);
 	void setDelayedControls(const ControlList &controls);
 
 	/* bufferComplete signal handlers. */
@@ -1172,7 +1172,7 @@ int RPiCameraData::loadIPA()
 	ipa_->statsMetadataComplete.connect(this, &RPiCameraData::statsMetadataComplete);
 	ipa_->runIsp.connect(this, &RPiCameraData::runIsp);
 	ipa_->embeddedComplete.connect(this, &RPiCameraData::embeddedComplete);
-	ipa_->setIsp.connect(this, &RPiCameraData::setIsp);
+	ipa_->setIspControls.connect(this, &RPiCameraData::setIspControls);
 	ipa_->setDelayedControls.connect(this, &RPiCameraData::setDelayedControls);
 
 	IPASettings settings(ipa_->configurationFile(sensor_->model() + ".json"));
@@ -1241,7 +1241,7 @@ int RPiCameraData::configureIPA(const CameraConfiguration *config)
 		return -EPIPE;
 	}
 
-	if (result.params & ipa::rpi::ConfigStaggeredWrite) {
+	if (result.params & ipa::rpi::ConfigSensorParams) {
 		/*
 		 * Setup our delayed control writer with the sensor default
 		 * gain and exposure delays.
@@ -1336,7 +1336,7 @@ void RPiCameraData::embeddedComplete(uint32_t bufferId)
 	handleState();
 }
 
-void RPiCameraData::setIsp(const ControlList &controls)
+void RPiCameraData::setIspControls(const ControlList &controls)
 {
 	ControlList ctrls = controls;
 
@@ -1692,8 +1692,8 @@ void RPiCameraData::tryRunPipeline()
 			<< " Embedded buffer id: " << embeddedId;
 
 	ipa::rpi::ISPConfig ispPrepare;
-	ispPrepare.embeddedbufferId = ipa::rpi::MaskEmbeddedData | embeddedId;
-	ispPrepare.bayerbufferId = ipa::rpi::MaskBayerData | bayerId;
+	ispPrepare.embeddedBufferId = ipa::rpi::MaskEmbeddedData | embeddedId;
+	ispPrepare.bayerBufferId = ipa::rpi::MaskBayerData | bayerId;
 	ipa_->signalIspPrepare(ispPrepare);
 }
 
-- 
2.25.1



More information about the libcamera-devel mailing list