Skip to content

Commit b3c0692

Browse files
mthierrylucasdemarchi
authored andcommitted
drm/i915/tgl: Move GTCR register to cope with GAM MMIO address remap
GAM registers located in the 0x4xxx range have been relocated to 0xCxxx; this is to make space for global MOCS registers. v2: Rename register and bitfield to its new name (suggested by Mika) HSD: 399379 Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Signed-off-by: Michel Thierry <michel.thierry@intel.com> Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190823082055.5992-2-lucas.demarchi@intel.com
1 parent d4c61c4 commit b3c0692

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

drivers/gpu/drm/i915/gt/uc/intel_guc_reg.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@
8383
#define GEN8_GTCR _MMIO(0x4274)
8484
#define GEN8_GTCR_INVALIDATE (1<<0)
8585

86+
#define GEN12_GUC_TLB_INV_CR _MMIO(0xcee8)
87+
#define GEN12_GUC_TLB_INV_CR_INVALIDATE (1 << 0)
88+
8689
#define GUC_ARAT_C6DIS _MMIO(0xA178)
8790

8891
#define GUC_SHIM_CONTROL _MMIO(0xc064)

drivers/gpu/drm/i915/i915_gem_gtt.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,15 @@ static void gen6_ggtt_invalidate(struct i915_ggtt *ggtt)
132132
static void guc_ggtt_invalidate(struct i915_ggtt *ggtt)
133133
{
134134
struct intel_uncore *uncore = ggtt->vm.gt->uncore;
135+
struct drm_i915_private *i915 = ggtt->vm.i915;
135136

136137
gen6_ggtt_invalidate(ggtt);
137-
intel_uncore_write_fw(uncore, GEN8_GTCR, GEN8_GTCR_INVALIDATE);
138+
139+
if (INTEL_GEN(i915) >= 12)
140+
intel_uncore_write_fw(uncore, GEN12_GUC_TLB_INV_CR,
141+
GEN12_GUC_TLB_INV_CR_INVALIDATE);
142+
else
143+
intel_uncore_write_fw(uncore, GEN8_GTCR, GEN8_GTCR_INVALIDATE);
138144
}
139145

140146
static void gmch_ggtt_invalidate(struct i915_ggtt *ggtt)

0 commit comments

Comments
 (0)