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

Daniel Vetter daniel at ffwll.ch
Tue Jan 12 04:34:30 PST 2016


On Tue, Jan 12, 2016 at 12:35:59PM +0100, Maarten Lankhorst wrote:
> 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>

Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> ---
> 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);
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the Intel-gfx mailing list