[libcamera-devel,v2,0/2] Add read-only flag to ControlInfo
mbox series

Message ID 20221202124005.3643-1-naush@raspberrypi.com
Headers show
Series
  • Add read-only flag to ControlInfo
Related show

Message

Naushir Patuck Dec. 2, 2022, 12:40 p.m. UTC
Hi,

This small patch series adds a read-only flag to ControlInfo.  This is used
to test if a control, in particular V4L2_CID_HBLANK, can be written to by
userland.  It replaces the slightly fragile workaround we have right now where
we test if the min and max values of a control are the same to determine if
a control is read-only.

I've only modified the one ControlInfo constructor signature used by the
V4L2Device class to allow this flag to be set, as setting it for a non-v4l2
control probably does not make sense at this point.  If folks think this is
incorrect, please let me know.

Regards,
Naush

Naushir Patuck (2):
  libcamera: controls: Add read-only flag to ControlInfo
  libcamera:camera_sensor, ipa: raspberrypi: Test readOnly() for HBLANK
    control

 include/libcamera/controls.h        |  5 ++++-
 src/ipa/raspberrypi/raspberrypi.cpp | 12 +-----------
 src/libcamera/camera_sensor.cpp     | 14 ++------------
 src/libcamera/controls.cpp          | 17 +++++++++++++----
 src/libcamera/v4l2_device.cpp       | 12 ++++++++----
 5 files changed, 28 insertions(+), 32 deletions(-)