Linux-Media Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 1/1] v4l: Documentation: Serial busses use parallel mbus codes
@ 2019-08-13 11:30 Sakari Ailus
  2019-08-13 12:33 ` Hans Verkuil
  0 siblings, 1 reply; 2+ messages in thread
From: Sakari Ailus @ 2019-08-13 11:30 UTC (permalink / raw)
  To: linux-media; +Cc: hverkuil

When the support for serial busses was introduced in V4L2, it was decided
to use the existing parallel bus media bus pixel codes to describe them.
While this was a practical choice at the time, it necessitates choosing
which one of the many parallel mbus pixel codes to use, for on the serial
busses these formats are effectively all equivalent.

The practice has always been to use the pixel code that describes a bus
that transfers a single sample per clock. Document this.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
 Documentation/media/kapi/csi2.rst               | 7 +++++++
 Documentation/media/uapi/v4l/subdev-formats.rst | 4 ++++
 2 files changed, 11 insertions(+)

diff --git a/Documentation/media/kapi/csi2.rst b/Documentation/media/kapi/csi2.rst
index a7e75e2eba85a..c67736a15c45b 100644
--- a/Documentation/media/kapi/csi2.rst
+++ b/Documentation/media/kapi/csi2.rst
@@ -72,3 +72,10 @@ the transmitter up by using the
 :c:type:`v4l2_subdev_core_ops`->s_power() callback. This may take
 place either indirectly by using :c:func:`v4l2_pipeline_pm_use` or
 directly.
+
+Formats
+-------
+
+The media bus pixel codes document parallel formats. Should the pixel data be
+transported over a serial bus, the media bus pixel code that describes a
+parallel format that transfers a sample on a single clock cycle is used.
diff --git a/Documentation/media/uapi/v4l/subdev-formats.rst b/Documentation/media/uapi/v4l/subdev-formats.rst
index ab1a48a5ae80b..d6b8b86a6daad 100644
--- a/Documentation/media/uapi/v4l/subdev-formats.rst
+++ b/Documentation/media/uapi/v4l/subdev-formats.rst
@@ -85,6 +85,10 @@ formats in memory (a raw Bayer image won't be magically converted to
 JPEG just by storing it to memory), there is no one-to-one
 correspondence between them.
 
+The media bus pixel codes document parallel formats. Should the pixel data be
+transported over a serial bus, the media bus pixel code that describes a
+parallel format that transfers a sample on a single clock cycle is used.
+
 
 Packed RGB Formats
 ^^^^^^^^^^^^^^^^^^
-- 
2.20.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] v4l: Documentation: Serial busses use parallel mbus codes
  2019-08-13 11:30 [PATCH 1/1] v4l: Documentation: Serial busses use parallel mbus codes Sakari Ailus
@ 2019-08-13 12:33 ` Hans Verkuil
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Verkuil @ 2019-08-13 12:33 UTC (permalink / raw)
  To: Sakari Ailus, linux-media

On 8/13/19 1:30 PM, Sakari Ailus wrote:
> When the support for serial busses was introduced in V4L2, it was decided
> to use the existing parallel bus media bus pixel codes to describe them.
> While this was a practical choice at the time, it necessitates choosing
> which one of the many parallel mbus pixel codes to use, for on the serial
> busses these formats are effectively all equivalent.
> 
> The practice has always been to use the pixel code that describes a bus
> that transfers a single sample per clock. Document this.
> 
> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
>  Documentation/media/kapi/csi2.rst               | 7 +++++++
>  Documentation/media/uapi/v4l/subdev-formats.rst | 4 ++++
>  2 files changed, 11 insertions(+)
> 
> diff --git a/Documentation/media/kapi/csi2.rst b/Documentation/media/kapi/csi2.rst
> index a7e75e2eba85a..c67736a15c45b 100644
> --- a/Documentation/media/kapi/csi2.rst
> +++ b/Documentation/media/kapi/csi2.rst
> @@ -72,3 +72,10 @@ the transmitter up by using the
>  :c:type:`v4l2_subdev_core_ops`->s_power() callback. This may take
>  place either indirectly by using :c:func:`v4l2_pipeline_pm_use` or
>  directly.
> +
> +Formats
> +-------
> +
> +The media bus pixel codes document parallel formats. Should the pixel data be
> +transported over a serial bus, the media bus pixel code that describes a
> +parallel format that transfers a sample on a single clock cycle is used.
> diff --git a/Documentation/media/uapi/v4l/subdev-formats.rst b/Documentation/media/uapi/v4l/subdev-formats.rst
> index ab1a48a5ae80b..d6b8b86a6daad 100644
> --- a/Documentation/media/uapi/v4l/subdev-formats.rst
> +++ b/Documentation/media/uapi/v4l/subdev-formats.rst
> @@ -85,6 +85,10 @@ formats in memory (a raw Bayer image won't be magically converted to
>  JPEG just by storing it to memory), there is no one-to-one
>  correspondence between them.
>  
> +The media bus pixel codes document parallel formats. Should the pixel data be
> +transported over a serial bus, the media bus pixel code that describes a
> +parallel format that transfers a sample on a single clock cycle is used.

I would add an example here along the lines of using MEDIA_BUS_FMT_BGR888_1X24
instead of MEDIA_BUS_FMT_BGR888_3X8.

Possibly in csi2.rst as well.

Regards,

	Hans

> +
>  
>  Packed RGB Formats
>  ^^^^^^^^^^^^^^^^^^
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-13 11:30 [PATCH 1/1] v4l: Documentation: Serial busses use parallel mbus codes Sakari Ailus
2019-08-13 12:33 ` Hans Verkuil

Linux-Media Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-media/0 linux-media/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-media linux-media/ https://lore.kernel.org/linux-media \
		linux-media@vger.kernel.org linux-media@archiver.kernel.org
	public-inbox-index linux-media


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-media


AGPL code for this site: git clone https://public-inbox.org/ public-inbox