Re: [PATCH] drm/i915: Remove the old global state stuff

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 02, 2020 at 03:21:41PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> 
> With the dbuf code mostly converted over to the new global state
> handling we can remove the leftovers of the old global state
> stuff.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/display/intel_atomic.c   | 39 -------------------
>  drivers/gpu/drm/i915/display/intel_atomic.h   |  4 --
>  drivers/gpu/drm/i915/display/intel_display.c  | 22 -----------
>  .../drm/i915/display/intel_display_types.h    |  7 ----
>  4 files changed, 72 deletions(-)

Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@xxxxxxxxx>

> 
> diff --git a/drivers/gpu/drm/i915/display/intel_atomic.c b/drivers/gpu/drm/i915/display/intel_atomic.c
> index 630f49b7aa01..86be032bcf96 100644
> --- a/drivers/gpu/drm/i915/display/intel_atomic.c
> +++ b/drivers/gpu/drm/i915/display/intel_atomic.c
> @@ -527,8 +527,6 @@ void intel_atomic_state_clear(struct drm_atomic_state *s)
>  	intel_atomic_clear_global_state(state);
>  
>  	state->dpll_set = state->modeset = false;
> -	state->global_state_changed = false;
> -	state->active_pipes = 0;
>  }
>  
>  struct intel_crtc_state *
> @@ -542,40 +540,3 @@ intel_atomic_get_crtc_state(struct drm_atomic_state *state,
>  
>  	return to_intel_crtc_state(crtc_state);
>  }
> -
> -int _intel_atomic_lock_global_state(struct intel_atomic_state *state)
> -{
> -	struct drm_i915_private *dev_priv = to_i915(state->base.dev);
> -	struct intel_crtc *crtc;
> -
> -	state->global_state_changed = true;
> -
> -	for_each_intel_crtc(&dev_priv->drm, crtc) {
> -		int ret;
> -
> -		ret = drm_modeset_lock(&crtc->base.mutex,
> -				       state->base.acquire_ctx);
> -		if (ret)
> -			return ret;
> -	}
> -
> -	return 0;
> -}
> -
> -int _intel_atomic_serialize_global_state(struct intel_atomic_state *state)
> -{
> -	struct drm_i915_private *dev_priv = to_i915(state->base.dev);
> -	struct intel_crtc *crtc;
> -
> -	state->global_state_changed = true;
> -
> -	for_each_intel_crtc(&dev_priv->drm, crtc) {
> -		struct intel_crtc_state *crtc_state;
> -
> -		crtc_state = intel_atomic_get_crtc_state(&state->base, crtc);
> -		if (IS_ERR(crtc_state))
> -			return PTR_ERR(crtc_state);
> -	}
> -
> -	return 0;
> -}
> diff --git a/drivers/gpu/drm/i915/display/intel_atomic.h b/drivers/gpu/drm/i915/display/intel_atomic.h
> index 11146292b06f..285de07011dc 100644
> --- a/drivers/gpu/drm/i915/display/intel_atomic.h
> +++ b/drivers/gpu/drm/i915/display/intel_atomic.h
> @@ -56,8 +56,4 @@ int intel_atomic_setup_scalers(struct drm_i915_private *dev_priv,
>  			       struct intel_crtc *intel_crtc,
>  			       struct intel_crtc_state *crtc_state);
>  
> -int _intel_atomic_lock_global_state(struct intel_atomic_state *state);
> -
> -int _intel_atomic_serialize_global_state(struct intel_atomic_state *state);
> -
>  #endif /* __INTEL_ATOMIC_H__ */
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index dc622af8695c..553e4440442a 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -14636,16 +14636,8 @@ u8 intel_calc_active_pipes(struct intel_atomic_state *state,
>  static int intel_modeset_checks(struct intel_atomic_state *state)
>  {
>  	struct drm_i915_private *dev_priv = to_i915(state->base.dev);
> -	int ret;
>  
>  	state->modeset = true;
> -	state->active_pipes = intel_calc_active_pipes(state, dev_priv->active_pipes);
> -
> -	if (state->active_pipes != dev_priv->active_pipes) {
> -		ret = _intel_atomic_lock_global_state(state);
> -		if (ret)
> -			return ret;
> -	}
>  
>  	if (IS_HASWELL(dev_priv))
>  		return hsw_mode_set_planes_workaround(state);
> @@ -15759,14 +15751,6 @@ static void intel_atomic_track_fbs(struct intel_atomic_state *state)
>  					plane->frontbuffer_bit);
>  }
>  
> -static void assert_global_state_locked(struct drm_i915_private *dev_priv)
> -{
> -	struct intel_crtc *crtc;
> -
> -	for_each_intel_crtc(&dev_priv->drm, crtc)
> -		drm_modeset_lock_assert_held(&crtc->base.mutex);
> -}
> -
>  static int intel_atomic_commit(struct drm_device *dev,
>  			       struct drm_atomic_state *_state,
>  			       bool nonblock)
> @@ -15842,12 +15826,6 @@ static int intel_atomic_commit(struct drm_device *dev,
>  	intel_shared_dpll_swap_state(state);
>  	intel_atomic_track_fbs(state);
>  
> -	if (state->global_state_changed) {
> -		assert_global_state_locked(dev_priv);
> -
> -		dev_priv->active_pipes = state->active_pipes;
> -	}
> -
>  	drm_atomic_state_get(&state->base);
>  	INIT_WORK(&state->base.commit_work, intel_atomic_commit_work);
>  
> diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
> index 413b60337a0b..60f66013e513 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_types.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_types.h
> @@ -481,8 +481,6 @@ struct intel_atomic_state {
>  
>  	bool dpll_set, modeset;
>  
> -	u8 active_pipes;
> -
>  	struct intel_shared_dpll_state shared_dpll[I915_NUM_PLLS];
>  
>  	/*
> @@ -493,11 +491,6 @@ struct intel_atomic_state {
>  
>  	bool rps_interactive;
>  
> -	/*
> -	 * active_pipes
> -	 */
> -	bool global_state_changed;
> -
>  	struct i915_sw_fence commit_ready;
>  
>  	struct llist_node freed;
> -- 
> 2.26.2
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux