MLK-18618-2: hdp: Recovery pre video mode after cable plugin
authorSandor Yu <Sandor.yu@nxp.com>
Fri, 15 Jun 2018 02:41:47 +0000 (10:41 +0800)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
The patch can fix 4Kp60 video mode failed to work afer cable
plugout/in.
DRM driver will not call mode set function if video mode isn't changed.
But for 4Kp60, scrambling and TMDS_Bit_Clock_Ratio should
reconfiguration after cable plugin.

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

index 95a8559..e5babe3 100644 (file)
@@ -992,6 +992,10 @@ static void hotplug_work_func(struct work_struct *work)
 
        if (connector->status == connector_status_connected) {
                /* Cable Connected */
+               /* For HDMI2.0 SCDC should setup again.
+                * So recovery pre video mode if it is 4Kp60 */
+               if (drm_mode_equal(&hdp->video.pre_mode, &edid_cea_modes[3]))
+                       imx_hdp_mode_setup(hdp, &hdp->video.pre_mode);
                DRM_INFO("HDMI/DP Cable Plug In\n");
                enable_irq(hdp->irq[HPD_IRQ_OUT]);
        } else if (connector->status == connector_status_disconnected) {