[v4,12/20] pipeline: rkisp1: Add ScalerMaximumCrop property
diff mbox series

Message ID 20241216154124.203650-13-stefan.klug@ideasonboard.com
State Accepted
Headers show
Series
  • rkisp1: Fix aspect ratio and ScalerCrop
Related show

Commit Message

Stefan Klug Dec. 16, 2024, 3:40 p.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>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>

---

Changes in v4:
- Collected tags

Changes in v2:
- Moved one hunk to the correct patch 6/7
---
 src/libcamera/pipeline/rkisp1/rkisp1.cpp | 2 ++
 1 file changed, 2 insertions(+)

Patch
diff mbox series

diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
index ef4aa38478f5..abe2dce0024d 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>
@@ -1248,6 +1249,7 @@  int PipelineHandlerRkISP1::updateControls(RkISP1CameraData *data)
 		controls[&controls::ScalerCrop] = ControlInfo(min,
 							      scalerMaxCrop_,
 							      scalerMaxCrop_);
+		data->properties_.set(properties::ScalerCropMaximum, scalerMaxCrop_);
 		activeCrop_ = scalerMaxCrop_;
 	}