[PATCH 6/6] Check if this ifxes the failure in non MTL machines.
Andi Shyti
andi.shyti at linux.intel.com
Fri Oct 6 11:29:13 UTC 2023
Signed-off-by: Andi Shyti <andi.shyti at linux.intel.com>
---
drivers/gpu/drm/i915/gt/intel_ggtt.c | 31 ++++++++++++++--------------
1 file changed, 16 insertions(+), 15 deletions(-)
diff --git a/drivers/gpu/drm/i915/gt/intel_ggtt.c b/drivers/gpu/drm/i915/gt/intel_ggtt.c
index be8c216d29f9..b690d4ef8bfb 100644
--- a/drivers/gpu/drm/i915/gt/intel_ggtt.c
+++ b/drivers/gpu/drm/i915/gt/intel_ggtt.c
@@ -206,18 +206,6 @@ static void gen8_ggtt_invalidate(struct i915_ggtt *ggtt)
intel_uncore_write_fw(uncore, GFX_FLSH_CNTL_GEN6, GFX_FLSH_CNTL_EN);
}
-static void guc_ggtt_ct_invalidate(struct intel_gt *gt)
-{
- struct intel_uncore *uncore = gt->uncore;
- intel_wakeref_t wakeref;
-
- with_intel_runtime_pm_if_active(uncore->rpm, wakeref) {
- struct intel_guc *guc = >->uc.guc;
-
- intel_guc_invalidate_tlb(guc);
- }
-}
-
static void guc_ggtt_invalidate(struct i915_ggtt *ggtt)
{
struct drm_i915_private *i915 = ggtt->vm.i915;
@@ -227,17 +215,30 @@ static void guc_ggtt_invalidate(struct i915_ggtt *ggtt)
gen8_ggtt_invalidate(ggtt);
list_for_each_entry(gt, &ggtt->gt_list, ggtt_link) {
+ struct intel_uncore *uncore = gt->uncore;
+ intel_wakeref_t wakeref;
+
+ wakeref = intel_runtime_pm_get_if_active(uncore->rpm);
+ if (!wakeref)
+ continue;
+
if (HAS_GUC_TLB_INVALIDATION(i915) &&
intel_guc_is_ready(>->uc.guc)) {
- guc_ggtt_ct_invalidate(gt);
+ struct intel_guc *guc = >->uc.guc;
+
+ intel_guc_invalidate_tlb(guc);
+
} else if (GRAPHICS_VER(i915) >= 12) {
- intel_uncore_write(gt->uncore,
+ intel_uncore_write_fw(uncore,
GEN12_GUC_TLB_INV_CR,
GEN12_GUC_TLB_INV_CR_INVALIDATE);
+
} else {
- intel_uncore_write(gt->uncore,
+ intel_uncore_write_fw(uncore,
GEN8_GTCR, GEN8_GTCR_INVALIDATE);
}
+
+ intel_runtime_pm_put(uncore->rpm, wakeref);
}
}
--
2.40.1
More information about the Intel-gfx-trybot
mailing list