• Lyude Paul's avatar
    drm/nouveau/kms: Don't change EDID when it hasn't actually changed · f28e32d3
    Lyude Paul authored
    Currently in nouveau_connector_ddc_detect() and
    nouveau_connector_detect_lvds(), we start the connector probing process
    by releasing the previous EDID and informing DRM of the change. However,
    since commit 5186421c ("drm: Introduce epoch counter to
    drm_connector") drm_connector_update_edid_property() actually checks
    whether the new EDID we've specified is different from the previous one,
    and updates the connector's epoch accordingly if it is. But, because we
    always set the EDID to NULL first in nouveau_connector_ddc_detect() and
    nouveau_connector_detect_lvds() we end up making DRM think that the EDID
    changes every single time we do a connector probe - which isn't needed.
    
    So, let's fix this by not clearing the EDID at the start of the
    connector probing process, and instead simply changing or removing it
    once near the end of the probing process. This will help prevent us from
    sending unneeded hotplug events to userspace when nothing has actually
    changed.
    Signed-off-by: default avatarLyude Paul <lyude@redhat.com>
    Reviewed-by: default avatarBen Skeggs <bskeggs@redhat.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20200826182456.322681-19-lyude@redhat.com
    f28e32d3
nouveau_connector.c 41.7 KB