]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915: Add engine scratch register to live_lrc_fixed
authorMika Kuoppala <mika.kuoppala@linux.intel.com>
Fri, 24 Apr 2020 21:48:38 +0000 (00:48 +0300)
committerChris Wilson <chris@chris-wilson.co.uk>
Sat, 25 Apr 2020 16:58:33 +0000 (17:58 +0100)
General purpose registers are per engine and
in a fixed location. Add to live_lrc_fixed.

Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20200424214841.28076-1-mika.kuoppala@linux.intel.com
drivers/gpu/drm/i915/gt/intel_lrc.c
drivers/gpu/drm/i915/gt/selftest_lrc.c

index 214ea2a346932365d1cc6a847e3beb09d803b029..c1f30fe12d5d064fa93aadaf110fa48d81ac87da 100644 (file)
@@ -250,6 +250,18 @@ static int lrc_ring_mi_mode(const struct intel_engine_cs *engine)
                return -1;
 }
 
+static int lrc_ring_gpr0(const struct intel_engine_cs *engine)
+{
+       if (INTEL_GEN(engine->i915) >= 12)
+               return 0x74;
+       else if (INTEL_GEN(engine->i915) >= 9)
+               return 0x68;
+       else if (engine->class == RENDER_CLASS)
+               return 0xd8;
+       else
+               return -1;
+}
+
 static int lrc_ring_wa_bb_per_ctx(const struct intel_engine_cs *engine)
 {
        if (INTEL_GEN(engine->i915) >= 12)
index e964c1402d299c5d997c4a7861ae0afa3dce69b6..d10c38aec500e201c26eed4160b0e6056385047b 100644 (file)
@@ -4613,6 +4613,11 @@ static int live_lrc_fixed(void *arg)
                                CTX_TIMESTAMP - 1,
                                "RING_CTX_TIMESTAMP"
                        },
+                       {
+                               i915_mmio_reg_offset(GEN8_RING_CS_GPR(engine->mmio_base, 0)),
+                               lrc_ring_gpr0(engine),
+                               "RING_CS_GPR0"
+                       },
                        { },
                }, *t;
                u32 *hw;