New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
imx219: Recommended V4L2 control 0x009a0922 not supported (V4L2_CID_CAMERA_ORIENTATION) #4500
Comments
Reported as raspberrypi/linux#4500 Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
The driver does support it via the call to The default overlay then defines the rotation - https://github.com/raspberrypi/linux/blob/rpi-5.10.y/arch/arm/boot/dts/overlays/imx219-overlay.dts#L30 On my system:
Odd that it's reported there as 0x009a0923 when you reported 0x009a0922. It's defined in https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/v4l2-controls.h#L995 (mainline) as It looks like your kernel headers are incorrect somehow. |
Thank you for the prompt and comprehensive response.
At least that looks consistent with my system, where
so I'll have to look into libcamera, I guess? |
Yes, check intially that the include/linux/v4l2-controls.h file is sensible. |
I was my fault to put in the title of the issue Now everything seems to be consistent the driver is lacking support for: The question is, could this be added to avoid patching |
Again it comes from device tree via a property named @naushir @davidplowman Presumably this is working for you? It looks to me like V4L2_CID_CAMERA_ORIENTATION is a recommended control, not mandatory. The reset of err at https://git.linuxtv.org/libcamera.git/tree/src/libcamera/camera_sensor.cpp#n269 should mean that validateSensorDriver doesn't fail. It looks to be a dt overlay change being required to add (probably)
to https://github.com/raspberrypi/linux/blob/rpi-5.10.y/arch/arm/boot/dts/overlays/imx219-overlay.dts#L30. |
I do see the following when running on my device:
However, the consequence is the warning message, and apps seem to run fine. Not tried lc-compliance though! |
Also the source code is mentioning https://github.com/libcamera-org/libcamera/blob/bdf04cca086eb72a9e0528ba90a5c53d96e52a01/src/libcamera/camera_sensor.cpp#L188-L189
|
I was just thinking the same. PR incoming. |
#4501 adds the relevant overlay parameters, and fixes up imx290/327, ov9281, and ov7251 to read the relevant properties from DT. |
The V4L2 controls which are optional, recommended, and mandatory report errors if they are not found by CameraSensor::validateSensorDriver(). These errors report hex values for the controls, which can easily lead to confusion and incorrect assumption about which control needs to be investigated. This can be seen occuring already in issues such as [0] and is generally an unfriendly result to report to users in a warning or error message. Adapt the tables of controls to store both the id and name of the controls to report a user friendly message that can ease diagnosis of any CameraSensor validation issues. [0] raspberrypi/linux#4500 Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> --- I'm aware of course of the checkstyle changes suggested on V4L2_CID, but I thought it was better to keep those macros 'scoped' here, and indented accordingly.
On Raspberry Pi 4 with:
dtoverlay=imx219
and camera connected,lc-compliance
is not able to detect support for recommended ioctls and returns with EINVAL effectively preventing any libcamera based software from working:when I temporarily patched
libcamera
sources as following:then it started to work:
To avoid patching
libcamera
specifically forRaspberry Pi
would it be possible to satisfy libcamera sensor driver requirements?The text was updated successfully, but these errors were encountered: