All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomasz Stanislawski <t.stanislaws@samsung.com>
To: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: linux-media@vger.kernel.org, mchehab@redhat.com,
	laurent.pinchart@ideasonboard.com, g.liakhovetski@gmx.de,
	sakari.ailus@iki.fi, m.szyprowski@samsung.com,
	riverful.kim@samsung.com, sw0312.kim@samsung.com,
	Kyungmin Park <kyungmin.park@samsung.com>
Subject: Re: [RFC/PATCH v1 1/3] v4l: Add new framesamples field to struct v4l2_mbus_framefmt
Date: Tue, 22 Nov 2011 12:07:38 +0100	[thread overview]
Message-ID: <4ECB827A.7020405@samsung.com> (raw)
In-Reply-To: <1321955740-24452-2-git-send-email-s.nawrocki@samsung.com>

Hi

On 11/22/2011 10:55 AM, Sylwester Nawrocki wrote:
> The purpose of the new field is to allow the video pipeline elements to
> negotiate memory buffer size for compressed data frames, where the buffer
> size cannot be derived from pixel width and height and the pixel code.
>
> For VIDIOC_SUBDEV_S_FMT and VIDIOC_SUBDEV_G_FMT ioctls, the framesamples
> parameter should be calculated by the driver from pixel width, height,
> color format and other parameters if required and returned to the caller.
> This applies to compressed data formats only.
>
> The application should propagate the framesamples value, whatever returned
> at the first sub-device within a data pipeline, i.e. at the pipeline's data
> source.
>
> For compressed data formats the host drivers should internally validate
> the framesamples parameter values before streaming is enabled, to make sure
> the memory buffer size requirements are satisfied along the pipeline.
>
> Signed-off-by: Sylwester Nawrocki<s.nawrocki@samsung.com>
> Signed-off-by: Kyungmin Park<kyungmin.park@samsung.com>
> ---
>   Documentation/DocBook/media/v4l/subdev-formats.xml |    7 ++++++-
>   include/linux/v4l2-mediabus.h                      |    4 +++-
>   2 files changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/DocBook/media/v4l/subdev-formats.xml b/Documentation/DocBook/media/v4l/subdev-formats.xml
> index 49c532e..d0827b4 100644
> --- a/Documentation/DocBook/media/v4l/subdev-formats.xml
> +++ b/Documentation/DocBook/media/v4l/subdev-formats.xml
> @@ -35,7 +35,12 @@
>   	</row>
>   	<row>
>   	<entry>__u32</entry>
> -	<entry><structfield>reserved</structfield>[7]</entry>
> +	<entry><structfield>framesamples</structfield></entry>

Why you do not use name sizeimage?
It is used in struct v4l2_plane_pix_format and struct v4l2_pix_format?

Should old drivers be modified to update this field?

Best regards,
Tomasz Stanislawski

> +	<entry>Number of data samples on media bus per frame.</entry>
> +	</row>
> +	<row>
> +	<entry>__u32</entry>
> +	<entry><structfield>reserved</structfield>[6]</entry>
>   	<entry>Reserved for future extensions. Applications and drivers must
>   	  set the array to zero.</entry>
>   	</row>
> diff --git a/include/linux/v4l2-mediabus.h b/include/linux/v4l2-mediabus.h
> index 5ea7f75..ce776e8 100644
> --- a/include/linux/v4l2-mediabus.h
> +++ b/include/linux/v4l2-mediabus.h
> @@ -101,6 +101,7 @@ enum v4l2_mbus_pixelcode {
>    * @code:	data format code (from enum v4l2_mbus_pixelcode)
>    * @field:	used interlacing type (from enum v4l2_field)
>    * @colorspace:	colorspace of the data (from enum v4l2_colorspace)
> + * @framesamples: number of data samples per frame
>    */
>   struct v4l2_mbus_framefmt {
>   	__u32			width;
> @@ -108,7 +109,8 @@ struct v4l2_mbus_framefmt {
>   	__u32			code;
>   	__u32			field;
>   	__u32			colorspace;
> -	__u32			reserved[7];
> +	__u32			framesamples;
> +	__u32			reserved[6];
>   };
>
>   #endif


  parent reply	other threads:[~2011-11-22 11:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-22  9:55 [RFC] v4l: Compressed data formats on the video bus Sylwester Nawrocki
2011-11-22  9:55 ` [RFC/PATCH v1 1/3] v4l: Add new framesamples field to struct v4l2_mbus_framefmt Sylwester Nawrocki
2011-11-22 10:48   ` Hans Verkuil
2011-11-22 11:06     ` Sylwester Nawrocki
2011-11-22 11:07   ` Tomasz Stanislawski [this message]
2011-11-22 11:54     ` Sylwester Nawrocki
2011-11-22  9:55 ` [RFC/PATCH v1 2/3] m5mols: Add buffer size configuration support for compressed data Sylwester Nawrocki
2011-11-22  9:55 ` [RFC/PATCH v1 3/3] s5p-fimc: Add support for media bus framesamples parameter Sylwester Nawrocki

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=4ECB827A.7020405@samsung.com \
    --to=t.stanislaws@samsung.com \
    --cc=g.liakhovetski@gmx.de \
    --cc=kyungmin.park@samsung.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=mchehab@redhat.com \
    --cc=riverful.kim@samsung.com \
    --cc=s.nawrocki@samsung.com \
    --cc=sakari.ailus@iki.fi \
    --cc=sw0312.kim@samsung.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.