]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/i915: Remove the old global state stuff
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 2 Sep 2020 12:21:41 +0000 (15:21 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 17 Sep 2020 17:08:08 +0000 (20:08 +0300)
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>
Link: https://patchwork.freedesktop.org/patch/msgid/20200902122141.15181-1-ville.syrjala@linux.intel.com
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
drivers/gpu/drm/i915/display/intel_atomic.c
drivers/gpu/drm/i915/display/intel_atomic.h
drivers/gpu/drm/i915/display/intel_display.c
drivers/gpu/drm/i915/display/intel_display_types.h

index 630f49b7aa0109955212aaa9c165852fe03858ee..86be032bcf965f522b6801e8a93c63ddc2807b08 100644 (file)
@@ -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;
-}
index 11146292b06f528391c7b40749b6f5ed97034aba..285de07011dcf173dbb04e10deab3e95e095200d 100644 (file)
@@ -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__ */
index 254fbeec562986efdc5e3844e79d165ef4b4cd1a..980f4050aedcbc85853953ebddb05e538b166742 100644 (file)
@@ -14649,16 +14649,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);
@@ -15770,14 +15762,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)
@@ -15853,12 +15837,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);
 
index fcf5d3f20945d52c211a509bde752848ca42f6da..3d4bf9b6a0a2ca1f961edfe9a9c0bcd722f34b14 100644 (file)
@@ -483,8 +483,6 @@ struct intel_atomic_state {
 
        bool dpll_set, modeset;
 
-       u8 active_pipes;
-
        struct intel_shared_dpll_state shared_dpll[I915_NUM_PLLS];
 
        /*
@@ -495,11 +493,6 @@ struct intel_atomic_state {
 
        bool rps_interactive;
 
-       /*
-        * active_pipes
-        */
-       bool global_state_changed;
-
        struct i915_sw_fence commit_ready;
 
        struct llist_node freed;