drm/i915: Deduplicate register definition for GAMW_ECO_DEV_RW_IA
authorMika Kuoppala <mika.kuoppala@linux.intel.com>
Fri, 9 Nov 2018 14:53:32 +0000 (16:53 +0200)
committerMika Kuoppala <mika.kuoppala@linux.intel.com>
Wed, 14 Nov 2018 09:37:40 +0000 (11:37 +0200)
This got duplicated on introducing icl workarounds.
Fix by using the older definition and moving the wa bit
definition there. No functional changes.

v3: avoid fixes tag, whitespace (Chris)

References: 908ae0517363 ("drm/i915/icl: WaDisCtxReload")
Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20181109145333.10570-1-mika.kuoppala@linux.intel.com
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/intel_workarounds.c

index 16f0d73bb4fe583c8dcd2fa981a66d0bfca17de5..94ba86018a4f38fa2f56e079f5436854be79db89 100644 (file)
@@ -2400,6 +2400,7 @@ enum i915_power_well_id {
 
 #define GEN8_GAMW_ECO_DEV_RW_IA _MMIO(0x4080)
 #define   GAMW_ECO_ENABLE_64K_IPS_FIELD 0xF
+#define   GAMW_ECO_DEV_CTX_RELOAD_DISABLE      (1 << 7)
 
 #define GAMT_CHKN_BIT_REG      _MMIO(0x4ab8)
 #define   GAMT_CHKN_DISABLE_L3_COH_PIPE                        (1 << 31)
@@ -8707,9 +8708,6 @@ enum {
 #define   GEN11_LSN_UNSLCVC_GAFS_HALF_CL2_MAXALLOC     (1 << 9)
 #define   GEN11_LSN_UNSLCVC_GAFS_HALF_SF_MAXALLOC      (1 << 7)
 
-#define GAMW_ECO_DEV_RW_IA_REG                 _MMIO(0x4080)
-#define   GAMW_ECO_DEV_CTX_RELOAD_DISABLE      (1 << 7)
-
 #define GEN10_SAMPLER_MODE             _MMIO(0xE18C)
 
 /* IVYBRIDGE DPF */
index d7176213e3ced315006e882ecc8498bbeb3dcb73..406ba5bab063c3b788faf36cefe5e1587fbe3dc0 100644 (file)
@@ -867,8 +867,9 @@ static void icl_gt_workarounds_apply(struct drm_i915_private *dev_priv)
        /* Wa_220166154:icl
         * Formerly known as WaDisCtxReload
         */
-       I915_WRITE(GAMW_ECO_DEV_RW_IA_REG, I915_READ(GAMW_ECO_DEV_RW_IA_REG) |
-                                          GAMW_ECO_DEV_CTX_RELOAD_DISABLE);
+       I915_WRITE(GEN8_GAMW_ECO_DEV_RW_IA,
+                  I915_READ(GEN8_GAMW_ECO_DEV_RW_IA) |
+                  GAMW_ECO_DEV_CTX_RELOAD_DISABLE);
 
        /* Wa_1405779004:icl (pre-prod) */
        if (IS_ICL_REVID(dev_priv, ICL_REVID_A0, ICL_REVID_A0))