UPSTREAM: drm/edid: Clear old audio latency values before parsing the new EDID
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 28 Sep 2016 13:51:34 +0000 (16:51 +0300)
committerZheng Yang <zhengyang@rock-chips.com>
Tue, 20 Jun 2017 09:22:50 +0000 (17:22 +0800)
Clear out stale audio latency information (potentially from a previous
EDID) before constructing the ELD from the EDID.

Change-Id: I1e770776f031864f597c5cd143c5fc120b313b7d
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1475070703-6435-2-git-send-email-ville.syrjala@linux.intel.com
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
(cherry picked from commit 85c91580555ac610b266260bc7866c51bdc4d205)

drivers/gpu/drm/drm_edid.c

index cb2a0ef5f2b3dbe6d9efb37f864bd39b39dd1be6..06089fc57ef814f7780eb2dccad922f0c18aa660 100644 (file)
@@ -3698,6 +3698,13 @@ void drm_edid_to_eld(struct drm_connector *connector, struct edid *edid)
 
        memset(eld, 0, sizeof(connector->eld));
 
+       connector->latency_present[0] = false;
+       connector->latency_present[1] = false;
+       connector->video_latency[0] = 0;
+       connector->audio_latency[0] = 0;
+       connector->video_latency[1] = 0;
+       connector->audio_latency[1] = 0;
+
        cea = drm_find_cea_extension(edid);
        if (!cea) {
                DRM_DEBUG_KMS("ELD: no CEA Extension found\n");