[libcamera-devel] [PATCH 1/2] libcamera: camera_sensor: Print warning when orientation is unknown

Niklas Söderlund niklas.soderlund at ragnatech.se
Fri Feb 19 15:36:19 CET 2021


Hi Paul,

Thanks for your patch.

On 2021-02-19 19:45:43 +0900, Paul Elder wrote:
> Print a warining when the orientation of a sensor is unknown. The
> location property is still defaulted to external.
> 
> Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
> ---
>  src/libcamera/camera_sensor.cpp | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp
> index c9e8d49b..397df266 100644
> --- a/src/libcamera/camera_sensor.cpp
> +++ b/src/libcamera/camera_sensor.cpp
> @@ -446,6 +446,8 @@ int CameraSensor::initProperties()
>  			break;
>  		}
>  	} else {
> +		LOG(CameraSensor, Warning)
> +			<< "No camera location, setting to External";

I think we should mimic validateSensorDriver() here to really push for 
that this should be fixed.

    ret = subdev_->getSelection(pad_, V4L2_SEL_TGT_CROP, &rect);
    if (ret) {
	    LOG(CameraSensor, Warning)
		    << "Failed to retrieve the sensor crop rectangle";
	    err = -EINVAL;
    }

    if (err) {
	    LOG(CameraSensor, Warning)
		    << "The sensor kernel driver needs to be fixed";
	    LOG(CameraSensor, Warning)
		    << "See Documentation/sensor_driver_requirements.rst in the libcamera sources for more information";
    }

>  		propertyValue = properties::CameraLocationExternal;
>  	}
>  	properties_.set(properties::Location, propertyValue);
> -- 
> 2.27.0
> 
> _______________________________________________
> 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