drm/edid: Clear old audio latency values before parsing the new EDID
authorVille Syrjälä <[email protected]>
Wed, 28 Sep 2016 13:51:34 +0000 (16:51 +0300)
committerDaniel Vetter <[email protected]>
Tue, 4 Oct 2016 06:23:08 +0000 (08:23 +0200)
Clear out stale audio latency information (potentially from a previous
EDID) before constructing the ELD from the EDID.

Signed-off-by: Ville Syrjälä <[email protected]>
Acked-by: Christian König <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
drivers/gpu/drm/drm_edid.c

index 50541324a4ab76fa9e39a79010fe16b50fd57ee4..065896add86eea75b32e20ded444f15e2da79b3b 100644 (file)
@@ -3358,6 +3358,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");