mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Lothar Waßmann" <LW@KARO-electronics.de>
To: linux-arm-kernel@lists.infradead.org,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Fabio Estevam" <fabio.estevam@freescale.com>,
	"Sascha Hauer" <s.hauer@pengutronix.de>,
	"Marek Vasut" <marex@denx.de>,
	"Jiada Wang" <jiada_wang@mentor.com>,
	"Lothar Waßmann" <LW@KARO-electronics.de>,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Cc: "Lothar Waßmann" <LW@KARO-electronics.de>
Subject: [PATCH] imx-drm: parallel-display: honor 'native-mode' property when selecting video mode from DT
Date: Mon, 13 Jan 2014 11:24:33 +0100	[thread overview]
Message-ID: <1389608673-10565-1-git-send-email-LW@KARO-electronics.de> (raw)

This patch allows to select a specific video mode from a list of modes
defined in DT by setting the 'native-mode' property appropriately.

Since all current users of this driver have only one mode defined in
their .dts files, the patch does not change the behaviour of this
driver on the affected platforms.

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
---
 drivers/staging/imx-drm/parallel-display.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/imx-drm/parallel-display.c b/drivers/staging/imx-drm/parallel-display.c
index 24aa9be..351d61d 100644
--- a/drivers/staging/imx-drm/parallel-display.c
+++ b/drivers/staging/imx-drm/parallel-display.c
@@ -23,6 +23,7 @@
 #include <drm/drm_fb_helper.h>
 #include <drm/drm_crtc_helper.h>
 #include <linux/videodev2.h>
+#include <video/of_display_timing.h>
 
 #include "imx-drm.h"
 
@@ -74,7 +75,7 @@ static int imx_pd_connector_get_modes(struct drm_connector *connector)
 
 	if (np) {
 		struct drm_display_mode *mode = drm_mode_create(connector->dev);
-		of_get_drm_display_mode(np, &imxpd->mode, 0);
+		of_get_drm_display_mode(np, &imxpd->mode, OF_USE_NATIVE_MODE);
 		drm_mode_copy(mode, &imxpd->mode);
 		mode->type |= DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED,
 		drm_mode_probed_add(connector, mode);
-- 
1.7.2.5


             reply	other threads:[~2014-01-13 10:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-13 10:24 Lothar Waßmann [this message]
2014-01-13 11:43 ` Marek Vasut

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=1389608673-10565-1-git-send-email-LW@KARO-electronics.de \
    --to=lw@karo-electronics.de \
    --cc=devel@driverdev.osuosl.org \
    --cc=fabio.estevam@freescale.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jiada_wang@mentor.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marex@denx.de \
    --cc=s.hauer@pengutronix.de \
    /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

Powered by JetHome