aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2016-02-09 07:02:17 -0500
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2016-02-15 09:46:12 -0500
commitfb1a38a92ba8ed98f754aeaf9aa9ea5ea3323a23 (patch)
tree3d47f775c237ac96fa2076fec6ad08cdc2594eea
parent1ffedc0677482398ff9285153ad3c931716269e7 (diff)
drm/i915: Clear shared dpll based on old state, v2.
Atomic resume was preserving the dpll state because it was required for clearing pll state correctly. If we look at the old_crtc_state for pll to clear this is not needed and the hack can be removed. Changes since v1: - Rename dpll variable to old_dpll. (Ville) Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1455022343-15222-1-git-send-email-maarten.lankhorst@linux.intel.com Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
-rw-r--r--drivers/gpu/drm/i915/intel_display.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 836bbdc239b6..a18bd1296ce8 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -13098,8 +13098,6 @@ static void intel_modeset_clear_plls(struct drm_atomic_state *state)
13098 struct drm_device *dev = state->dev; 13098 struct drm_device *dev = state->dev;
13099 struct drm_i915_private *dev_priv = to_i915(dev); 13099 struct drm_i915_private *dev_priv = to_i915(dev);
13100 struct intel_shared_dpll_config *shared_dpll = NULL; 13100 struct intel_shared_dpll_config *shared_dpll = NULL;
13101 struct intel_crtc *intel_crtc;
13102 struct intel_crtc_state *intel_crtc_state;
13103 struct drm_crtc *crtc; 13101 struct drm_crtc *crtc;
13104 struct drm_crtc_state *crtc_state; 13102 struct drm_crtc_state *crtc_state;
13105 int i; 13103 int i;
@@ -13108,21 +13106,21 @@ static void intel_modeset_clear_plls(struct drm_atomic_state *state)
13108 return; 13106 return;
13109 13107
13110 for_each_crtc_in_state(state, crtc, crtc_state, i) { 13108 for_each_crtc_in_state(state, crtc, crtc_state, i) {
13111 int dpll; 13109 struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
13112 13110 int old_dpll = to_intel_crtc_state(crtc->state)->shared_dpll;
13113 intel_crtc = to_intel_crtc(crtc);
13114 intel_crtc_state = to_intel_crtc_state(crtc_state);
13115 dpll = intel_crtc_state->shared_dpll;
13116 13111
13117 if (!needs_modeset(crtc_state) || dpll == DPLL_ID_PRIVATE) 13112 if (!needs_modeset(crtc_state))
13118 continue; 13113 continue;
13119 13114
13120 intel_crtc_state->shared_dpll = DPLL_ID_PRIVATE; 13115 to_intel_crtc_state(crtc_state)->shared_dpll = DPLL_ID_PRIVATE;
13116
13117 if (old_dpll == DPLL_ID_PRIVATE)
13118 continue;
13121 13119
13122 if (!shared_dpll) 13120 if (!shared_dpll)
13123 shared_dpll = intel_atomic_get_shared_dpll_state(state); 13121 shared_dpll = intel_atomic_get_shared_dpll_state(state);
13124 13122
13125 shared_dpll[dpll].crtc_mask &= ~(1 << intel_crtc->pipe); 13123 shared_dpll[old_dpll].crtc_mask &= ~(1 << intel_crtc->pipe);
13126 } 13124 }
13127} 13125}
13128 13126
@@ -15927,9 +15925,6 @@ void intel_display_resume(struct drm_device *dev)
15927 15925
15928 state->acquire_ctx = dev->mode_config.acquire_ctx; 15926 state->acquire_ctx = dev->mode_config.acquire_ctx;
15929 15927
15930 /* preserve complete old state, including dpll */
15931 intel_atomic_get_shared_dpll_state(state);
15932
15933 for_each_crtc(dev, crtc) { 15928 for_each_crtc(dev, crtc) {
15934 struct drm_crtc_state *crtc_state = 15929 struct drm_crtc_state *crtc_state =
15935 drm_atomic_get_crtc_state(state, crtc); 15930 drm_atomic_get_crtc_state(state, crtc);