[libcamera-devel] [PATCH v6 06/10] libcamera: camera_sensor: Do not default 'rotation'
Niklas Söderlund
niklas.soderlund at ragnatech.se
Wed Jan 13 14:03:47 CET 2021
Hi Jacopo,
Thanks for your patch.
On 2021-01-07 10:47:31 +0100, Jacopo Mondi wrote:
> The 'rotation' property is not critical. Only register it if the
> sensor driver reports it.
>
> Reviewed-by: Niklas Söderlund <niklas.soderlund at ragnatech.se
Same :-)
> Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
> ---
> src/libcamera/camera_sensor.cpp | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp
> index 71aa268f3b4f..e9c80c304dd4 100644
> --- a/src/libcamera/camera_sensor.cpp
> +++ b/src/libcamera/camera_sensor.cpp
> @@ -370,13 +370,11 @@ int CameraSensor::initProperties()
> }
> properties_.set(properties::Location, propertyValue);
>
> - /* Camera Rotation: default is 0 degrees. */
> const auto &rotationControl = controls.find(V4L2_CID_CAMERA_SENSOR_ROTATION);
> - if (rotationControl != controls.end())
> + if (rotationControl != controls.end()) {
> propertyValue = rotationControl->second.def().get<int32_t>();
> - else
> - propertyValue = 0;
> - properties_.set(properties::Rotation, propertyValue);
> + properties_.set(properties::Rotation, propertyValue);
> + }
>
> properties_.set(properties::PixelArraySize, pixelArraySize_);
> properties_.set(properties::PixelArrayActiveAreas, { activeArea_ });
> --
> 2.29.2
>
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel at lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel
--
Regards,
Niklas Söderlund
More information about the libcamera-devel
mailing list