drm/i915/gt: Convert PSS_MODE2 to multicast register
authorGustavo Sousa <gustavo.sousa@intel.com>
Fri, 20 Jan 2023 18:14:23 +0000 (15:14 -0300)
committerMatt Roper <matthew.d.roper@intel.com>
Tue, 24 Jan 2023 00:41:32 +0000 (16:41 -0800)
That register became a multicast register as of Xe_HP and it is
currently used only for DG2. Use a proper prefix since there could be
usage of the same register for previous platforms in the future, which
would require a different definition (i.e. using _MMIO).

Note that, in its current state, the code does not cause functional
problems, since the actual application of the workaround would
implicitly use multicast mode. This fix is more toward consistency and
being future-proof uses of this register outside of workarounds.

v2:
  - Add paragraph noting that this change is for consistency and
    making the code future-proof. (Matt)

Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Matthew Atwood <matthew.s.atwood@intel.com>
Fixes: 468a4e630c7d ("drm/i915/dg2: Introduce Wa_18018764978")
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230120181423.90507-1-gustavo.sousa@intel.com
drivers/gpu/drm/i915/gt/intel_gt_regs.h
drivers/gpu/drm/i915/gt/intel_workarounds.c

index 4a4bab261e66489360b28a6b308ddfced9cfdb7d..2727645864db6fb4c034a0413a97600a9a4cea2e 100644 (file)
 #define GEN8_L3CNTLREG                         _MMIO(0x7034)
 #define   GEN8_ERRDETBCTRL                     (1 << 9)
 
-#define PSS_MODE2                              _MMIO(0x703c)
+#define XEHP_PSS_MODE2                         MCR_REG(0x703c)
 #define   SCOREBOARD_STALL_FLUSH_CONTROL       REG_BIT(5)
 
 #define GEN7_SC_INSTDONE                       _MMIO(0x7100)
index 918a271447e2b76199d5bfdc90cdd03cd3412548..4efc1a532982ad85eb833071340e3beb31ae5fc9 100644 (file)
@@ -793,7 +793,7 @@ static void dg2_ctx_workarounds_init(struct intel_engine_cs *engine,
        /* Wa_18018764978:dg2 */
        if (IS_DG2_GRAPHICS_STEP(engine->i915, G10, STEP_C0, STEP_FOREVER) ||
            IS_DG2_G11(engine->i915) || IS_DG2_G12(engine->i915))
-               wa_masked_en(wal, PSS_MODE2, SCOREBOARD_STALL_FLUSH_CONTROL);
+               wa_mcr_masked_en(wal, XEHP_PSS_MODE2, SCOREBOARD_STALL_FLUSH_CONTROL);
 
        /* Wa_15010599737:dg2 */
        wa_mcr_masked_en(wal, CHICKEN_RASTER_1, DIS_SF_ROUND_NEAREST_EVEN);
@@ -821,7 +821,7 @@ static void mtl_ctx_workarounds_init(struct intel_engine_cs *engine,
                wa_mcr_masked_en(wal, VFLSKPD, VF_PREFETCH_TLB_DIS);
 
                /* Wa_18018764978 */
-               wa_masked_en(wal, PSS_MODE2, SCOREBOARD_STALL_FLUSH_CONTROL);
+               wa_mcr_masked_en(wal, XEHP_PSS_MODE2, SCOREBOARD_STALL_FLUSH_CONTROL);
        }
 
        /* Wa_18019271663 */