[libcamera-devel,v3,3/4] libcamera: pipeline: ipu3: Get and set VCM information
diff mbox series

Message ID 20220426055830.8999-4-hpa@redhat.com
State New
Headers show
Series
  • Enabling AF algorithm to get the VCM attributes from the device driver
Related show

Commit Message

Kate Hsuan April 26, 2022, 5:58 a.m. UTC
The VCM step value is stored in ConfigInfo if lens exists.

Signed-off-by: Kate Hsuan<hpa@redhat.com>
---
 src/libcamera/pipeline/ipu3/ipu3.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
index fd989e61..f5cd2173 100644
--- a/src/libcamera/pipeline/ipu3/ipu3.cpp
+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
@@ -665,8 +665,10 @@  int PipelineHandlerIPU3::configure(Camera *camera, CameraConfiguration *c)
 	configInfo.sensorControls = data->cio2_.sensor()->controls();
 
 	CameraLens *lens = data->cio2_.sensor()->focusLens();
-	if (lens)
+	if (lens) {
 		configInfo.lensControls = lens->controls();
+		sensorInfo.maxVcmSteps = lens->getMaxFocusStep();
+	}
 
 	configInfo.sensorInfo = sensorInfo;
 	configInfo.bdsOutputSize = config->imguConfig().bds;