aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/drm_atomic_helper.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index 5b59d5ad7d1c..aac212297b49 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -230,10 +230,12 @@ update_connector_routing(struct drm_atomic_state *state, int conn_idx)
230 } 230 }
231 231
232 connector_state->best_encoder = new_encoder; 232 connector_state->best_encoder = new_encoder;
233 idx = drm_crtc_index(connector_state->crtc); 233 if (connector_state->crtc) {
234 idx = drm_crtc_index(connector_state->crtc);
234 235
235 crtc_state = state->crtc_states[idx]; 236 crtc_state = state->crtc_states[idx];
236 crtc_state->mode_changed = true; 237 crtc_state->mode_changed = true;
238 }
237 239
238 DRM_DEBUG_ATOMIC("[CONNECTOR:%d:%s] using [ENCODER:%d:%s] on [CRTC:%d]\n", 240 DRM_DEBUG_ATOMIC("[CONNECTOR:%d:%s] using [ENCODER:%d:%s] on [CRTC:%d]\n",
239 connector->base.id, 241 connector->base.id,