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

drm/i915: rename debugfs_gt files

We shouldn't be using debugfs_ namespace for this functionality. Rename
debugfs_gt.[ch] to intel_gt_debugfs.[ch] and then make functions,
defines and structs follow suit.

While at it and since we are renaming the header, sort the includes
alphabetically.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210918025754.1254705-1-lucas.demarchi@intel.com

+49 -49
+1 -1
drivers/gpu/drm/i915/Makefile
··· 79 79 # "Graphics Technology" (aka we talk to the gpu) 80 80 gt-y += \ 81 81 gt/debugfs_engines.o \ 82 - gt/debugfs_gt.o \ 83 82 gt/debugfs_gt_pm.o \ 84 83 gt/gen2_engine_cs.o \ 85 84 gt/gen6_engine_cs.o \ ··· 99 100 gt/intel_gt.o \ 100 101 gt/intel_gt_buffer_pool.o \ 101 102 gt/intel_gt_clock_utils.o \ 103 + gt/intel_gt_debugfs.o \ 102 104 gt/intel_gt_irq.o \ 103 105 gt/intel_gt_pm.o \ 104 106 gt/intel_gt_pm_irq.o \
+3 -3
drivers/gpu/drm/i915/gt/debugfs_engines.c
··· 7 7 #include <drm/drm_print.h> 8 8 9 9 #include "debugfs_engines.h" 10 - #include "debugfs_gt.h" 11 10 #include "i915_drv.h" /* for_each_engine! */ 12 11 #include "intel_engine.h" 12 + #include "intel_gt_debugfs.h" 13 13 14 14 static int engines_show(struct seq_file *m, void *data) 15 15 { ··· 24 24 25 25 return 0; 26 26 } 27 - DEFINE_GT_DEBUGFS_ATTRIBUTE(engines); 27 + DEFINE_INTEL_GT_DEBUGFS_ATTRIBUTE(engines); 28 28 29 29 void debugfs_engines_register(struct intel_gt *gt, struct dentry *root) 30 30 { 31 - static const struct debugfs_gt_file files[] = { 31 + static const struct intel_gt_debugfs_file files[] = { 32 32 { "engines", &engines_fops }, 33 33 }; 34 34
+4 -4
drivers/gpu/drm/i915/gt/debugfs_gt.c drivers/gpu/drm/i915/gt/intel_gt_debugfs.c
··· 6 6 #include <linux/debugfs.h> 7 7 8 8 #include "debugfs_engines.h" 9 - #include "debugfs_gt.h" 10 9 #include "debugfs_gt_pm.h" 10 + #include "i915_drv.h" 11 + #include "intel_gt_debugfs.h" 11 12 #include "intel_sseu_debugfs.h" 12 13 #include "uc/intel_uc_debugfs.h" 13 - #include "i915_drv.h" 14 14 15 - void debugfs_gt_register(struct intel_gt *gt) 15 + void intel_gt_debugfs_register(struct intel_gt *gt) 16 16 { 17 17 struct dentry *root; 18 18 ··· 31 31 } 32 32 33 33 void intel_gt_debugfs_register_files(struct dentry *root, 34 - const struct debugfs_gt_file *files, 34 + const struct intel_gt_debugfs_file *files, 35 35 unsigned long count, void *data) 36 36 { 37 37 while (count--) {
+7 -7
drivers/gpu/drm/i915/gt/debugfs_gt.h drivers/gpu/drm/i915/gt/intel_gt_debugfs.h
··· 3 3 * Copyright © 2019 Intel Corporation 4 4 */ 5 5 6 - #ifndef DEBUGFS_GT_H 7 - #define DEBUGFS_GT_H 6 + #ifndef INTEL_GT_DEBUGFS_H 7 + #define INTEL_GT_DEBUGFS_H 8 8 9 9 #include <linux/file.h> 10 10 11 11 struct intel_gt; 12 12 13 - #define DEFINE_GT_DEBUGFS_ATTRIBUTE(__name) \ 13 + #define DEFINE_INTEL_GT_DEBUGFS_ATTRIBUTE(__name) \ 14 14 static int __name ## _open(struct inode *inode, struct file *file) \ 15 15 { \ 16 16 return single_open(file, __name ## _show, inode->i_private); \ ··· 23 23 .release = single_release, \ 24 24 } 25 25 26 - void debugfs_gt_register(struct intel_gt *gt); 26 + void intel_gt_debugfs_register(struct intel_gt *gt); 27 27 28 - struct debugfs_gt_file { 28 + struct intel_gt_debugfs_file { 29 29 const char *name; 30 30 const struct file_operations *fops; 31 31 bool (*eval)(void *data); 32 32 }; 33 33 34 34 void intel_gt_debugfs_register_files(struct dentry *root, 35 - const struct debugfs_gt_file *files, 35 + const struct intel_gt_debugfs_file *files, 36 36 unsigned long count, void *data); 37 37 38 - #endif /* DEBUGFS_GT_H */ 38 + #endif /* INTEL_GT_DEBUGFS_H */
+7 -7
drivers/gpu/drm/i915/gt/debugfs_gt_pm.c
··· 6 6 7 7 #include <linux/seq_file.h> 8 8 9 - #include "debugfs_gt.h" 10 9 #include "debugfs_gt_pm.h" 11 10 #include "i915_drv.h" 12 11 #include "intel_gt.h" 13 12 #include "intel_gt_clock_utils.h" 13 + #include "intel_gt_debugfs.h" 14 14 #include "intel_gt_pm.h" 15 15 #include "intel_llc.h" 16 16 #include "intel_rc6.h" ··· 36 36 37 37 return 0; 38 38 } 39 - DEFINE_GT_DEBUGFS_ATTRIBUTE(fw_domains); 39 + DEFINE_INTEL_GT_DEBUGFS_ATTRIBUTE(fw_domains); 40 40 41 41 static void print_rc6_res(struct seq_file *m, 42 42 const char *title, ··· 238 238 239 239 return err; 240 240 } 241 - DEFINE_GT_DEBUGFS_ATTRIBUTE(drpc); 241 + DEFINE_INTEL_GT_DEBUGFS_ATTRIBUTE(drpc); 242 242 243 243 static int frequency_show(struct seq_file *m, void *unused) 244 244 { ··· 480 480 481 481 return 0; 482 482 } 483 - DEFINE_GT_DEBUGFS_ATTRIBUTE(frequency); 483 + DEFINE_INTEL_GT_DEBUGFS_ATTRIBUTE(frequency); 484 484 485 485 static int llc_show(struct seq_file *m, void *data) 486 486 { ··· 533 533 return HAS_LLC(gt->i915); 534 534 } 535 535 536 - DEFINE_GT_DEBUGFS_ATTRIBUTE(llc); 536 + DEFINE_INTEL_GT_DEBUGFS_ATTRIBUTE(llc); 537 537 538 538 static const char *rps_power_to_str(unsigned int power) 539 539 { ··· 612 612 return HAS_RPS(gt->i915); 613 613 } 614 614 615 - DEFINE_GT_DEBUGFS_ATTRIBUTE(rps_boost); 615 + DEFINE_INTEL_GT_DEBUGFS_ATTRIBUTE(rps_boost); 616 616 617 617 void debugfs_gt_pm_register(struct intel_gt *gt, struct dentry *root) 618 618 { 619 - static const struct debugfs_gt_file files[] = { 619 + static const struct intel_gt_debugfs_file files[] = { 620 620 { "drpc", &drpc_fops, NULL }, 621 621 { "frequency", &frequency_fops, NULL }, 622 622 { "forcewake", &fw_domains_fops, NULL },
+3 -3
drivers/gpu/drm/i915/gt/intel_gt.c
··· 3 3 * Copyright © 2019 Intel Corporation 4 4 */ 5 5 6 - #include "debugfs_gt.h" 6 + #include "intel_gt_debugfs.h" 7 7 8 8 #include "gem/i915_gem_lmem.h" 9 9 #include "i915_drv.h" ··· 15 15 #include "intel_gt_requests.h" 16 16 #include "intel_migrate.h" 17 17 #include "intel_mocs.h" 18 + #include "intel_pm.h" 18 19 #include "intel_rc6.h" 19 20 #include "intel_renderstate.h" 20 21 #include "intel_rps.h" 21 22 #include "intel_uncore.h" 22 - #include "intel_pm.h" 23 23 #include "shmem_utils.h" 24 24 25 25 void intel_gt_init_early(struct intel_gt *gt, struct drm_i915_private *i915) ··· 434 434 { 435 435 intel_rps_driver_register(&gt->rps); 436 436 437 - debugfs_gt_register(gt); 437 + intel_gt_debugfs_register(gt); 438 438 } 439 439 440 440 static int intel_gt_init_scratch(struct intel_gt *gt, unsigned int size)
+5 -5
drivers/gpu/drm/i915/gt/intel_sseu_debugfs.c
··· 4 4 * Copyright © 2020 Intel Corporation 5 5 */ 6 6 7 - #include "debugfs_gt.h" 8 - #include "intel_sseu_debugfs.h" 9 7 #include "i915_drv.h" 8 + #include "intel_gt_debugfs.h" 9 + #include "intel_sseu_debugfs.h" 10 10 11 11 static void sseu_copy_subslices(const struct sseu_dev_info *sseu, 12 12 int slice, u8 *to_mask) ··· 282 282 283 283 return intel_sseu_status(m, gt); 284 284 } 285 - DEFINE_GT_DEBUGFS_ATTRIBUTE(sseu_status); 285 + DEFINE_INTEL_GT_DEBUGFS_ATTRIBUTE(sseu_status); 286 286 287 287 static int rcs_topology_show(struct seq_file *m, void *unused) 288 288 { ··· 293 293 294 294 return 0; 295 295 } 296 - DEFINE_GT_DEBUGFS_ATTRIBUTE(rcs_topology); 296 + DEFINE_INTEL_GT_DEBUGFS_ATTRIBUTE(rcs_topology); 297 297 298 298 void intel_sseu_debugfs_register(struct intel_gt *gt, struct dentry *root) 299 299 { 300 - static const struct debugfs_gt_file files[] = { 300 + static const struct intel_gt_debugfs_file files[] = { 301 301 { "sseu_status", &sseu_status_fops, NULL }, 302 302 { "rcs_topology", &rcs_topology_fops, NULL }, 303 303 };
+9 -9
drivers/gpu/drm/i915/gt/uc/intel_guc_debugfs.c
··· 5 5 6 6 #include <drm/drm_print.h> 7 7 8 - #include "gt/debugfs_gt.h" 8 + #include "gt/intel_gt_debugfs.h" 9 + #include "gt/uc/intel_guc_ads.h" 10 + #include "gt/uc/intel_guc_ct.h" 11 + #include "gt/uc/intel_guc_slpc.h" 12 + #include "gt/uc/intel_guc_submission.h" 9 13 #include "intel_guc.h" 10 14 #include "intel_guc_debugfs.h" 11 15 #include "intel_guc_log_debugfs.h" 12 - #include "gt/uc/intel_guc_ct.h" 13 - #include "gt/uc/intel_guc_ads.h" 14 - #include "gt/uc/intel_guc_submission.h" 15 - #include "gt/uc/intel_guc_slpc.h" 16 16 17 17 static int guc_info_show(struct seq_file *m, void *data) 18 18 { ··· 35 35 36 36 return 0; 37 37 } 38 - DEFINE_GT_DEBUGFS_ATTRIBUTE(guc_info); 38 + DEFINE_INTEL_GT_DEBUGFS_ATTRIBUTE(guc_info); 39 39 40 40 static int guc_registered_contexts_show(struct seq_file *m, void *data) 41 41 { ··· 49 49 50 50 return 0; 51 51 } 52 - DEFINE_GT_DEBUGFS_ATTRIBUTE(guc_registered_contexts); 52 + DEFINE_INTEL_GT_DEBUGFS_ATTRIBUTE(guc_registered_contexts); 53 53 54 54 static int guc_slpc_info_show(struct seq_file *m, void *unused) 55 55 { ··· 62 62 63 63 return intel_guc_slpc_print_info(slpc, &p); 64 64 } 65 - DEFINE_GT_DEBUGFS_ATTRIBUTE(guc_slpc_info); 65 + DEFINE_INTEL_GT_DEBUGFS_ATTRIBUTE(guc_slpc_info); 66 66 67 67 static bool intel_eval_slpc_support(void *data) 68 68 { ··· 73 73 74 74 void intel_guc_debugfs_register(struct intel_guc *guc, struct dentry *root) 75 75 { 76 - static const struct debugfs_gt_file files[] = { 76 + static const struct intel_gt_debugfs_file files[] = { 77 77 { "guc_info", &guc_info_fops, NULL }, 78 78 { "guc_registered_contexts", &guc_registered_contexts_fops, NULL }, 79 79 { "guc_slpc_info", &guc_slpc_info_fops, &intel_eval_slpc_support},
+4 -4
drivers/gpu/drm/i915/gt/uc/intel_guc_log_debugfs.c
··· 6 6 #include <linux/fs.h> 7 7 #include <drm/drm_print.h> 8 8 9 - #include "gt/debugfs_gt.h" 9 + #include "gt/intel_gt_debugfs.h" 10 10 #include "intel_guc.h" 11 11 #include "intel_guc_log.h" 12 12 #include "intel_guc_log_debugfs.h" ··· 17 17 18 18 return intel_guc_log_dump(m->private, &p, false); 19 19 } 20 - DEFINE_GT_DEBUGFS_ATTRIBUTE(guc_log_dump); 20 + DEFINE_INTEL_GT_DEBUGFS_ATTRIBUTE(guc_log_dump); 21 21 22 22 static int guc_load_err_log_dump_show(struct seq_file *m, void *data) 23 23 { ··· 25 25 26 26 return intel_guc_log_dump(m->private, &p, true); 27 27 } 28 - DEFINE_GT_DEBUGFS_ATTRIBUTE(guc_load_err_log_dump); 28 + DEFINE_INTEL_GT_DEBUGFS_ATTRIBUTE(guc_load_err_log_dump); 29 29 30 30 static int guc_log_level_get(void *data, u64 *val) 31 31 { ··· 109 109 void intel_guc_log_debugfs_register(struct intel_guc_log *log, 110 110 struct dentry *root) 111 111 { 112 - static const struct debugfs_gt_file files[] = { 112 + static const struct intel_gt_debugfs_file files[] = { 113 113 { "guc_log_dump", &guc_log_dump_fops, NULL }, 114 114 { "guc_load_err_log_dump", &guc_load_err_log_dump_fops, NULL }, 115 115 { "guc_log_level", &guc_log_level_fops, NULL },
+3 -3
drivers/gpu/drm/i915/gt/uc/intel_huc_debugfs.c
··· 5 5 6 6 #include <drm/drm_print.h> 7 7 8 - #include "gt/debugfs_gt.h" 8 + #include "gt/intel_gt_debugfs.h" 9 9 #include "intel_huc.h" 10 10 #include "intel_huc_debugfs.h" 11 11 ··· 21 21 22 22 return 0; 23 23 } 24 - DEFINE_GT_DEBUGFS_ATTRIBUTE(huc_info); 24 + DEFINE_INTEL_GT_DEBUGFS_ATTRIBUTE(huc_info); 25 25 26 26 void intel_huc_debugfs_register(struct intel_huc *huc, struct dentry *root) 27 27 { 28 - static const struct debugfs_gt_file files[] = { 28 + static const struct intel_gt_debugfs_file files[] = { 29 29 { "huc_info", &huc_info_fops, NULL }, 30 30 }; 31 31
+3 -3
drivers/gpu/drm/i915/gt/uc/intel_uc_debugfs.c
··· 6 6 #include <linux/debugfs.h> 7 7 #include <drm/drm_print.h> 8 8 9 - #include "gt/debugfs_gt.h" 9 + #include "gt/intel_gt_debugfs.h" 10 10 #include "intel_guc_debugfs.h" 11 11 #include "intel_huc_debugfs.h" 12 12 #include "intel_uc.h" ··· 32 32 33 33 return 0; 34 34 } 35 - DEFINE_GT_DEBUGFS_ATTRIBUTE(uc_usage); 35 + DEFINE_INTEL_GT_DEBUGFS_ATTRIBUTE(uc_usage); 36 36 37 37 void intel_uc_debugfs_register(struct intel_uc *uc, struct dentry *gt_root) 38 38 { 39 - static const struct debugfs_gt_file files[] = { 39 + static const struct intel_gt_debugfs_file files[] = { 40 40 { "usage", &uc_usage_fops, NULL }, 41 41 }; 42 42 struct dentry *root;