Add new MIPI CCS embedded data media bus formats. Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx> --- .../media/v4l/subdev-formats.rst | 32 +++++++++++++++++++ include/uapi/linux/media-bus-format.h | 10 +++++- 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/Documentation/userspace-api/media/v4l/subdev-formats.rst b/Documentation/userspace-api/media/v4l/subdev-formats.rst index c615da08502d..5d5407738af9 100644 --- a/Documentation/userspace-api/media/v4l/subdev-formats.rst +++ b/Documentation/userspace-api/media/v4l/subdev-formats.rst @@ -8491,3 +8491,35 @@ and finally the bit number in subscript. "p" indicates a padding bit. - p - p - p + +MIPI CCS Embedded Data Formats +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +`MIPI CCS <https://www.mipi.org/specifications/camera-command-set>`_ defines an +metadata format for sensor embedded data, which is used to store the register +configuration used for capturing a given frame. The format is defined in the CCS +specification. + +The bit depth of the CCS embedded data matches the pixel data bit depth +configured on the sensor. The formats used and their corresponding generic +formats are listed in the table below. + +.. flat-table: CCS embedded data mbus formats and corresponding generic formats + :header-rows: 1 + + * - CCS embedded data mbus format + - Generic metadata format + * - MEDIA_BUS_FMT_CCS_EMBEDDED_8 + - MEDIA_BUS_FMT_META_8 + * - MEDIA_BUS_FMT_CCS_EMBEDDED_10 + - MEDIA_BUS_FMT_META_10 + * - MEDIA_BUS_FMT_CCS_EMBEDDED_12 + - MEDIA_BUS_FMT_META_12 + * - MEDIA_BUS_FMT_CCS_EMBEDDED_14 + - MEDIA_BUS_FMT_META_14 + * - MEDIA_BUS_FMT_CCS_EMBEDDED_16 + - MEDIA_BUS_FMT_META_16 + * - MEDIA_BUS_FMT_CCS_EMBEDDED_20 + - MEDIA_BUS_FMT_META_20 + * - MEDIA_BUS_FMT_CCS_EMBEDDED_24 + - MEDIA_BUS_FMT_META_24 diff --git a/include/uapi/linux/media-bus-format.h b/include/uapi/linux/media-bus-format.h index 2486b4178c5f..31d532446b23 100644 --- a/include/uapi/linux/media-bus-format.h +++ b/include/uapi/linux/media-bus-format.h @@ -182,7 +182,15 @@ #define MEDIA_BUS_FMT_META_20 0x8006 #define MEDIA_BUS_FMT_META_24 0x8007 +/* Specific metadata formats. Next is 0x9008. */ +#define MEDIA_BUS_FMT_CCS_EMBEDDED_8 0x9001 +#define MEDIA_BUS_FMT_CCS_EMBEDDED_10 0x9002 +#define MEDIA_BUS_FMT_CCS_EMBEDDED_12 0x9003 +#define MEDIA_BUS_FMT_CCS_EMBEDDED_14 0x9004 +#define MEDIA_BUS_FMT_CCS_EMBEDDED_16 0x9005 +#define MEDIA_BUS_FMT_CCS_EMBEDDED_20 0x9006 +#define MEDIA_BUS_FMT_CCS_EMBEDDED_24 0x9007 + #define MEDIA_BUS_FMT_IS_META(code) \ ((code) & 0xf000 == 0x7000 || (code) & 0xf000 == 0x8000) - #endif /* __LINUX_MEDIA_BUS_FORMAT_H */ -- 2.39.2