Message ID | 20201230180120.78407-6-jacopo@jmondi.org |
---|---|
State | Superseded |
Headers | show |
Series |
|
Related | show |
Hi Jacopo, Thank you for the patch. On Wed, Dec 30, 2020 at 07:01:19PM +0100, Jacopo Mondi wrote: > The 'rotation' property is not critical. Only register if the s/register/register it/ > sensor driver reports it. > > Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > src/libcamera/camera_sensor.cpp | 7 +------ > 1 file changed, 1 insertion(+), 6 deletions(-) > > diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp > index 1a316da45511..f7b20b396914 100644 > --- a/src/libcamera/camera_sensor.cpp > +++ b/src/libcamera/camera_sensor.cpp > @@ -379,16 +379,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()) { > propertyValue = rotationControl->second.def().get<int32_t>(); > - } else { > - propertyValue = 0; > - LOG(CameraSensor, Debug) > - << "Rotation property defaulted to 0 degrees"; > + properties_.set(properties::Rotation, propertyValue); > } > - properties_.set(properties::Rotation, propertyValue); > > properties_.set(properties::PixelArraySize, pixelArraySize_); > properties_.set(properties::PixelArrayActiveAreas, { activeAreaSize_ });
diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp index 1a316da45511..f7b20b396914 100644 --- a/src/libcamera/camera_sensor.cpp +++ b/src/libcamera/camera_sensor.cpp @@ -379,16 +379,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()) { propertyValue = rotationControl->second.def().get<int32_t>(); - } else { - propertyValue = 0; - LOG(CameraSensor, Debug) - << "Rotation property defaulted to 0 degrees"; + properties_.set(properties::Rotation, propertyValue); } - properties_.set(properties::Rotation, propertyValue); properties_.set(properties::PixelArraySize, pixelArraySize_); properties_.set(properties::PixelArrayActiveAreas, { activeAreaSize_ });
The 'rotation' property is not critical. Only register if the sensor driver reports it. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> --- src/libcamera/camera_sensor.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)