]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
drm/i915: Warn if GPLL isn't used on vlv/chv
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 7 Nov 2014 19:33:45 +0000 (21:33 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 17 Nov 2014 14:30:55 +0000 (15:30 +0100)
Our freq<->opcode conversions assume that GPLL is always used.
Apparently that should be the case always, but let's scream if we
ever encounter something different.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Deepak S<deepak.s@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_pm.c

index 1f2441ffa6e4f623381a2809470d1f225496982c..cbf84cc84e55b99dd7462243139d4039fa6b864c 100644 (file)
@@ -5333,6 +5333,9 @@ static void cherryview_enable_rps(struct drm_device *dev)
 
        val = vlv_punit_read(dev_priv, PUNIT_REG_GPU_FREQ_STS);
 
+       /* RPS code assumes GPLL is used */
+       WARN_ONCE((val & GPLLENABLE) == 0, "GPLL not enabled\n");
+
        DRM_DEBUG_DRIVER("GPLL enabled? %s\n", val & GPLLENABLE ? "yes" : "no");
        DRM_DEBUG_DRIVER("GPU status: 0x%08x\n", val);
 
@@ -5413,6 +5416,9 @@ static void valleyview_enable_rps(struct drm_device *dev)
 
        val = vlv_punit_read(dev_priv, PUNIT_REG_GPU_FREQ_STS);
 
+       /* RPS code assumes GPLL is used */
+       WARN_ONCE((val & GPLLENABLE) == 0, "GPLL not enabled\n");
+
        DRM_DEBUG_DRIVER("GPLL enabled? %s\n", val & GPLLENABLE ? "yes" : "no");
        DRM_DEBUG_DRIVER("GPU status: 0x%08x\n", val);