MLK-18535-10 drm/imx: lcdif: limit the maximum resolution to '1920x1080'
authorFancy Fang <chen.fang@nxp.com>
Wed, 6 Jun 2018 16:10:12 +0000 (00:10 +0800)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
For now, the higher resolution than '1920x1080' is not supported
yet. So limit the 'max_width' and 'max_height' of mode_config
to be 1920 and 1080.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit 0ad9839e59978e2c425f6d7ffa9b4561598625b5)

drivers/gpu/drm/imx/lcdif/lcdif-crtc.c

index 0d76d90..9895544 100644 (file)
@@ -295,6 +295,10 @@ static int lcdif_crtc_bind(struct device *dev, struct device *master,
        if (!drm->mode_config.helper_private)
                drm->mode_config.helper_private = &lcdif_drm_mode_config_helpers;
 
+       /* limit the max width and height */
+       drm->mode_config.max_width  = 1920;
+       drm->mode_config.max_height = 1080;
+
        dev_set_drvdata(dev, lcdif_crtc);
 
        dev_dbg(dev, "%s: lcdif crtc bind end\n", __func__);