From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: linux-fbdev@vger.kernel.org, devicetree-discuss@lists.ozlabs.org,
dri-devel@lists.freedesktop.org,
Grant Likely <grant.likely@secretlab.ca>,
kernel@pengutronix.de, Mitch Bradley <wmb@firmworks.com>,
Anatolij Gustschin <agust@denx.de>
Subject: Re: [PATCH v2] of: Add videomode helper
Date: Thu, 05 Jul 2012 14:08:07 +0000 [thread overview]
Message-ID: <3714247.L7zNpJpvuy@avalon> (raw)
In-Reply-To: <1341388595-30672-1-git-send-email-s.hauer@pengutronix.de>
Hi Sascha,
Thanks for the patch.
On Wednesday 04 July 2012 09:56:35 Sascha Hauer wrote:
> This patch adds a helper function for parsing videomodes from the
> devicetree. The videomode can be either converted to a struct
> drm_display_mode or a struct fb_videomode.
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>
> changes since v1:
> - use hyphens instead of underscores for property names
>
> .../devicetree/bindings/video/displaymode | 40 ++++++++
> drivers/of/Kconfig | 5 +
> drivers/of/Makefile | 1 +
> drivers/of/of_videomode.c | 108 +++++++++++++++++
> include/linux/of_videomode.h | 19 ++++
> 5 files changed, 173 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/video/displaymode
> create mode 100644 drivers/of/of_videomode.c
> create mode 100644 include/linux/of_videomode.h
>
> diff --git a/Documentation/devicetree/bindings/video/displaymode
> b/Documentation/devicetree/bindings/video/displaymode new file mode 100644
> index 0000000..43cc17d
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/video/displaymode
> @@ -0,0 +1,40 @@
> +videomode bindings
> +=========
> +
> +Required properties:
> + - xres, yres: Display resolution
> + - left-margin, right-margin, hsync-len: Horizontal Display timing
> parameters + in pixels
> + upper-margin, lower-margin, vsync-len: Vertical display timing
> parameters in + lines
> + - clock: displayclock in Hz
> +
> +Optional properties:
> + - width-mm, height-mm: Display dimensions in mm
I've always had mixed feelings about the physical display dimension being part
of the display mode. Those are properties of the panel/display instead of the
mode. Storing them as part of the mode can be convenient, but we then run into
consistency issues (developers have to remember in which display mode
instances the values are available, and in which instances they're set to 0
for instance). If we want to clean this up, this patch would be a good
occasion.
> + - hsync-active-high (bool): Hsync pulse is active high
> + - vsync-active-high (bool): Vsync pulse is active high
> + - interlaced (bool): This is an interlaced mode
> + - doublescan (bool): This is a doublescan mode
> +
> +There are different ways of describing a display mode. The devicetree
> representation +corresponds to the one used by the Linux Framebuffer
> framework described here in +Documentation/fb/framebuffer.txt. This
> representation has been chosen because it's +the only format which does not
> allow for inconsistent parameters.Unlike the Framebuffer +framework the
> devicetree has the clock in Hz instead of ps.
> +
> +Example:
> +
> + display@0 {
> + /* 1920x1080p24 */
> + clock = <52000000>;
> + xres = <1920>;
> + yres = <1080>;
> + left-margin = <25>;
> + right-margin = <25>;
> + hsync-len = <25>;
> + lower-margin = <2>;
> + upper-margin = <2>;
> + vsync-len = <2>;
> + hsync-active-high;
> + };
> +
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2012-07-05 14:08 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-04 7:56 [PATCH v2] of: Add videomode helper Sascha Hauer
2012-07-05 14:08 ` Laurent Pinchart [this message]
2012-07-05 16:50 ` Sascha Hauer
[not found] ` <20120705165029.GU30009-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-08-08 12:41 ` Laurent Pinchart
2012-07-11 8:34 ` Guennadi Liakhovetski
[not found] ` <Pine.LNX.4.64.1207111031200.18999-0199iw4Nj15frtckUFj5Ag@public.gmane.org>
2012-07-11 19:04 ` Sascha Hauer
[not found] ` <20120711190414.GQ30009-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-07-11 20:40 ` Guennadi Liakhovetski
[not found] ` <1341388595-30672-1-git-send-email-s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-07-05 14:51 ` Rob Herring
[not found] ` <4FF5A9FB.7010004-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-07-05 18:39 ` Sascha Hauer
2012-08-02 19:43 ` Stephen Warren
2012-08-02 19:35 ` Stephen Warren
[not found] ` <501AD68C.1000904-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-08-03 7:38 ` Sascha Hauer
[not found] ` <20120803073844.GK1451-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-08-03 18:30 ` Stephen Warren
2012-08-08 12:40 ` Laurent Pinchart
2012-09-13 10:54 ` Tomi Valkeinen
2012-09-13 11:19 ` Sascha Hauer
[not found] ` <20120913111954.GH6180-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2012-09-25 12:59 ` 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=3714247.L7zNpJpvuy@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=agust@denx.de \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=grant.likely@secretlab.ca \
--cc=kernel@pengutronix.de \
--cc=linux-fbdev@vger.kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=wmb@firmworks.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).