media: v4l2: extend the CSC API to subdevice.
authorDafna Hirschfeld <dafna.hirschfeld@collabora.com>
Thu, 27 Aug 2020 19:46:10 +0000 (21:46 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sat, 26 Sep 2020 08:22:29 +0000 (10:22 +0200)
commit62aacfa9bf93f94f6949338e0c7a2ed4c4bd2c2a
treebba478331fb3590a37bccde2b99af18e62ce99ae
parent2f491463497ad43bc06968a334747c6b6b20fc74
media: v4l2: extend the CSC API to subdevice.

This patch extends the CSC API in video devices to be supported
also on sub-devices. The flag V4L2_MBUS_FRAMEFMT_SET_CSC set by
the application when calling VIDIOC_SUBDEV_S_FMT ioctl.
The flags:

V4L2_SUBDEV_MBUS_CODE_CSC_COLORSPACE,
V4L2_SUBDEV_MBUS_CODE_CSC_XFER_FUNC,
V4L2_SUBDEV_MBUS_CODE_CSC_YCBCR_ENC/V4L2_SUBDEV_MBUS_CODE_CSC_HSV_ENC
V4L2_SUBDEV_MBUS_CODE_CSC_QUANTIZATION

are set by the driver in the VIDIOC_SUBDEV_ENUM_MBUS_CODE ioctl.

New 'flags' fields were added to the structs
v4l2_subdev_mbus_code_enum, v4l2_mbus_framefmt which are borrowed
from the 'reserved' field

The patch also replaces the 'ycbcr_enc' field in
'struct v4l2_mbus_framefmt' with a union that includes 'hsv_enc'

Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Documentation/userspace-api/media/v4l/subdev-formats.rst
Documentation/userspace-api/media/v4l/vidioc-subdev-enum-mbus-code.rst
include/uapi/linux/v4l2-mediabus.h
include/uapi/linux/v4l2-subdev.h