From: Zheng Yang Date: Wed, 28 Jun 2017 02:58:36 +0000 (+0800) Subject: drm/edid: Clear the old hdmi info before parsing display info X-Git-Tag: release-20171130_firefly~4^2~287 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0637d2d637e7a923e59f7de19e3f032327dd0997;p=firefly-linux-kernel-4.4.55.git 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 --- 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;