[libcamera-devel,v3,2/3] libcamera: ipu3: Move ipa configuration from start() to configure()
diff mbox series

Message ID 20210316144711.40778-3-jeanmichel.hautbois@ideasonboard.com
State Accepted
Headers show
Series
  • Prepare IPU3 pipeline to pass BDS to IPA
Related show

Commit Message

Jean-Michel Hautbois March 16, 2021, 2:47 p.m. UTC
IPA was configured after all the pipeline devices were started,
including IPA itself...
Move it at the end of configure() call.

Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
---
 src/libcamera/pipeline/ipu3/ipu3.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Patch
diff mbox series

diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
index 65657dcc..174c1dd8 100644
--- a/src/libcamera/pipeline/ipu3/ipu3.cpp
+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
@@ -631,6 +631,10 @@  int PipelineHandlerIPU3::configure(Camera *camera, CameraConfiguration *c)
 		return ret;
 	}
 
+	std::map<uint32_t, ControlInfoMap> entityControls;
+	entityControls.emplace(0, data->cio2_.sensor()->controls());
+	data->ipa_->configure(entityControls);
+
 	return 0;
 }
 
@@ -715,7 +719,6 @@  int PipelineHandlerIPU3::freeBuffers(Camera *camera)
 
 int PipelineHandlerIPU3::start(Camera *camera, [[maybe_unused]] const ControlList *controls)
 {
-	std::map<uint32_t, ControlInfoMap> entityControls;
 	IPU3CameraData *data = cameraData(camera);
 	CIO2Device *cio2 = &data->cio2_;
 	ImgUDevice *imgu = data->imgu_;
@@ -742,9 +745,6 @@  int PipelineHandlerIPU3::start(Camera *camera, [[maybe_unused]] const ControlLis
 	if (ret)
 		goto error;
 
-	entityControls.emplace(0, data->cio2_.sensor()->controls());
-	data->ipa_->configure(entityControls);
-
 	return 0;
 
 error: