drm/i915/glk: Implement WaDDIIOTimeout
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Wed, 22 Feb 2017 06:34:29 +0000 (08:34 +0200)
committerAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Mon, 27 Feb 2017 07:08:16 +0000 (09:08 +0200)
Implement WaDDIIOTimeout to avoid a timeout when enabling the DDI IO
power domains.

Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170222063431.10060-5-ander.conselvan.de.oliveira@intel.com
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/intel_pm.c

index 0a6fdb024b8621c4ae74caebee91ecd8f34c6dce..c2472ea762dacb6cebbdc43ec6e9071983a34e6d 100644 (file)
@@ -2787,6 +2787,12 @@ intel_info(const struct drm_i915_private *dev_priv)
 #define IS_KBL_REVID(dev_priv, since, until) \
        (IS_KABYLAKE(dev_priv) && IS_REVID(dev_priv, since, until))
 
+#define GLK_REVID_A0           0x0
+#define GLK_REVID_A1           0x1
+
+#define IS_GLK_REVID(dev_priv, since, until) \
+       (IS_GEMINILAKE(dev_priv) && IS_REVID(dev_priv, since, until))
+
 /*
  * The genX designation typically refers to the render engine, so render
  * capability related checks should use IS_GEN, while display and other checks
index ad666933a88d79b2efddf92dda4de2c6d5b52bc8..bdce90084d43c18773293b95094c12f934092e7d 100644 (file)
@@ -6479,6 +6479,11 @@ enum {
 #define CHICKEN_PAR2_1         _MMIO(0x42090)
 #define  KVM_CONFIG_CHANGE_NOTIFICATION_SELECT (1 << 14)
 
+#define CHICKEN_MISC_2         _MMIO(0x42084)
+#define  GLK_CL0_PWR_DOWN      (1 << 10)
+#define  GLK_CL1_PWR_DOWN      (1 << 11)
+#define  GLK_CL2_PWR_DOWN      (1 << 12)
+
 #define _CHICKEN_PIPESL_1_A    0x420b0
 #define _CHICKEN_PIPESL_1_B    0x420b4
 #define  HSW_FBCQ_DIS                  (1 << 22)
index 169c4908ad5bc40b93cb24fb2b8891554019aea5..b38707efb62099a861d553956e47cbe5e6474b60 100644 (file)
@@ -114,6 +114,16 @@ static void glk_init_clock_gating(struct drm_i915_private *dev_priv)
         */
        I915_WRITE(GEN9_CLKGATE_DIS_0, I915_READ(GEN9_CLKGATE_DIS_0) |
                   PWM1_GATING_DIS | PWM2_GATING_DIS);
+
+       /* WaDDIIOTimeout:glk */
+       if (IS_GLK_REVID(dev_priv, 0, GLK_REVID_A1)) {
+               u32 val = I915_READ(CHICKEN_MISC_2);
+               val &= ~(GLK_CL0_PWR_DOWN |
+                        GLK_CL1_PWR_DOWN |
+                        GLK_CL2_PWR_DOWN);
+               I915_WRITE(CHICKEN_MISC_2, val);
+       }
+
 }
 
 static void i915_pineview_get_mem_freq(struct drm_i915_private *dev_priv)