MLK-21530: hdmi: set default video mode
authorSandor Yu <Sandor.yu@nxp.com>
Wed, 24 Apr 2019 02:22:44 +0000 (10:22 +0800)
committerSandor Yu <Sandor.yu@nxp.com>
Mon, 6 May 2019 01:45:21 +0000 (09:45 +0800)
Set default video mode when driver probe.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
drivers/gpu/drm/imx/hdp/imx-hdp.c

index 9e9a350..e21c72c 100644 (file)
@@ -1551,6 +1551,10 @@ static int imx_hdp_imx_bind(struct device *dev, struct device *master,
                return ret;
        }
 
+       /* Set default video mode */
+       memcpy(&hdp->video.cur_mode, &edid_cea_modes[g_default_mode],
+                       sizeof(hdp->video.cur_mode));
+
        imx_hdp_call(hdp, pixel_clock_set_rate, &hdp->clks);
 
        imx_hdp_call(hdp, pixel_clock_enable, &hdp->clks);
@@ -1569,7 +1573,7 @@ static int imx_hdp_imx_bind(struct device *dev, struct device *master,
        /* bpp (bits per subpixel) - 8 24bpp, 10 30bpp, 12 36bpp, 16 48bpp */
        /* default set hdmi to 1080p60 mode */
        ret = imx_hdp_call(hdp, phy_init, &hdp->state,
-                          &edid_cea_modes[g_default_mode],
+                          &hdp->video.cur_mode,
                           hdp->format, hdp->bpc);
        if (ret < 0) {
                DRM_ERROR("Failed to initialise HDP PHY\n");