summaryrefslogtreecommitdiff
path: root/ipu3.cpp
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2022-10-18 23:55:41 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2022-10-19 12:45:22 +0100
commit4ff236804432937861c3ee151f4001cd1de9fafc (patch)
tree095bb1878bb8e1329a3482fef61b9ae6c2db9f5c /ipu3.cpp
parentbc7ff6e2897f6b80368fb21bd08414125a946c8f (diff)
ipu3: ipa: Update to latest IPACameraSensorInfoHEADmaster
In libcamera commit e5fc0132f80d ("camera_sensor: Add minimum and maximum line length to IPACameraSensorInfo"), the IPU3 IPA interface is updated to provide both minimum and maximum line lengths, replacing the existing lineLength field. Update the ipu3-ipa to use IPACameraSensorInfo::minLineLength instead of IPACameraSensorInfo::lineLength, as logically we will always want to use the fastest sensor readout by default. Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'ipu3.cpp')
-rw-r--r--ipu3.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/ipu3.cpp b/ipu3.cpp
index 7ecd377..f3c65c7 100644
--- a/ipu3.cpp
+++ b/ipu3.cpp
@@ -118,7 +118,7 @@ void IPAIPU3::updateControls(const IPACameraSensorInfo &sensorInfo,
* exposure min, max and default and convert it from lines to
* microseconds.
*/
- double lineDuration = sensorInfo.lineLength / (sensorInfo.pixelRate / 1e6);
+ double lineDuration = sensorInfo.minLineLength / (sensorInfo.pixelRate / 1e6);
const ControlInfo &v4l2Exposure = sensorControls.find(V4L2_CID_EXPOSURE)->second;
int32_t minExposure = v4l2Exposure.min().get<int32_t>() * lineDuration;
int32_t maxExposure = v4l2Exposure.max().get<int32_t>() * lineDuration;