[PATCH] drm/i915: Assign crtc correctly in load detection.

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Tue Jan 12 03:35:59 PST 2016


drm_atomic_set_crtc_for_connector should be used,
and crtc->primary->crtc is assigned by atomic_commit.

Rely on the helpers for setting this correctly, so
connector_mask gets updated too.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
---
Should this be applied to topic/drm-misc since atomic connector_masks are added there?

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index bc2ec444925e..6b25a90d1e0a 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -10553,7 +10553,9 @@ retry:
 		goto fail;
 	}
 
-	connector_state->crtc = crtc;
+	ret = drm_atomic_set_crtc_for_connector(connector_state, crtc);
+	if (ret)
+		goto fail;
 
 	crtc_state = intel_atomic_get_crtc_state(state, intel_crtc);
 	if (IS_ERR(crtc_state)) {
@@ -10597,7 +10599,6 @@ retry:
 			old->release_fb->funcs->destroy(old->release_fb);
 		goto fail;
 	}
-	crtc->primary->crtc = crtc;
 
 	/* let the connector get through one full cycle before testing */
 	intel_wait_for_vblank(dev, intel_crtc->pipe);



More information about the dri-devel mailing list