From: Ville Syrjälä <[email protected]>

If we have to backoff there's no point in going over the mode list again
to mark all the modes as stale. We can defer that until we're ready to
refresh the mode list. Avoids multiple list walks if we have to do the
locking backoff.

Cc: Keith Packard <[email protected]>
Cc: Daniel Vetter <[email protected]>
Signed-off-by: Ville Syrjälä <[email protected]>
---
 drivers/gpu/drm/drm_probe_helper.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/drm_probe_helper.c 
b/drivers/gpu/drm/drm_probe_helper.c
index 527743394150..7dc7e635d7e4 100644
--- a/drivers/gpu/drm/drm_probe_helper.c
+++ b/drivers/gpu/drm/drm_probe_helper.c
@@ -415,10 +415,6 @@ int drm_helper_probe_single_connector_modes(struct 
drm_connector *connector,
        } else
                WARN_ON(ret < 0);
 
-       /* set all old modes to the stale state */
-       list_for_each_entry(mode, &connector->modes, head)
-               mode->status = MODE_STALE;
-
        old_status = connector->status;
 
        if (connector->force) {
@@ -472,6 +468,10 @@ int drm_helper_probe_single_connector_modes(struct 
drm_connector *connector,
 
        dev->mode_config.poll_running = drm_kms_helper_poll;
 
+       /* set all old modes to the stale state */
+       list_for_each_entry(mode, &connector->modes, head)
+               mode->status = MODE_STALE;
+
        if (connector->status == connector_status_disconnected) {
                DRM_DEBUG_KMS("[CONNECTOR:%d:%s] disconnected\n",
                        connector->base.id, connector->name);
-- 
2.13.6

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to