]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915: Add Wa_22011802037 force cs halt
authorTilak Tangudu <tilak.tangudu@intel.com>
Fri, 15 Apr 2022 22:40:20 +0000 (15:40 -0700)
committerJohn Harrison <John.C.Harrison@Intel.com>
Tue, 19 Apr 2022 18:30:38 +0000 (11:30 -0700)
Prior to doing a reset, SW must ensure command streamer is stopped,
as a workaround, to eliminate a race condition in GPM flow.
Setting both the ring stop and prefetch disable bits, will cause the
command streamer to halt.

Signed-off-by: Tilak Tangudu <tilak.tangudu@intel.com>
Reviewed-by: John Harrison <John.C.Harrison@Intel.com>
Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220415224025.3693037-2-umesh.nerlige.ramappa@intel.com
drivers/gpu/drm/i915/gt/intel_engine_cs.c
drivers/gpu/drm/i915/gt/intel_engine_regs.h

index a3035a76747f6dbd5ee33dc562e645b633c47709..875c31e4e53a99beaeff2005fa7a42ef136fb7be 100644 (file)
@@ -1278,6 +1278,15 @@ static int __intel_engine_stop_cs(struct intel_engine_cs *engine,
        int err;
 
        intel_uncore_write_fw(uncore, mode, _MASKED_BIT_ENABLE(STOP_RING));
+
+       /*
+        * Wa_22011802037 : gen12, Prior to doing a reset, ensure CS is
+        * stopped, set ring stop bit and prefetch disable bit to halt CS
+        */
+       if (GRAPHICS_VER(engine->i915) == 12)
+               intel_uncore_write_fw(uncore, RING_MODE_GEN7(engine->mmio_base),
+                                     _MASKED_BIT_ENABLE(GEN12_GFX_PREFETCH_DISABLE));
+
        err = __intel_wait_for_register_fw(engine->uncore, mode,
                                           MODE_IDLE, MODE_IDLE,
                                           fast_timeout_us,
index 0bf8b45c93194b61ca481f67f59ffdb0f7d034ac..594a629cb28f196e6e3f2a047691cdd4f5d81b76 100644 (file)
 #define   GFX_SURFACE_FAULT_ENABLE             (1 << 12)
 #define   GFX_REPLAY_MODE                      (1 << 11)
 #define   GFX_PSMI_GRANULARITY                 (1 << 10)
+#define   GEN12_GFX_PREFETCH_DISABLE           REG_BIT(10)
 #define   GFX_PPGTT_ENABLE                     (1 << 9)
 #define   GEN8_GFX_PPGTT_48B                   (1 << 7)
 #define   GFX_FORWARD_VBLANK_MASK              (3 << 5)