From: p.zabel@pengutronix.de (Philipp Zabel)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] video: Make IPU KMS parse display-timings
Date: Thu, 04 Apr 2013 09:37:31 +0200 [thread overview]
Message-ID: <1365061051.4089.2.camel@pizza.hi.pengutronix.de> (raw)
In-Reply-To: <1365003390-26964-1-git-send-email-rogerio.pimentel@freescale.com>
Am Mittwoch, den 03.04.2013, 12:36 -0300 schrieb Rogerio Pimentel:
> From: Marek Vasut <marex@denx.de>
>
> This patch adds support for parsing of the DT display-timings prop
> to IPU KMS driver.
>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Marek Vasut <marex@denx.de>
> ---
> drivers/staging/imx-drm/parallel-display.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/drivers/staging/imx-drm/parallel-display.c b/drivers/staging/imx-drm/parallel-display.c
> index a8064fc..2a25202 100644
> --- a/drivers/staging/imx-drm/parallel-display.c
> +++ b/drivers/staging/imx-drm/parallel-display.c
> @@ -57,6 +57,7 @@ static void imx_pd_connector_destroy(struct drm_connector *connector)
> static int imx_pd_connector_get_modes(struct drm_connector *connector)
> {
> struct imx_parallel_display *imxpd = con_to_imxpd(connector);
> + struct device_node *np = imxpd->dev->of_node;
> int num_modes = 0;
>
> if (imxpd->edid) {
> @@ -72,6 +73,15 @@ static int imx_pd_connector_get_modes(struct drm_connector *connector)
> num_modes++;
> }
>
> + if (np) {
> + struct drm_display_mode *mode = drm_mode_create(connector->dev);
> + of_get_drm_display_mode(np, &imxpd->mode, 0);
Since the mode is stored in imxpd->mode anyway, of_get_drm_display_mode
could be called once in the probe function instead of every time
get_modes is called.
> + drm_mode_copy(mode, &imxpd->mode);
> + mode->type |= DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED,
> + drm_mode_probed_add(connector, mode);
> + num_modes++;
> + }
> +
> return num_modes;
> }
regards
Philipp
prev parent reply other threads:[~2013-04-04 7:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-03 15:36 [PATCH 1/3] video: Make IPU KMS parse display-timings Rogerio Pimentel
2013-04-03 15:36 ` [PATCH 2/3] ARM: dts: mx53qsb: Add support for parallel display Rogerio Pimentel
2013-04-04 3:42 ` Marek Vasut
2013-04-04 7:40 ` Philipp Zabel
2013-04-03 15:36 ` [PATCH 3/3] ARM: imx_v6_v7_defconfig: enable " Rogerio Pimentel
2013-04-04 7:37 ` Philipp Zabel [this message]
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=1365061051.4089.2.camel@pizza.hi.pengutronix.de \
--to=p.zabel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
/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).