From: Hans Verkuil <hverkuil@xs4all.nl>
To: Sakari Ailus <sakari.ailus@linux.intel.com>, linux-media@vger.kernel.org
Cc: laurent.pinchart@ideasonboard.com,
tomi.valkeinen@ideasonboard.com, bingbu.cao@intel.com,
hongju.wang@intel.com
Subject: Re: [RFC 5/7] media: uapi: Add generic serial metadata mbus formats
Date: Thu, 8 Jun 2023 10:46:28 +0200 [thread overview]
Message-ID: <15949b9b-e41d-385a-6488-f51c64483a38@xs4all.nl> (raw)
In-Reply-To: <20230505215257.60704-6-sakari.ailus@linux.intel.com>
On 05/05/2023 23:52, Sakari Ailus wrote:
> Add generic serial metadata mbus formats. These formats describe data
> width and packing but not the content itself. The reason for specifying
> such formats is that the formats as such are fairly device specific but
> they are still handled by CSI-2 receiver drivers that should not be aware
> of device specific formats. What makes generic metadata formats possible
> is that these formats are parsed by software only, after capturing the
> data to system memory.
>
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
> .../media/v4l/subdev-formats.rst | 257 ++++++++++++++++++
> include/uapi/linux/media-bus-format.h | 9 +
> 2 files changed, 266 insertions(+)
>
> diff --git a/Documentation/userspace-api/media/v4l/subdev-formats.rst b/Documentation/userspace-api/media/v4l/subdev-formats.rst
> index a3a35eeed708..1492fff58426 100644
> --- a/Documentation/userspace-api/media/v4l/subdev-formats.rst
> +++ b/Documentation/userspace-api/media/v4l/subdev-formats.rst
> @@ -8234,3 +8234,260 @@ The following table lists the existing metadata formats.
> both sides of the link and the bus format is a fixed
> metadata format that is not configurable from userspace.
> Width and height will be set to 0 for this format.
> +
> +Generic Serial Metadata Formats
> +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> +
> +Generic serial metadata formats are used on serial busses where the actual data
> +content is more or less device specific but the data is transmitted and received
> +by multiple devices that do not process the data in any way, simply writing
> +it to system memory for processing in software at the end of the pipeline.
> +
> +The more specific variant describing the actual data is used on the internal
> +source pad of the originating sub-device.
I'm a bit confused here: on which pads are these generic mbus formats set? And who
sets this?
I.e. the internal source pad has e.g. MEDIA_BUS_FMT_META_FOOBAR_HIST as specific
format. It's routed to a source pad + stream pair for transfer over CSI. Does
that source pad + stream pair use the generic mediabus format?
Regards,
Hans
> +
> +"b" in an array cell signifies a byte of data, followed by the number of byte
> +and finally the bit number in subscript. "p" indicates a padding bit.
> +
> +.. _media-bus-format-generic-meta:
> +
> +.. cssclass: longtable
> +
> +.. flat-table:: Generic Serial Metadata Formats
> + :header-rows: 2
> + :stub-columns: 0
> +
> + * - Identifier
> + - Code
> + -
> + - :cspan:`23` Data organization
> + * -
> + -
> + - Bit
> + - 23
> + - 22
> + - 21
> + - 20
> + - 19
> + - 18
> + - 17
> + - 16
> + - 15
> + - 14
> + - 13
> + - 12
> + - 11
> + - 10
> + - 9
> + - 8
> + - 7
> + - 6
> + - 5
> + - 4
> + - 3
> + - 2
> + - 1
> + - 0
> + * .. _MEDIA-BUS-FMT-META-1X8-8:
> +
> + - MEDIA_BUS_FMT_META_1X8_8
> + - 0x8001
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + - b0\ :sub:`7`
> + - b0\ :sub:`6`
> + - b0\ :sub:`5`
> + - b0\ :sub:`4`
> + - b0\ :sub:`3`
> + - b0\ :sub:`2`
> + - b0\ :sub:`1`
> + - b0\ :sub:`0`
> + * .. _MEDIA-BUS-FMT-META-1X8-10:
> +
> + - MEDIA_BUS_FMT_META_1X8_10
> + - 0x8002
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + - b0\ :sub:`7`
> + - b0\ :sub:`6`
> + - b0\ :sub:`5`
> + - b0\ :sub:`4`
> + - b0\ :sub:`3`
> + - b0\ :sub:`2`
> + - b0\ :sub:`1`
> + - b0\ :sub:`0`
> + - p
> + - p
> + * .. _MEDIA-BUS-FMT-META-1X8-12:
> +
> + - MEDIA_BUS_FMT_META_1X8_12
> + - 0x8003
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + - b0\ :sub:`7`
> + - b0\ :sub:`6`
> + - b0\ :sub:`5`
> + - b0\ :sub:`4`
> + - b0\ :sub:`3`
> + - b0\ :sub:`2`
> + - b0\ :sub:`1`
> + - b0\ :sub:`0`
> + - p
> + - p
> + - p
> + - p
> + * .. _MEDIA-BUS-FMT-META-1X8-14:
> +
> + - MEDIA_BUS_FMT_META_1X8_14
> + - 0x8004
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + - b0\ :sub:`7`
> + - b0\ :sub:`6`
> + - b0\ :sub:`5`
> + - b0\ :sub:`4`
> + - b0\ :sub:`3`
> + - b0\ :sub:`2`
> + - b0\ :sub:`1`
> + - b0\ :sub:`0`
> + - p
> + - p
> + - p
> + - p
> + - p
> + - p
> + * .. _MEDIA-BUS-FMT-META-1X8-16:
> +
> + - MEDIA_BUS_FMT_META_1X8_16
> + - 0x8005
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + -
> + - b0\ :sub:`7`
> + - b0\ :sub:`6`
> + - b0\ :sub:`5`
> + - b0\ :sub:`4`
> + - b0\ :sub:`3`
> + - b0\ :sub:`2`
> + - b0\ :sub:`1`
> + - b0\ :sub:`0`
> + - p
> + - p
> + - p
> + - p
> + - p
> + - p
> + - p
> + - p
> + * .. _MEDIA-BUS-FMT-META-1X8-20:
> +
> + - MEDIA_BUS_FMT_META_1X8_20
> + - 0x8007
> + -
> + -
> + -
> + -
> + -
> + - b0\ :sub:`7`
> + - b0\ :sub:`6`
> + - b0\ :sub:`5`
> + - b0\ :sub:`4`
> + - b0\ :sub:`3`
> + - b0\ :sub:`2`
> + - b0\ :sub:`1`
> + - b0\ :sub:`0`
> + - p
> + - p
> + - p
> + - p
> + - p
> + - p
> + - p
> + - p
> + - p
> + - p
> + - p
> + - p
> + * .. _MEDIA-BUS-FMT-META-1X8-24:
> +
> + - MEDIA_BUS_FMT_META_1X8_24
> + - 0x8009
> + -
> + - b0\ :sub:`7`
> + - b0\ :sub:`6`
> + - b0\ :sub:`5`
> + - b0\ :sub:`4`
> + - b0\ :sub:`3`
> + - b0\ :sub:`2`
> + - b0\ :sub:`1`
> + - b0\ :sub:`0`
> + - p
> + - p
> + - p
> + - p
> + - p
> + - p
> + - p
> + - p
> + - p
> + - p
> + - p
> + - p
> + - p
> + - p
> + - p
> + - p
> diff --git a/include/uapi/linux/media-bus-format.h b/include/uapi/linux/media-bus-format.h
> index a03c543cb072..722463523bbd 100644
> --- a/include/uapi/linux/media-bus-format.h
> +++ b/include/uapi/linux/media-bus-format.h
> @@ -173,4 +173,13 @@
> */
> #define MEDIA_BUS_FMT_METADATA_FIXED 0x7001
>
> +/* Generic line based metadata formats for serial buses. Next is 0x800b. */
> +#define MEDIA_BUS_FMT_META_1X8_8 0x8001
> +#define MEDIA_BUS_FMT_META_1X8_10 0x8002
> +#define MEDIA_BUS_FMT_META_1X8_12 0x8003
> +#define MEDIA_BUS_FMT_META_1X8_14 0x8004
> +#define MEDIA_BUS_FMT_META_1X8_16 0x8005
> +#define MEDIA_BUS_FMT_META_1X8_20 0x8007
> +#define MEDIA_BUS_FMT_META_1X8_24 0x8009
> +
> #endif /* __LINUX_MEDIA_BUS_FORMAT_H */
next prev parent reply other threads:[~2023-06-08 8:46 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-05 21:52 [RFC 0/7] Generic line based metadata support, internal pads Sakari Ailus
2023-05-05 21:52 ` [RFC 1/7] media: mc: Add INTERNAL_SOURCE pad type flag Sakari Ailus
2023-05-08 9:52 ` Tomi Valkeinen
2023-05-08 12:04 ` Sakari Ailus
2023-05-08 12:07 ` Tomi Valkeinen
2023-05-08 12:28 ` Sakari Ailus
2023-06-02 9:18 ` Laurent Pinchart
2023-06-02 15:05 ` Sakari Ailus
2023-06-08 7:59 ` Hans Verkuil
2023-06-09 12:44 ` Sakari Ailus
2023-05-05 21:52 ` [RFC 2/7] media: v4l: subdev: Support INTERNAL_SOURCE pads in routing IOCTLs Sakari Ailus
2023-05-08 10:14 ` Tomi Valkeinen
2023-05-08 12:24 ` Sakari Ailus
2023-06-02 9:44 ` Laurent Pinchart
2023-06-02 9:46 ` Laurent Pinchart
2023-06-02 13:10 ` Sakari Ailus
2023-06-04 14:26 ` Laurent Pinchart
2023-06-05 8:06 ` Sakari Ailus
2023-06-05 8:23 ` Laurent Pinchart
2023-06-08 8:06 ` Hans Verkuil
2023-05-05 21:52 ` [RFC 3/7] media: uapi: v4l: Document source routes Sakari Ailus
2023-05-08 10:33 ` Tomi Valkeinen
2023-05-08 16:26 ` Sakari Ailus
2023-05-08 16:35 ` Tomi Valkeinen
2023-05-08 17:41 ` Sakari Ailus
2023-06-02 9:56 ` Laurent Pinchart
2023-06-02 9:56 ` Laurent Pinchart
2023-06-09 12:55 ` Sakari Ailus
2023-06-08 8:20 ` Hans Verkuil
2023-05-05 21:52 ` [RFC 4/7] media: mc: Check pad flag validity Sakari Ailus
2023-06-02 9:58 ` Laurent Pinchart
2023-06-09 14:41 ` Sakari Ailus
2023-05-05 21:52 ` [RFC 5/7] media: uapi: Add generic serial metadata mbus formats Sakari Ailus
2023-06-02 10:36 ` Laurent Pinchart
2023-06-09 14:45 ` Sakari Ailus
2023-06-08 8:35 ` Hans Verkuil
2023-06-09 13:34 ` Sakari Ailus
2023-06-08 8:46 ` Hans Verkuil [this message]
2023-06-09 13:38 ` Sakari Ailus
2023-05-05 21:52 ` [RFC 6/7] media: uapi: Add generic 8-bit metadata format definitions Sakari Ailus
2023-06-08 8:54 ` Hans Verkuil
2023-06-09 14:27 ` Sakari Ailus
2023-05-05 21:52 ` [RFC 7/7] media: v4l: Support line-based metadata capture Sakari Ailus
2023-06-02 10:50 ` Laurent Pinchart
2023-06-09 13:46 ` Sakari Ailus
2023-06-02 7:54 ` [RFC 0/7] Generic line based metadata support, internal pads Naushir Patuck
2023-06-02 8:46 ` Sakari Ailus
2023-06-02 9:35 ` Naushir Patuck
2023-06-02 12:05 ` Sakari Ailus
2023-06-02 9:12 ` Laurent Pinchart
2023-06-02 9:43 ` Naushir Patuck
2023-06-09 13:20 ` Sakari Ailus
2023-06-09 13:59 ` Dave Stevenson
2023-06-09 14:41 ` Sakari Ailus
2023-08-03 22:36 ` Laurent Pinchart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=15949b9b-e41d-385a-6488-f51c64483a38@xs4all.nl \
--to=hverkuil@xs4all.nl \
--cc=bingbu.cao@intel.com \
--cc=hongju.wang@intel.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=tomi.valkeinen@ideasonboard.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).