]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/xe/debugfs: Make ggtt file per-tile
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Fri, 19 Sep 2025 16:04:29 +0000 (18:04 +0200)
committerMichal Wajdeczko <michal.wajdeczko@intel.com>
Tue, 23 Sep 2025 18:04:13 +0000 (20:04 +0200)
Due to initial lack of per-tile debugfs directories, the ggtt file
attribute was created as per-GT file. Fix that since now we have
proper per-tile directories.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://lore.kernel.org/r/20250919160430.573-2-michal.wajdeczko@intel.com
drivers/gpu/drm/xe/xe_gt_debugfs.c
drivers/gpu/drm/xe/xe_tile_debugfs.c

index f253e2df490776f171c83485cb9fadd29974c9e5..e4eba91cb83d9bbd5757f6de9d25f5f6109a32dd 100644 (file)
@@ -12,7 +12,6 @@
 
 #include "xe_device.h"
 #include "xe_force_wake.h"
-#include "xe_ggtt.h"
 #include "xe_gt.h"
 #include "xe_gt_mcr.h"
 #include "xe_gt_idle.h"
@@ -142,17 +141,6 @@ static int steering(struct xe_gt *gt, struct drm_printer *p)
        return 0;
 }
 
-static int ggtt(struct xe_gt *gt, struct drm_printer *p)
-{
-       int ret;
-
-       xe_pm_runtime_get(gt_to_xe(gt));
-       ret = xe_ggtt_dump(gt_to_tile(gt)->mem.ggtt, p);
-       xe_pm_runtime_put(gt_to_xe(gt));
-
-       return ret;
-}
-
 static int register_save_restore(struct xe_gt *gt, struct drm_printer *p)
 {
        struct xe_hw_engine *hwe;
@@ -279,7 +267,6 @@ static int hwconfig(struct xe_gt *gt, struct drm_printer *p)
  */
 static const struct drm_info_list vf_safe_debugfs_list[] = {
        {"topology", .show = xe_gt_debugfs_simple_show, .data = topology},
-       {"ggtt", .show = xe_gt_debugfs_simple_show, .data = ggtt},
        {"register-save-restore", .show = xe_gt_debugfs_simple_show, .data = register_save_restore},
        {"workarounds", .show = xe_gt_debugfs_simple_show, .data = workarounds},
        {"tunings", .show = xe_gt_debugfs_simple_show, .data = tunings},
index 5523874cba7b9f28203412c4705fdeea22bd6217..a3f437d38f86f27ccf01171e1a0c802095379558 100644 (file)
@@ -6,6 +6,7 @@
 #include <linux/debugfs.h>
 #include <drm/drm_debugfs.h>
 
+#include "xe_ggtt.h"
 #include "xe_pm.h"
 #include "xe_sa.h"
 #include "xe_tile_debugfs.h"
@@ -90,6 +91,11 @@ static int tile_debugfs_show_with_rpm(struct seq_file *m, void *data)
        return ret;
 }
 
+static int ggtt(struct xe_tile *tile, struct drm_printer *p)
+{
+       return xe_ggtt_dump(tile->mem.ggtt, p);
+}
+
 static int sa_info(struct xe_tile *tile, struct drm_printer *p)
 {
        drm_suballoc_dump_debug_info(&tile->mem.kernel_bb_pool->base, p,
@@ -100,6 +106,7 @@ static int sa_info(struct xe_tile *tile, struct drm_printer *p)
 
 /* only for debugfs files which can be safely used on the VF */
 static const struct drm_info_list vf_safe_debugfs_list[] = {
+       { "ggtt", .show = tile_debugfs_show_with_rpm, .data = ggtt },
        { "sa_info", .show = tile_debugfs_show_with_rpm, .data = sa_info },
 };