From: "Lothar Waßmann" <LW@KARO-electronics.de>
To: "David Airlie" <airlied@linux.ie>,
"Jean-Christophe Plagniol-Villard" <plagnioj@jcrosoft.com>,
"Philipp Zabel" <p.zabel@pengutronix.de>,
"Tomi Valkeinen" <tomi.valkeinen@ti.com>,
dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org,
linux-kernel@vger.kernel.org,
"Russell King - ARM Linux" <linux@armlinux.org.uk>,
"Sascha Hauer" <kernel@pengutronix.de>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: "Lothar Waßmann" <LW@KARO-electronics.de>
Subject: [PATCH 1/3] drm/imx: imx-ldb: honor 'native-mode' property when selecting video mode from DT
Date: Fri, 20 May 2016 15:34:52 +0200 [thread overview]
Message-ID: <1463751294-24769-2-git-send-email-LW@KARO-electronics.de> (raw)
In-Reply-To: <1463751294-24769-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
next prev parent reply other threads:[~2016-05-20 13:53 UTC|newest]
Thread overview: 12+ 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 [this message]
2016-05-20 13:34 ` [PATCH 2/3] drm/imx: convey the pixelclk-active and de-active flags from DT " Lothar Waßmann
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-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 ` [PATCHv2 1/3] drm/imx: imx-ldb: honor 'native-mode' property when selecting video mode from DT Lothar Waßmann
2016-05-24 6:31 ` [PATCHv2 2/3] drm/imx: convey the pixelclk-active and de-active flags from DT to the ipu-di driver Lothar Waßmann
2016-05-24 14:16 ` Philipp Zabel
2016-05-25 6:11 ` Lothar Waßmann
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=1463751294-24769-2-git-send-email-LW@KARO-electronics.de \
--to=lw@karo-electronics.de \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel@pengutronix.de \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=p.zabel@pengutronix.de \
--cc=plagnioj@jcrosoft.com \
--cc=tomi.valkeinen@ti.com \
--cc=u.kleine-koenig@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;
as well as URLs for NNTP newsgroup(s).