Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/xe/debugfs: Promote xe_tile_debugfs_simple_show

We will want to use this helper function in other files.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/20250928140029.198847-6-michal.wajdeczko@intel.com

+10 -7
+7 -7
drivers/gpu/drm/xe/xe_tile_debugfs.c
··· 17 17 } 18 18 19 19 /** 20 - * tile_debugfs_simple_show - A show callback for struct drm_info_list 20 + * xe_tile_debugfs_simple_show() - A show callback for struct drm_info_list 21 21 * @m: the &seq_file 22 22 * @data: data used by the drm debugfs helpers 23 23 * ··· 58 58 * 59 59 * Return: 0 on success or a negative error code on failure. 60 60 */ 61 - static int tile_debugfs_simple_show(struct seq_file *m, void *data) 61 + int xe_tile_debugfs_simple_show(struct seq_file *m, void *data) 62 62 { 63 63 struct drm_printer p = drm_seq_file_printer(m); 64 64 struct drm_info_node *node = m->private; ··· 69 69 } 70 70 71 71 /** 72 - * tile_debugfs_show_with_rpm - A show callback for struct drm_info_list 72 + * xe_tile_debugfs_show_with_rpm() - A show callback for struct drm_info_list 73 73 * @m: the &seq_file 74 74 * @data: data used by the drm debugfs helpers 75 75 * ··· 77 77 * 78 78 * Return: 0 on success or a negative error code on failure. 79 79 */ 80 - static int tile_debugfs_show_with_rpm(struct seq_file *m, void *data) 80 + int xe_tile_debugfs_show_with_rpm(struct seq_file *m, void *data) 81 81 { 82 82 struct drm_info_node *node = m->private; 83 83 struct xe_tile *tile = node_to_tile(node); ··· 85 85 int ret; 86 86 87 87 xe_pm_runtime_get(xe); 88 - ret = tile_debugfs_simple_show(m, data); 88 + ret = xe_tile_debugfs_simple_show(m, data); 89 89 xe_pm_runtime_put(xe); 90 90 91 91 return ret; ··· 106 106 107 107 /* only for debugfs files which can be safely used on the VF */ 108 108 static const struct drm_info_list vf_safe_debugfs_list[] = { 109 - { "ggtt", .show = tile_debugfs_show_with_rpm, .data = ggtt }, 110 - { "sa_info", .show = tile_debugfs_show_with_rpm, .data = sa_info }, 109 + { "ggtt", .show = xe_tile_debugfs_show_with_rpm, .data = ggtt }, 110 + { "sa_info", .show = xe_tile_debugfs_show_with_rpm, .data = sa_info }, 111 111 }; 112 112 113 113 /**
+3
drivers/gpu/drm/xe/xe_tile_debugfs.h
··· 6 6 #ifndef _XE_TILE_DEBUGFS_H_ 7 7 #define _XE_TILE_DEBUGFS_H_ 8 8 9 + struct seq_file; 9 10 struct xe_tile; 10 11 11 12 void xe_tile_debugfs_register(struct xe_tile *tile); 13 + int xe_tile_debugfs_simple_show(struct seq_file *m, void *data); 14 + int xe_tile_debugfs_show_with_rpm(struct seq_file *m, void *data); 12 15 13 16 #endif