All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Lothar Waßmann" <LW@KARO-electronics.de>
To: David Airlie <airlied@linux.ie>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Cc: "Lothar Waßmann" <LW@KARO-electronics.de>
Subject: [PATCHv2 1/3] drm/imx: imx-ldb: honor 'native-mode' property when selecting video mode from DT
Date: Tue, 24 May 2016 08:31:49 +0200	[thread overview]
Message-ID: <1464071511-16363-2-git-send-email-LW@KARO-electronics.de> (raw)
In-Reply-To: <1464071511-16363-1-git-send-email-LW@KARO-electronics.de>

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

This change does not affect the behaviour of existing platforms, since
they either:
   - have just one display-timings subnode
   - have the native-mode property pointing to the first entry
   - let the bootloader select the appropriate timing

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
---
 drivers/gpu/drm/imx/imx-ldb.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/imx/imx-ldb.c b/drivers/gpu/drm/imx/imx-ldb.c
index a58eee5..b2dc4df 100644
--- a/drivers/gpu/drm/imx/imx-ldb.c
+++ b/drivers/gpu/drm/imx/imx-ldb.c
@@ -25,6 +25,7 @@
 #include <linux/mfd/syscon/imx6q-iomuxc-gpr.h>
 #include <linux/of_device.h>
 #include <linux/of_graph.h>
+#include <video/of_display_timing.h>
 #include <video/of_videomode.h>
 #include <linux/regmap.h>
 #include <linux/videodev2.h>
@@ -600,7 +601,8 @@ static int imx_ldb_bind(struct device *dev, struct device *master, void *data)
 			channel->edid = kmemdup(edidp, channel->edid_len,
 						GFP_KERNEL);
 		} else if (!channel->panel) {
-			ret = of_get_drm_display_mode(child, &channel->mode, 0);
+			ret = of_get_drm_display_mode(child, &channel->mode,
+						OF_USE_NATIVE_MODE);
 			if (!ret)
 				channel->mode_valid = 1;
 		}
-- 
2.1.4

  reply	other threads:[~2016-05-24  6:32 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-20 13:34 [PATCH 0/3] drm/imx: convey the pixelclk-active and de-active flags to the ipu-di driver Lothar Waßmann
2016-05-20 13:34 ` Lothar Waßmann
2016-05-20 13:34 ` Lothar Waßmann
2016-05-20 13:34 ` [PATCH 1/3] drm/imx: imx-ldb: honor 'native-mode' property when selecting video mode from DT Lothar Waßmann
2016-05-20 13:34   ` Lothar Waßmann
2016-05-20 13:34   ` Lothar Waßmann
2016-05-20 13:34 ` [PATCH 2/3] drm/imx: convey the pixelclk-active and de-active flags from DT to the ipu-di driver Lothar Waßmann
2016-05-20 13:34   ` Lothar Waßmann
2016-05-20 13:34   ` Lothar Waßmann
2016-05-20 14:31   ` Philipp Zabel
2016-05-20 14:31     ` Philipp Zabel
2016-05-20 14:31     ` Philipp Zabel
2016-05-20 13:34 ` [PATCH 3/3] drm/imx: remove dead code Lothar Waßmann
2016-05-20 13:34   ` Lothar Waßmann
2016-05-20 13:34   ` Lothar Waßmann
2016-05-24  6:31 ` [PATCHv2 0/3] drm/imx: convey the pixelclk-active and de-active flags from DT to the ipu-di driver Lothar Waßmann
2016-05-24  6:31   ` Lothar Waßmann [this message]
2016-05-24  6:31   ` [PATCHv2 2/3] " Lothar Waßmann
2016-05-24 14:16     ` Philipp Zabel
2016-05-24 14:16       ` Philipp Zabel
2016-05-25  6:11       ` Lothar Waßmann
2016-05-25 10:26         ` Philipp Zabel
2016-05-25 10:26           ` Philipp Zabel
2016-05-24  6:31   ` [PATCHv2 3/3] drm/imx: remove dead code Lothar Waßmann

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=1464071511-16363-2-git-send-email-LW@KARO-electronics.de \
    --to=lw@karo-electronics.de \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=p.zabel@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 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.