Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: fei.yang@intel.com
To: intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH 3/4] drm/i915: Add support for GuC tlb invalidation
Date: Wed, 21 Sep 2022 00:49:00 -0700	[thread overview]
Message-ID: <20220921074901.3651252-3-fei.yang@intel.com> (raw)
In-Reply-To: <20220921074901.3651252-1-fei.yang@intel.com>

From: Prathap Kumar Valsan <prathap.kumar.valsan@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@intel.com>
Reviewed-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
Reviewed-by: Fei Yang <fei.yang@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 = &gt->uc.guc;
+
 		mutex_lock(&gt->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(&gt->tlb.seqno);
 unlock:
-- 
2.25.1


  parent reply	other threads:[~2022-09-21  7:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-21  7:48 [Intel-gfx] [PATCH 1/4] drm/i915/guc: Define CTB based TLB invalidation routines fei.yang
2022-09-21  7:48 ` [Intel-gfx] [PATCH 2/4] drm/i915/xehpsdv: Define GuC Based full TLB invalidation routine fei.yang
2022-09-21  7:49 ` fei.yang [this message]
2022-09-21  7:49 ` [Intel-gfx] [PATCH 4/4] drm/i915/guc: enable GuC GGTT invalidation from the start fei.yang
2022-09-21  9:03 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/4] drm/i915/guc: Define CTB based TLB invalidation routines Patchwork
2022-09-21  9:03 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-09-21  9:33 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220921074901.3651252-3-fei.yang@intel.com \
    --to=fei.yang@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox