Skip to content

Commit c795d2f

Browse files
tursulinAndi
authored andcommitted
drm/i915: Run relevant bits of debugfs drop_caches per GT
Walk all GTs when doing the respective bits of drop_caches work. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Nirmoy Das <nirmoy.das@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230907125808.186088-1-andi.shyti@linux.intel.com
1 parent 94bcf87 commit c795d2f

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

drivers/gpu/drm/i915/i915_debugfs.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -740,15 +740,19 @@ static int
740740
i915_drop_caches_set(void *data, u64 val)
741741
{
742742
struct drm_i915_private *i915 = data;
743+
struct intel_gt *gt;
743744
unsigned int flags;
745+
unsigned int i;
744746
int ret;
745747

746748
drm_dbg(&i915->drm, "Dropping caches: 0x%08llx [0x%08llx]\n",
747749
val, val & DROP_ALL);
748750

749-
ret = gt_drop_caches(to_gt(i915), val);
750-
if (ret)
751-
return ret;
751+
for_each_gt(gt, i915, i) {
752+
ret = gt_drop_caches(gt, val);
753+
if (ret)
754+
return ret;
755+
}
752756

753757
fs_reclaim_acquire(GFP_KERNEL);
754758
flags = memalloc_noreclaim_save();

0 commit comments

Comments
 (0)