<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<br>
<p style="margin:0in;font-family:Calibri;font-size:11.0pt">Reviewed-by:
Sivakumar
Thulasimani <a class="moz-txt-link-rfc2396E" href="mailto:sivakumar.thulasimani@intel.com"><sivakumar.thulasimani@intel.com></a><br>
</p>
<br>
<div class="moz-cite-prefix">On 6/29/2015 5:55 PM,
<a class="moz-txt-link-abbreviated" href="mailto:ville.syrjala@linux.intel.com">ville.syrjala@linux.intel.com</a> wrote:<br>
</div>
<blockquote
cite="mid:1435580756-20154-6-git-send-email-ville.syrjala@linux.intel.com"
type="cite">
<pre wrap="">From: Ville Syrjälä <a class="moz-txt-link-rfc2396E" href="mailto:ville.syrjala@linux.intel.com"><ville.syrjala@linux.intel.com></a>
VLV/CHV don't use the DPLL with DSI, so just clear out the DPLL state
from the pipe_config in intel_dsi_get_config(). This avoids spurious
state checker warnings. We already did it this way for DPLL_MD, but do
it for DPLL too.
Toss in a WARN to intel_dsi_pre_enable() to make sure the ref clocks
are enabled however. Supposedly they have some meaning to DSI too.
We now keep the ref clocks always enabled while the disp2d well is
enabled.
Signed-off-by: Ville Syrjälä <a class="moz-txt-link-rfc2396E" href="mailto:ville.syrjala@linux.intel.com"><ville.syrjala@linux.intel.com></a>
---
drivers/gpu/drm/i915/intel_dsi.c | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_dsi.c b/drivers/gpu/drm/i915/intel_dsi.c
index 36e2148..92bb252 100644
--- a/drivers/gpu/drm/i915/intel_dsi.c
+++ b/drivers/gpu/drm/i915/intel_dsi.c
@@ -421,18 +421,12 @@ static void intel_dsi_pre_enable(struct intel_encoder *encoder)
/* Disable DPOunit clock gating, can stall pipe
* and we need DPLL REFA always enabled */
- tmp = I915_READ(DPLL(pipe));
- tmp |= DPLL_REF_CLK_ENABLE_VLV;
- I915_WRITE(DPLL(pipe), tmp);
-
- /* update the hw state for DPLL */
- intel_crtc->config->dpll_hw_state.dpll = DPLL_INTEGRATED_REF_CLK_VLV |
- DPLL_REF_CLK_ENABLE_VLV | DPLL_VGA_MODE_DIS;
-
tmp = I915_READ(DSPCLK_GATE_D);
tmp |= DPOUNIT_CLOCK_GATE_DISABLE;
I915_WRITE(DSPCLK_GATE_D, tmp);
+ WARN_ON((I915_READ(DPLL(pipe)) & DPLL_REF_CLK_ENABLE_VLV) == 0);
+
/* put device in ready state */
intel_dsi_device_ready(encoder);
@@ -635,9 +629,10 @@ static void intel_dsi_get_config(struct intel_encoder *encoder,
DRM_DEBUG_KMS("\n");
/*
- * DPLL_MD is not used in case of DSI, reading will get some default value
- * set dpll_md = 0
+ * DPLL is not used in case of DSI, reading will getsome default value.
+ * Clear the state to keep the state checker happy.
*/
+ pipe_config->dpll_hw_state.dpll = 0;
pipe_config->dpll_hw_state.dpll_md = 0;
pclk = vlv_get_dsi_pclk(encoder, pipe_config->pipe_bpp);
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
regards,
Sivakumar</pre>
</body>
</html>