summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2019-08-02 12:20:33 +0200
committerMax Krummenacher <max.krummenacher@toradex.com>2019-08-06 16:39:58 +0200
commit9279bef4e0d885c281b44a4e4e08c2a16b2907fe (patch)
tree1b3a51d2daf6047940f18535be0727112d8e7418
parent6380f2f850bb46c7b0113531a07a919ac7a8cb4e (diff)
imx-hdp.c: enable scdc at 4k again
Commit "680eee23d001 imx-hdp.c: fix default resolution" changed the default resolution to 1080p. The same mode timings were used to detect a 4k mode and then reconfigure for HDMI2.0 SCDC. Rework the code to correctly detect a 4k mode. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
-rw-r--r--drivers/gpu/drm/imx/hdp/imx-hdp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/imx/hdp/imx-hdp.c b/drivers/gpu/drm/imx/hdp/imx-hdp.c
index f16cf2f04bb8..0fd33ce1f047 100644
--- a/drivers/gpu/drm/imx/hdp/imx-hdp.c
+++ b/drivers/gpu/drm/imx/hdp/imx-hdp.c
@@ -34,6 +34,8 @@
struct drm_display_mode *g_mode;
uint8_t g_default_mode = 2;
+static const uint8_t g_4kp60_mode = 3;
+
static struct drm_display_mode edid_cea_modes[] = {
/* 3 - 720x480@60Hz */
{ DRM_MODE("720x480", DRM_MODE_TYPE_DRIVER, 27000, 720, 736,
@@ -1420,7 +1422,7 @@ static void hotplug_work_func(struct work_struct *work)
/* 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[g_default_mode]))
+ &edid_cea_modes[g_4kp60_mode]))
imx_hdp_mode_setup(hdp, &hdp->video.pre_mode);
DRM_INFO("HDMI/DP Cable Plug In\n");
enable_irq(hdp->irq[HPD_IRQ_OUT]);