]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
imx-drm: parallel-display: honor 'native-mode' property when selecting video mode...
authorLothar Waßmann <LW@KARO-electronics.de>
Mon, 13 Jan 2014 10:24:33 +0000 (11:24 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Jan 2014 23:14:43 +0000 (15:14 -0800)
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>
Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/imx-drm/parallel-display.c

index 24aa9beedcfb6c7db2bdcdefe201abdbe64c25d6..351d61dede0024003f39c7ace312e552081c79ad 100644 (file)
@@ -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);