<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On Wednesday 26 August 2015 01:36 AM,
      Animesh Manna wrote:<br>
    </div>
    <blockquote
      cite="mid:1440533169-32265-5-git-send-email-animesh.manna@intel.com"
      type="cite">
      <pre wrap="">While display engine entering into low power state no need to disable
cdclk pll as CSR firmware of dmc will take care. If pll is already
enabled firmware execution sequence will be blocked. This is one
of the criteria for dmc to work properly.

v1: Initial version.

v2: Based on review comment from Daniel added code commnent.

Cc: Daniel Vetter <a class="moz-txt-link-rfc2396E" href="mailto:daniel.vetter@intel.com"><daniel.vetter@intel.com></a>
Cc: Damien Lespiau <a class="moz-txt-link-rfc2396E" href="mailto:damien.lespiau@intel.com"><damien.lespiau@intel.com></a>
Cc: Imre Deak <a class="moz-txt-link-rfc2396E" href="mailto:imre.deak@intel.com"><imre.deak@intel.com></a>
Cc: Sunil Kamath <a class="moz-txt-link-rfc2396E" href="mailto:sunil.kamath@intel.com"><sunil.kamath@intel.com></a>
Signed-off-by: Animesh Manna <a class="moz-txt-link-rfc2396E" href="mailto:animesh.manna@intel.com"><animesh.manna@intel.com></a>
Signed-off-bt: Vathsala Nagaraju <a class="moz-txt-link-rfc2396E" href="mailto:vathsala.nagaraju@intel.com"><vathsala.nagaraju@intel.com></a>
Signed-off-by: Rajneesh Bhardwaj <a class="moz-txt-link-rfc2396E" href="mailto:rajneesh.bhardwaj@intel.com"><rajneesh.bhardwaj@intel.com></a>
---
 drivers/gpu/drm/i915/intel_display.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index f604ce1..b6bef20 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -5687,10 +5687,16 @@ void skl_uninit_cdclk(struct drm_i915_private *dev_priv)
        if (I915_READ(DBUF_CTL) & DBUF_POWER_STATE)
                DRM_ERROR("DBuf power disable timeout\n");
 
-       /* disable DPLL0 */
-       I915_WRITE(LCPLL1_CTL, I915_READ(LCPLL1_CTL) & ~LCPLL_PLL_ENABLE);
-       if (wait_for(!(I915_READ(LCPLL1_CTL) & LCPLL_PLL_LOCK), 1))
-               DRM_ERROR("Couldn't disable DPLL0\n");
+       /*
+        * DMC assumes ownership of LCPLL and will get confused if we touch it.
+        */
+       if (dev_priv->csr.dmc_payload) {
+               /* disable DPLL0 */
+               I915_WRITE(LCPLL1_CTL, I915_READ(LCPLL1_CTL) &
+                                       ~LCPLL_PLL_ENABLE);
+               if (wait_for(!(I915_READ(LCPLL1_CTL) & LCPLL_PLL_LOCK), 1))
+                       DRM_ERROR("Couldn't disable DPLL0\n");
+       }
 
        intel_display_power_put(dev_priv, POWER_DOMAIN_PLLS);
 }
</pre>
    </blockquote>
    <meta http-equiv="CONTENT-TYPE" content="text/html;
      charset=ISO-8859-1">
    <p style="margin-bottom: 0cm">Valid fix and patch is ready for merge
      now.</p>
    <p style="margin-bottom: 0cm">Reviewed-by: A.Sunil Kamath
      <a href="mailto:sunil.kamath@intel.com"><sunil.kamath@intel.com></a></p>
    <title></title>
    <meta name="GENERATOR" content="LibreOffice 3.5 (Linux)">
    <style type="text/css">
        <!--
                @page { margin: 2cm }
                P { margin-bottom: 0.21cm }
                A:link { so-language: zxx }
        -->
        </style>
  </body>
</html>