[libcamera-devel,v2,06/10] ipa: raspberrypi: Add pixel clock rate to the CameraMode structure
diff mbox series

Message ID 20221006131744.5179-7-naush@raspberrypi.com
State Accepted
Headers show
Series
  • Raspberry Pi: Horizontal blanking control
Related show

Commit Message

Naushir Patuck Oct. 6, 2022, 1:17 p.m. UTC
The pixel clock rate will be used in subsequent commits to calculate line
length durations.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Tested-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 src/ipa/raspberrypi/controller/camera_mode.h | 2 ++
 src/ipa/raspberrypi/raspberrypi.cpp          | 1 +
 2 files changed, 3 insertions(+)

Patch
diff mbox series

diff --git a/src/ipa/raspberrypi/controller/camera_mode.h b/src/ipa/raspberrypi/controller/camera_mode.h
index 6bc35b771946..4cd9712e8c19 100644
--- a/src/ipa/raspberrypi/controller/camera_mode.h
+++ b/src/ipa/raspberrypi/controller/camera_mode.h
@@ -46,4 +46,6 @@  struct CameraMode {
 	uint32_t maxFrameLength;
 	/* sensitivity of this mode */
 	double sensitivity;
+	/* pixel clock rate */
+	uint64_t pixelRate;
 };
diff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp
index 9b0ad4361c97..b6289f151677 100644
--- a/src/ipa/raspberrypi/raspberrypi.cpp
+++ b/src/ipa/raspberrypi/raspberrypi.cpp
@@ -331,6 +331,7 @@  void IPARPi::setMode(const IPACameraSensorInfo &sensorInfo)
 	mode_.sensorHeight = sensorInfo.activeAreaSize.height;
 	mode_.cropX = sensorInfo.analogCrop.x;
 	mode_.cropY = sensorInfo.analogCrop.y;
+	mode_.pixelRate = sensorInfo.pixelRate;
 
 	/*
 	 * Calculate scaling parameters. The scale_[xy] factors are determined