Hi Sakari, Thank you for the patch. On Tue, Apr 16, 2024 at 10:33:02PM +0300, Sakari Ailus wrote: > Document which routes are available for the CCS driver (source) sub-device > and what configuration are possible. > > Also update copyright. > > Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx> > --- > .../userspace-api/media/drivers/ccs.rst | 38 ++++++++++++++++++- > .../media/v4l/subdev-formats.rst | 2 + > 2 files changed, 39 insertions(+), 1 deletion(-) > > diff --git a/Documentation/userspace-api/media/drivers/ccs.rst b/Documentation/userspace-api/media/drivers/ccs.rst > index 03015b33d5ab..53890ac54dab 100644 > --- a/Documentation/userspace-api/media/drivers/ccs.rst > +++ b/Documentation/userspace-api/media/drivers/ccs.rst > @@ -111,4 +111,40 @@ than in the centre. > Shading correction needs to be enabled for luminance correction level to have an > effect. > > -**Copyright** |copy| 2020 Intel Corporation > +.. _media-ccs-routes: > + > +Routes > +------ > + > +The CCS driver implements one or two :ref:`routes <subdev-routing>` in > +its source sub-device (scaler sub-device if exists for the device, otherwise s/if exists/if it exists/ > +binner) depending on whether the sensor supports embedded data. (All CCS > +compliant sensors do but the CCS driver supports preceding standards that did > +not require embedded data support, too.) > + > +The first route of the CCS source sub-device is for pixel data (sink pad > +0/stream 0 -> source pad 1/stream 0) and the second one is for embedded data > +(internal sink pad 2/stream 0 -> source pad 1/stream 1). > + > +Embedded data > +~~~~~~~~~~~~~ > + > +MIPI CCS supports generation of camera sensor embedded data. The media bus code > +used for this format on the internal sink pad is > +:ref:`MEDIA_BUS_FMT_CCS_EMBEDDDED <MEDIA-BUS-FMT-CCS-EMBEDDED>`. > + > +The bit depth of the CCS pixel data affects how the sensor will output the > +embedded data, adding padding to align with CSI-2 bus :ref:`Data Units > +<media-glossary-data-unit>` for that particular bit depth. This is indicated by > +the generic metadata format on the sensor's source sub-device's source pad. That's a bit hard to parse, maybe "on the source pad of the sensor's source sub-device" ? > + > +Devices supporting embedded data for bit depths greater than or equal to 16 may > +support more dense packing or legacy single metadata byte per data unit, or both > +of these. The supported embedded data formats can be enumerated and configured > +on stream 1 of the source pad (1) of the CCS source sub-device. > + > +The use of the denser packing results in embedded data lines being longer than > +the pixel data in data units since the data units are smaller. In bytes the > +embedded data lines are still not longer than the image data lines. > + > +**Copyright** |copy| 2020, 2023 Intel Corporation 2024 ? Reviewed-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx> > diff --git a/Documentation/userspace-api/media/v4l/subdev-formats.rst b/Documentation/userspace-api/media/v4l/subdev-formats.rst > index fa181ce8f48c..a04756092238 100644 > --- a/Documentation/userspace-api/media/v4l/subdev-formats.rst > +++ b/Documentation/userspace-api/media/v4l/subdev-formats.rst > @@ -8594,3 +8594,5 @@ levels above. > This mbus code are only used for "2-byte simplified tagged data format" (code > 0xa) but their use may be extended further in the future, to cover other CCS > embedded data format codes. > + > +Also see :ref:`CCS driver documentation <media-ccs-routes>`. -- Regards, Laurent Pinchart