From: Sylwester Nawrocki <snjw23@gmail.com>
To: Sakari Ailus <sakari.ailus@iki.fi>
Cc: linux-media@vger.kernel.org, laurent.pinchart@ideasonboard.com,
t.stanislaws@samsung.com, dacohen@gmail.com,
andriy.shevchenko@linux.intel.com, g.liakhovetski@gmx.de,
hverkuil@xs4all.nl
Subject: Re: [RFC 1/3] v4l: Add pixel clock to struct v4l2_mbus_framefmt
Date: Thu, 15 Dec 2011 22:46:22 +0100 [thread overview]
Message-ID: <4EEA6AAE.80405@gmail.com> (raw)
In-Reply-To: <1323876147-18107-1-git-send-email-sakari.ailus@iki.fi>
Hi Sakari,
thanks for the patch.
On 12/14/2011 04:22 PM, Sakari Ailus wrote:
> Pixel clock is an essential part of the image data parameters. Add this.
> Together, the current parameters also define the frame rate.
>
> Sensors do not have a concept of frame rate; pixel clock is much more
> meaningful in this context. Also, it is best to combine the pixel clock with
> the other format parameters since there are dependencies between them.
>
> Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
> ---
> Documentation/DocBook/media/v4l/subdev-formats.xml | 9 ++++++++-
> include/linux/v4l2-mediabus.h | 4 +++-
> 2 files changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/DocBook/media/v4l/subdev-formats.xml b/Documentation/DocBook/media/v4l/subdev-formats.xml
> index 49c532e..b4591ef 100644
> --- a/Documentation/DocBook/media/v4l/subdev-formats.xml
> +++ b/Documentation/DocBook/media/v4l/subdev-formats.xml
> @@ -35,7 +35,14 @@
> </row>
> <row>
> <entry>__u32</entry>
> - <entry><structfield>reserved</structfield>[7]</entry>
> + <entry><structfield>pixel_clock</structfield></entry>
> + <entry>Pixel clock in kHz. This clock is the maximum rate at
> + which pixels are transferred on the bus. The pixel_clock
> + field is read-only.</entry>
I searched a couple of datasheets to find out where I could use this pixel_clock
field but didn't find any so far. I haven't tried too hard though ;)
There seems to be more benefits from having the link frequency control.
It might be easy to confuse pixel_clock with the bus clock. The bus clock is
often referred in datasheets as Pixel Clock (PCLK, AFAIU it's described with
link frequency in your RFC). IMHO your original proposal was better, i.e.
using more explicit pixel_rate. Also why it is in kHz ? Doesn't it make more
sense to use bits or pixels per second ?
> + </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..76a0df2 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)
> + * @pixel_clock: pixel clock, in kHz
> */
> struct v4l2_mbus_framefmt {
> __u32 width;
> @@ -108,7 +109,8 @@ struct v4l2_mbus_framefmt {
> __u32 code;
> __u32 field;
> __u32 colorspace;
> - __u32 reserved[7];
> + __u32 pixel_clock;
I'm wondering, whether it is worth to make it 'pixelclock' for consistency
with other fields? Perhaps it would make more sense to have color_space and
pixel_clock.
> + __u32 reserved[6];
> };
>
> #endif
--
Regards,
Sylwester
next prev parent reply other threads:[~2011-12-15 21:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-01 14:30 [RFC] On controlling sensors Sakari Ailus
2011-12-14 15:22 ` [RFC 1/3] v4l: Add pixel clock to struct v4l2_mbus_framefmt Sakari Ailus
2011-12-15 21:46 ` Sylwester Nawrocki [this message]
2011-12-15 22:01 ` Sakari Ailus
2011-12-15 22:19 ` Sylwester Nawrocki
2011-12-16 7:40 ` Sakari Ailus
2011-12-14 15:22 ` [RFC 2/3] v4l: Image source control class Sakari Ailus
2011-12-31 14:42 ` Sylwester Nawrocki
2011-12-31 14:53 ` Sylwester Nawrocki
2012-01-01 12:05 ` Sakari Ailus
2011-12-14 15:22 ` [RFC 3/3] v4l: Add pad op for pipeline validation Sakari Ailus
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=4EEA6AAE.80405@gmail.com \
--to=snjw23@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=dacohen@gmail.com \
--cc=g.liakhovetski@gmx.de \
--cc=hverkuil@xs4all.nl \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=sakari.ailus@iki.fi \
--cc=t.stanislaws@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox