[Intel-gfx] [PATCH 3/4] drm/i915: Add support for GuC tlb invalidation
fei.yang at intel.com
fei.yang at intel.com
Wed Sep 21 07:49:00 UTC 2022
From: Prathap Kumar Valsan <prathap.kumar.valsan at intel.com>
When GuC is enabled the tlb invalidations use guc ct otherwise use
mmio interface.
Signed-off-by: Prathap Kumar Valsan <prathap.kumar.valsan at intel.com>
Reviewed-by: Niranjana Vishwanathapura <niranjana.vishwanathapura at intel.com>
Reviewed-by: Fei Yang <fei.yang at intel.com>
---
drivers/gpu/drm/i915/gt/intel_gt.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/gt/intel_gt.c b/drivers/gpu/drm/i915/gt/intel_gt.c
index 5ddae95d4886..402eec8ba596 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt.c
+++ b/drivers/gpu/drm/i915/gt/intel_gt.c
@@ -9,6 +9,7 @@
#include "gem/i915_gem_internal.h"
#include "gem/i915_gem_lmem.h"
#include "pxp/intel_pxp.h"
+#include "uc/intel_guc.h"
#include "i915_drv.h"
#include "i915_perf_oa_regs.h"
@@ -1092,11 +1093,16 @@ void intel_gt_invalidate_tlb(struct intel_gt *gt, u32 seqno)
return;
with_intel_gt_pm_if_awake(gt, wakeref) {
+ struct intel_guc *guc = >->uc.guc;
+
mutex_lock(>->tlb.invalidate_lock);
if (tlb_seqno_passed(gt, seqno))
goto unlock;
- mmio_invalidate_full(gt);
+ if (INTEL_GUC_SUPPORTS_TLB_INVALIDATION(guc))
+ intel_guc_invalidate_tlb_full(guc, INTEL_GUC_TLB_INVAL_MODE_HEAVY);
+ else
+ mmio_invalidate_full(gt);
write_seqcount_invalidate(>->tlb.seqno);
unlock:
--
2.25.1
More information about the Intel-gfx
mailing list