[Intel-gfx] [PATCH 10/10] drm/i915: Only run commit when crtc is active.

Daniel Vetter daniel at ffwll.ch
Thu Sep 10 08:51:56 PDT 2015


On Thu, Sep 10, 2015 at 04:08:05PM +0200, Maarten Lankhorst wrote:
> The crtc->active guards are no longer needed now that all state
> updates are outside the commit.
> 
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>

This looks actually complicated, so I'll punt. Merged most of the other
patches from your series, thanks.
-Daniel
> ---
>  drivers/gpu/drm/i915/intel_display.c | 16 ++++++----------
>  drivers/gpu/drm/i915/intel_sprite.c  |  3 ---
>  2 files changed, 6 insertions(+), 13 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index f41ca558ba3b..dc696ec5f228 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -13135,7 +13135,9 @@ static int intel_atomic_commit(struct drm_device *dev,
>  		if (!modeset)
>  			intel_pre_plane_update(intel_crtc);
>  
> -		drm_atomic_helper_commit_planes_on_crtc(crtc_state);
> +		if (crtc->state->active && (crtc->state->planes_changed ||
> +		    to_intel_crtc_state(crtc->state)->update_pipe))
> +			drm_atomic_helper_commit_planes_on_crtc(crtc_state);
>  
>  		if (put_domains)
>  			modeset_put_power_domains(dev_priv, put_domains);
> @@ -13445,9 +13447,6 @@ intel_commit_primary_plane(struct drm_plane *plane,
>  
>  	crtc = crtc ? crtc : plane->crtc;
>  
> -	if (!crtc->state->active)
> -		return;
> -
>  	dev_priv->display.update_primary_plane(crtc, fb,
>  					       state->src.x1 >> 16,
>  					       state->src.y1 >> 16);
> @@ -13476,8 +13475,7 @@ static void intel_begin_crtc_commit(struct drm_crtc *crtc,
>  		intel_update_watermarks(crtc);
>  
>  	/* Perform vblank evasion around commit operation */
> -	if (crtc->state->active)
> -		intel_pipe_update_start(intel_crtc);
> +	intel_pipe_update_start(intel_crtc);
>  
>  	if (modeset)
>  		return;
> @@ -13493,8 +13491,7 @@ static void intel_finish_crtc_commit(struct drm_crtc *crtc,
>  {
>  	struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
>  
> -	if (crtc->state->active)
> -		intel_pipe_update_end(intel_crtc);
> +	intel_pipe_update_end(intel_crtc);
>  }
>  
>  /**
> @@ -13677,8 +13674,7 @@ intel_commit_cursor_plane(struct drm_plane *plane,
>  	intel_crtc->cursor_bo = obj;
>  
>  update:
> -	if (crtc->state->active)
> -		intel_crtc_update_cursor(crtc, state->visible);
> +	intel_crtc_update_cursor(crtc, state->visible);
>  }
>  
>  static struct drm_plane *intel_cursor_plane_create(struct drm_device *dev,
> diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
> index 9553859ca151..9c13d8156135 100644
> --- a/drivers/gpu/drm/i915/intel_sprite.c
> +++ b/drivers/gpu/drm/i915/intel_sprite.c
> @@ -927,9 +927,6 @@ intel_commit_sprite_plane(struct drm_plane *plane,
>  
>  	crtc = crtc ? crtc : plane->crtc;
>  
> -	if (!crtc->state->active)
> -		return;
> -
>  	if (state->visible) {
>  		intel_plane->update_plane(plane, crtc, fb,
>  					  state->dst.x1, state->dst.y1,
> -- 
> 2.1.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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


More information about the Intel-gfx mailing list