[7/7] pipeline: rkisp1: Add ScalerMaximumCrop property
diff mbox series

Message ID 20241120085753.1993436-8-stefan.klug@ideasonboard.com
State New
Headers show
Series
  • rkisp1: Fix aspect ratio and ScalerCrop
Related show

Commit Message

Stefan Klug Nov. 20, 2024, 8:57 a.m. UTC
The ScalerMaximumCrop property holds the biggest allowed ScalerCrop
value. Add it to the rkisp1.

Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
---
 src/libcamera/pipeline/rkisp1/rkisp1.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
index c2ce38b1c253..647b5754bd55 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
@@ -24,6 +24,7 @@ 
 #include <libcamera/control_ids.h>
 #include <libcamera/formats.h>
 #include <libcamera/framebuffer.h>
+#include <libcamera/property_ids.h>
 #include <libcamera/request.h>
 #include <libcamera/stream.h>
 #include <libcamera/transform.h>
@@ -870,7 +871,7 @@  int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c)
 				 * coordinates.
 				 */
 				dewarperSensorCrop_ = outputCrop.mappedBetween(inputCrop,
-									       ipaConfig.sensorInfo.analogCrop);
+									       sensorInfo.analogCrop);
 			}
 		} else if (hasSelfPath_) {
 			ret = selfPath_.configure(cfg, format);
@@ -1247,6 +1248,7 @@  int PipelineHandlerRkISP1::updateControls(RkISP1CameraData *data)
 		controls[&controls::ScalerCrop] = ControlInfo(min,
 							      max,
 							      max);
+		data->properties_.set(properties::ScalerCropMaximum, max);
 		activeCrop_ = max;
 	}