summary refs log tree commit diff
path: root/drivers/gpu/drm/drm_modes.c
diff options
context:
space:
mode:
authorLothar Waßmann <LW@KARO-electronics.de>2016-07-12 15:30:03 +0200
committerPhilipp Zabel <p.zabel@pengutronix.de>2016-08-08 11:44:20 +0200
commitfafc79ef2e9148d0085585b6b71bc7154c14ebb6 (patch)
treefc10a39232083944ec0727f71ac6c16a8e647fcd /drivers/gpu/drm/drm_modes.c
parentd72daa0d75e8fe71368113350254b9da2c64b235 (diff)
downloadlinux-fafc79ef2e9148d0085585b6b71bc7154c14ebb6.tar.gz
drm/imx: convey the pixelclk-active and de-active flags from DT to the ipu-di driver
The 'de-active' and 'pixelclk-active' DT properties are evaluated
by of_parse_display_timing() called from  of_get_drm_display_mode(),
but later lost in the conversion from videomode.flags to
drm_display_mode.flags.
Enhance of_get_drm_display_mode() to also return the bus flags in a
separate variable, so that they can be passed on to the ipu-di
driver.

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Diffstat (limited to 'drivers/gpu/drm/drm_modes.c')
-rw-r--r--drivers/gpu/drm/drm_modes.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
index 51804e5c58b9..15704873fd61 100644
--- a/drivers/gpu/drm/drm_modes.c
+++ b/drivers/gpu/drm/drm_modes.c
@@ -687,7 +687,8 @@ EXPORT_SYMBOL_GPL(drm_bus_flags_from_videomode);
  * 0 on success, a negative errno code when no of videomode node was found.
  */
 int of_get_drm_display_mode(struct device_node *np,
-			    struct drm_display_mode *dmode, int index)
+			    struct drm_display_mode *dmode, u32 *bus_flags,
+			    int index)
 {
 	struct videomode vm;
 	int ret;
@@ -697,6 +698,8 @@ int of_get_drm_display_mode(struct device_node *np,
 		return ret;
 
 	drm_display_mode_from_videomode(&vm, dmode);
+	if (bus_flags)
+		drm_bus_flags_from_videomode(&vm, bus_flags);
 
 	pr_debug("%s: got %dx%d display mode from %s\n",
 		of_node_full_name(np), vm.hactive, vm.vactive, np->name);