]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/xe/debugfs: Update xe_tuning_dump signature
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Tue, 23 Sep 2025 21:16:11 +0000 (23:16 +0200)
committerMichal Wajdeczko <michal.wajdeczko@intel.com>
Tue, 30 Sep 2025 08:21:26 +0000 (10:21 +0200)
Our debugfs helper xe_gt_debugfs_show_with_rpm() expects print()
functions to return int. New signature allows us to drop wrapper.

While around, print additional separation lines using puts() to
avoid output with leading \n which might confuse some printers.

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/20250923211613.193347-4-michal.wajdeczko@intel.com
drivers/gpu/drm/xe/xe_gt_debugfs.c
drivers/gpu/drm/xe/xe_tuning.c
drivers/gpu/drm/xe/xe_tuning.h

index e6a7684d571ae2e53b66fbf63b3e7bdbcd8633d2..bcf234e74471fc17adc0e0be3d718e4f1aa71531 100644 (file)
@@ -167,12 +167,6 @@ static int register_save_restore(struct xe_gt *gt, struct drm_printer *p)
        return 0;
 }
 
-static int tunings(struct xe_gt *gt, struct drm_printer *p)
-{
-       xe_tuning_dump(gt, p);
-       return 0;
-}
-
 static int pat(struct xe_gt *gt, struct drm_printer *p)
 {
        xe_pat_dump(gt, p);
@@ -231,7 +225,7 @@ static const struct drm_info_list vf_safe_debugfs_list[] = {
        { "register-save-restore",
                .show = xe_gt_debugfs_show_with_rpm, .data = register_save_restore },
        { "workarounds", .show = xe_gt_debugfs_show_with_rpm, .data = xe_wa_gt_dump },
-       { "tunings", .show = xe_gt_debugfs_show_with_rpm, .data = tunings },
+       { "tunings", .show = xe_gt_debugfs_show_with_rpm, .data = xe_tuning_dump },
        { "default_lrc_rcs", .show = xe_gt_debugfs_show_with_rpm, .data = rcs_default_lrc },
        { "default_lrc_ccs", .show = xe_gt_debugfs_show_with_rpm, .data = ccs_default_lrc },
        { "default_lrc_bcs", .show = xe_gt_debugfs_show_with_rpm, .data = bcs_default_lrc },
index a524170a04d02959daca54bbe00856491efcece8..fd58ea5e78bf62f911c835cd9cee871964d2adf6 100644 (file)
@@ -214,7 +214,14 @@ void xe_tuning_process_lrc(struct xe_hw_engine *hwe)
        xe_rtp_process_to_sr(&ctx, lrc_tunings, ARRAY_SIZE(lrc_tunings), &hwe->reg_lrc);
 }
 
-void xe_tuning_dump(struct xe_gt *gt, struct drm_printer *p)
+/**
+ * xe_tuning_dump() - Dump GT tuning info into a drm printer.
+ * @gt: the &xe_gt
+ * @p: the &drm_printer
+ *
+ * Return: always 0.
+ */
+int xe_tuning_dump(struct xe_gt *gt, struct drm_printer *p)
 {
        size_t idx;
 
@@ -222,11 +229,15 @@ void xe_tuning_dump(struct xe_gt *gt, struct drm_printer *p)
        for_each_set_bit(idx, gt->tuning_active.gt, ARRAY_SIZE(gt_tunings))
                drm_printf_indent(p, 1, "%s\n", gt_tunings[idx].name);
 
-       drm_printf(p, "\nEngine Tunings\n");
+       drm_puts(p, "\n");
+       drm_printf(p, "Engine Tunings\n");
        for_each_set_bit(idx, gt->tuning_active.engine, ARRAY_SIZE(engine_tunings))
                drm_printf_indent(p, 1, "%s\n", engine_tunings[idx].name);
 
-       drm_printf(p, "\nLRC Tunings\n");
+       drm_puts(p, "\n");
+       drm_printf(p, "LRC Tunings\n");
        for_each_set_bit(idx, gt->tuning_active.lrc, ARRAY_SIZE(lrc_tunings))
                drm_printf_indent(p, 1, "%s\n", lrc_tunings[idx].name);
+
+       return 0;
 }
index dd0d3ccc9c654cfdb1086411e30aff0d5ac225d2..c1cc5927fda77d72262f90b919d2c3e2830b1a26 100644 (file)
@@ -14,6 +14,6 @@ int xe_tuning_init(struct xe_gt *gt);
 void xe_tuning_process_gt(struct xe_gt *gt);
 void xe_tuning_process_engine(struct xe_hw_engine *hwe);
 void xe_tuning_process_lrc(struct xe_hw_engine *hwe);
-void xe_tuning_dump(struct xe_gt *gt, struct drm_printer *p);
+int xe_tuning_dump(struct xe_gt *gt, struct drm_printer *p);
 
 #endif