All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Lisovskiy, Stanislav" <stanislav.lisovskiy@intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Remove the old global state stuff
Date: Wed, 16 Sep 2020 10:44:14 +0300	[thread overview]
Message-ID: <20200916074414.GA1219@intel.com> (raw)
In-Reply-To: <20200902122141.15181-1-ville.syrjala@linux.intel.com>

On Wed, Sep 02, 2020 at 03:21:41PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> 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@linux.intel.com>
> ---
>  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@intel.com>

> 
> 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@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

      parent reply	other threads:[~2020-09-16  7:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-02 12:21 [Intel-gfx] [PATCH] drm/i915: Remove the old global state stuff Ville Syrjala
2020-09-02 12:47 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for " Patchwork
2020-09-10 22:54 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Remove the old global state stuff (rev2) Patchwork
2020-09-11  0:35 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2020-09-16  7:44 ` Lisovskiy, Stanislav [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200916074414.GA1219@intel.com \
    --to=stanislav.lisovskiy@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ville.syrjala@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.