aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaulo Zanoni <paulo.r.zanoni@intel.com>2014-01-08 08:12:27 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-01-25 11:27:12 -0500
commitba8ee5985099dbd8f01ac5dcc7ad8ddf23056e87 (patch)
treecdf01e59a232613f6380ea16577324bfe0c36fc7
parent4cb1e59ffcbee368f32c37ca5872fd73163c7783 (diff)
drm/i915: fix DDI PLLs HW state readout code
commit 0882dae983707455e97479e5e904e37673517ebc upstream. Properly zero the refcounts and crtc->ddi_pll_set so the previous HW state doesn't affect the result of reading the current HW state. This fixes WARNs about WRPLL refcount if we have an HDMI monitor on HSW and then suspend/resume. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64379 Tested-by: Qingshuai Tian <qingshuai.tian@intel.com> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/gpu/drm/i915/intel_ddi.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index 16e674af4d57..7ce38344e484 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -1193,12 +1193,18 @@ void intel_ddi_setup_hw_pll_state(struct drm_device *dev)
1193 enum pipe pipe; 1193 enum pipe pipe;
1194 struct intel_crtc *intel_crtc; 1194 struct intel_crtc *intel_crtc;
1195 1195
1196 dev_priv->ddi_plls.spll_refcount = 0;
1197 dev_priv->ddi_plls.wrpll1_refcount = 0;
1198 dev_priv->ddi_plls.wrpll2_refcount = 0;
1199
1196 for_each_pipe(pipe) { 1200 for_each_pipe(pipe) {
1197 intel_crtc = 1201 intel_crtc =
1198 to_intel_crtc(dev_priv->pipe_to_crtc_mapping[pipe]); 1202 to_intel_crtc(dev_priv->pipe_to_crtc_mapping[pipe]);
1199 1203
1200 if (!intel_crtc->active) 1204 if (!intel_crtc->active) {
1205 intel_crtc->ddi_pll_sel = PORT_CLK_SEL_NONE;
1201 continue; 1206 continue;
1207 }
1202 1208
1203 intel_crtc->ddi_pll_sel = intel_ddi_get_crtc_pll(dev_priv, 1209 intel_crtc->ddi_pll_sel = intel_ddi_get_crtc_pll(dev_priv,
1204 pipe); 1210 pipe);