@@ -13,6 +13,7 @@
#include "i915_gem_mman.h"
#include "gt/intel_gt.h"
+#include "gt/intel_gt_pm.h"
void __i915_gem_object_set_pages(struct drm_i915_gem_object *obj,
struct sg_table *pages,
@@ -217,10 +218,15 @@ __i915_gem_object_unset_pages(struct drm_i915_gem_object *obj)
if (test_and_clear_bit(I915_BO_WAS_BOUND_BIT, &obj->flags)) {
struct drm_i915_private *i915 = to_i915(obj->base.dev);
- intel_wakeref_t wakeref;
+ struct intel_gt *gt;
+ int i;
- with_intel_runtime_pm_if_active(&i915->runtime_pm, wakeref)
- intel_gt_invalidate_tlbs(to_gt(i915));
+ for_each_gt(gt, i915, i) {
+ int tmp;
+
+ with_intel_gt_pm_if_awake(gt, tmp)
+ intel_gt_invalidate_tlbs(gt);
+ }
}
return pages;
@@ -55,7 +55,7 @@ static inline void intel_gt_pm_might_put(struct intel_gt *gt)
for (tmp = 1, intel_gt_pm_get(gt); tmp; \
intel_gt_pm_put(gt), tmp = 0)
-#define with_intel_gt_pm_if_awake(gt, wf) \
+#define with_intel_gt_pm_if_awake(gt, tmp) \
for (tmp = 1, intel_gt_pm_get_if_awake(gt); tmp; \
intel_gt_pm_put(gt), tmp = 0)
During object cleanup we invalidate the TLBs but we do it only for gt0. Invalidate the caches for all the tiles. Reported-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com> --- drivers/gpu/drm/i915/gem/i915_gem_pages.c | 12 +++++++++--- drivers/gpu/drm/i915/gt/intel_gt_pm.h | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-)