Re: [PATCH v3 09/10] media: Add media bus codes for MIPI CCS embedded data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Sakari,

Thank you for the patch.

On Tue, Aug 08, 2023 at 10:55:37AM +0300, Sakari Ailus wrote:
> 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

s/an$/a/

> +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.

Strictly speaking, the MIPI CCS embedded data format specifies not just
the data packing (insertion of padding bytes) and the data encoding (the
data format byte and the tag codes), but also the register addresses and
values that are reported in the embedded data. Do you envision the media
bus formats defined here as being applicable to sensors that use the
same packing and encoding as CCS, but different registers, or only to
fully compliant CCS sensors ?

> +
> +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 */

-- 
Regards,

Laurent Pinchart



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux