]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/xe/pf: Invalidate LMTT after completing changes
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Fri, 11 Jul 2025 19:33:16 +0000 (21:33 +0200)
committerMichal Wajdeczko <michal.wajdeczko@intel.com>
Tue, 15 Jul 2025 11:05:22 +0000 (13:05 +0200)
Once we finish populating all leaf pages in the VF's LMTT we should
make sure that hardware will not access any stale data. Explicitly
force LMTT invalidation (as it was already planned in the past).

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Michał Winiarski <michal.winiarski@intel.com>
Cc: Piotr Piórkowski <piotr.piorkowski@intel.com>
Reviewed-by: Piotr Piórkowski <piotr.piorkowski@intel.com>
Link: https://lore.kernel.org/r/20250711193316.1920-7-michal.wajdeczko@intel.com
drivers/gpu/drm/xe/xe_gt_sriov_pf_config.c

index f2500b9f27261c57634c7ba3a7fa7a88ab40db7a..494909f74eb22cb3e532940e80460076630875a8 100644 (file)
@@ -1347,7 +1347,17 @@ static int pf_distribute_config_lmem(struct xe_gt *gt, unsigned int vfid, u64 si
 
 static void pf_force_lmtt_invalidate(struct xe_device *xe)
 {
-       /* TODO */
+       struct xe_lmtt *lmtt;
+       struct xe_tile *tile;
+       unsigned int tid;
+
+       xe_assert(xe, xe_device_has_lmtt(xe));
+       xe_assert(xe, IS_SRIOV_PF(xe));
+
+       for_each_tile(tile, xe, tid) {
+               lmtt = &tile->sriov.pf.lmtt;
+               xe_lmtt_invalidate_hw(lmtt);
+       }
 }
 
 static void pf_reset_vf_lmtt(struct xe_device *xe, unsigned int vfid)