From 0637d2d637e7a923e59f7de19e3f032327dd0997 Mon Sep 17 00:00:00 2001 From: Zheng Yang Date: Wed, 28 Jun 2017 10:58:36 +0800 Subject: [PATCH] drm/edid: Clear the old hdmi info before parsing display info The current EDID might not support advanced HDMI 2.0 features. Leaving old hdmi info in the drm_display_info will make display work not okay, when switching display from HDMI 2.0 device to HDMI 1.4 device. Change-Id: Ifaf11a115580a93ec00160d54f0d453842d7b484 Signed-off-by: Zheng Yang --- drivers/gpu/drm/drm_edid.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 615607da389b..3cd00c1a67cf 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -4212,6 +4212,8 @@ static void drm_add_display_info(struct drm_connector *connector, info->max_tmds_clock = 0; info->dvi_dual = false; + memset(&info->hdmi, 0, sizeof(info->hdmi)); + if (edid->revision < 3) return; -- 2.34.1