On Mon, Aug 17, 2020 at 12:24 PM Dafna Hirschfeld <dafna.hirschfeld@xxxxxxxxxxxxx> wrote: > > > > Am 22.07.20 um 14:53 schrieb Tomasz Figa: > > Hi Dafna, > > > > On Fri, Jul 03, 2020 at 07:10:16PM +0200, Dafna Hirschfeld wrote: > >> 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_YCBCR_ENC, > >> V4L2_SUBDEV_MBUS_CODE_CSC_QUANTIZATION V4L2_SUBDEV_MBUS_CODE_CSC_XFER_FUNC, > >> > >> 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 > >> > >> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@xxxxxxxxxxxxx> > >> --- > >> .../media/v4l/subdev-formats.rst | 78 +++++++++++++++++-- > >> .../v4l/vidioc-subdev-enum-mbus-code.rst | 44 ++++++++++- > >> include/uapi/linux/v4l2-mediabus.h | 9 ++- > >> include/uapi/linux/v4l2-subdev.h | 8 +- > >> 4 files changed, 129 insertions(+), 10 deletions(-) > >> > > > > Thank you for the patch. Please see my comments inline. > > > >> diff --git a/Documentation/userspace-api/media/v4l/subdev-formats.rst b/Documentation/userspace-api/media/v4l/subdev-formats.rst > >> index 9a4d61b0d76f..7362ee0b1e96 100644 > >> --- a/Documentation/userspace-api/media/v4l/subdev-formats.rst > >> +++ b/Documentation/userspace-api/media/v4l/subdev-formats.rst > >> @@ -41,32 +41,96 @@ Media Bus Formats > >> :ref:`field-order` for details. > >> * - __u32 > >> - ``colorspace`` > >> - - Image colorspace, from enum > >> - :c:type:`v4l2_colorspace`. See > >> - :ref:`colorspaces` for details. > >> + - Image colorspace, from enum :c:type:`v4l2_colorspace`. > >> + Must be set by the driver for capture streams and by the application > >> + for output streams, see :ref:`colorspaces`. If the application sets the > >> + flag ``V4L2_MBUS_FRAMEFMT_SET_CSC`` then the application can set > >> + this field for a capture stream to request a specific colorspace > > > > What is a "capture stream" in terms of the subdev API? Should this > > perhaps refer to "source pads" instead? > > Hi, yes, I should change it to 'source pad'. I see that for the other colorimetry fields, > the docs for v4l2_mbus_framefmt already writes > "This information supplements the colorspace and must be set by the driver for capture streams and by the application for output streams," > I guess this should also change, Right. Best regards, Tomasz