drm/atomic: Don't fixup modes that haven't been reset
authorDave Stevenson <dave.stevenson@raspberrypi.com>
Thu, 7 Jan 2021 16:30:55 +0000 (16:30 +0000)
committerPhil Elwell <8911409+pelwell@users.noreply.github.com>
Wed, 21 Apr 2021 10:49:20 +0000 (11:49 +0100)
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
drivers/gpu/drm/drm_atomic_helper.c

index 134d300..1721446 100644 (file)
@@ -430,6 +430,11 @@ mode_fixup(struct drm_atomic_state *state)
                new_crtc_state =
                        drm_atomic_get_new_crtc_state(state, new_conn_state->crtc);
 
+               if (!new_crtc_state->mode_changed &&
+                   !new_crtc_state->connectors_changed) {
+                       continue;
+               }
+
                /*
                 * Each encoder has at most one connector (since we always steal
                 * it away), so we won't call ->mode_fixup twice.