[Intel-gfx] [PATCHv2 3/4] drm/i915/dp: Use legacy get_crtc_encoder in non-atomic paths

Durgadoss R durgadoss.r at intel.com
Mon Feb 1 13:57:52 UTC 2016


This patch makes intel_crtc_get_new_crtc_encoder use get_crtc_encoder
when called from non-atomic paths. This helps when intel_get_shared_dpll
is called from non-atomic context.

Signed-off-by: Durgadoss R <durgadoss.r at intel.com>
---
 drivers/gpu/drm/i915/intel_ddi.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index 1f9a368..3fb9a03 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -707,6 +707,9 @@ intel_ddi_get_crtc_new_encoder(struct intel_crtc_state *crtc_state)
 	int i;
 
 	state = crtc_state->base.state;
+	/* Use get_crtc_encoder() for non-atomic paths */
+	if (!state)
+		return intel_ddi_get_crtc_encoder(crtc_state->base.crtc);
 
 	for_each_connector_in_state(state, connector, connector_state, i) {
 		if (connector_state->crtc != crtc_state->base.crtc)
-- 
1.9.1



More information about the Intel-gfx mailing list