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

Configure Feed

Select the types of activity you want to include in your feed.

drm/i915: use drm->debugfs_root for creating debugfs files

Since commit 0b30d57acafc ("drm/debugfs: rework debugfs directory
creation v5") we should be using drm->debugfs_root instead of
minor->debugfs_root for creating debugfs files.

Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/ba8a2a7ec10e54b4d0a96926ef20c96e268c0b94.1753782998.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>

+21 -22
+3 -2
drivers/gpu/drm/i915/gt/intel_gt_debugfs.c
··· 82 82 83 83 void intel_gt_debugfs_register(struct intel_gt *gt) 84 84 { 85 + struct dentry *debugfs_root = gt->i915->drm.debugfs_root; 85 86 struct dentry *root; 86 87 char gtname[4]; 87 88 88 - if (!gt->i915->drm.primary->debugfs_root) 89 + if (!debugfs_root) 89 90 return; 90 91 91 92 snprintf(gtname, sizeof(gtname), "gt%u", gt->info.id); 92 - root = debugfs_create_dir(gtname, gt->i915->drm.primary->debugfs_root); 93 + root = debugfs_create_dir(gtname, debugfs_root); 93 94 if (IS_ERR(root)) 94 95 return; 95 96
+9 -11
drivers/gpu/drm/i915/i915_debugfs.c
··· 720 720 {"i915_gem_drop_caches", &i915_drop_caches_fops}, 721 721 }; 722 722 723 - void i915_debugfs_register(struct drm_i915_private *dev_priv) 723 + void i915_debugfs_register(struct drm_i915_private *i915) 724 724 { 725 - struct drm_minor *minor = dev_priv->drm.primary; 725 + struct dentry *debugfs_root = i915->drm.debugfs_root; 726 726 int i; 727 727 728 - i915_debugfs_params(dev_priv); 728 + i915_debugfs_params(i915); 729 729 730 - debugfs_create_file("i915_forcewake_user", S_IRUSR, minor->debugfs_root, 731 - to_i915(minor->dev), &i915_forcewake_fops); 730 + debugfs_create_file("i915_forcewake_user", S_IRUSR, debugfs_root, 731 + i915, &i915_forcewake_fops); 732 732 for (i = 0; i < ARRAY_SIZE(i915_debugfs_files); i++) { 733 - debugfs_create_file(i915_debugfs_files[i].name, 734 - S_IRUGO | S_IWUSR, 735 - minor->debugfs_root, 736 - to_i915(minor->dev), 733 + debugfs_create_file(i915_debugfs_files[i].name, S_IRUGO | S_IWUSR, 734 + debugfs_root, i915, 737 735 i915_debugfs_files[i].fops); 738 736 } 739 737 740 738 drm_debugfs_create_files(i915_debugfs_list, 741 739 ARRAY_SIZE(i915_debugfs_list), 742 - minor->debugfs_root, minor); 740 + debugfs_root, i915->drm.primary); 743 741 744 - i915_gpu_error_debugfs_register(dev_priv); 742 + i915_gpu_error_debugfs_register(i915); 745 743 }
+2 -2
drivers/gpu/drm/i915/i915_debugfs_params.c
··· 248 248 /* add a subdirectory with files for each i915 param */ 249 249 struct dentry *i915_debugfs_params(struct drm_i915_private *i915) 250 250 { 251 - struct drm_minor *minor = i915->drm.primary; 251 + struct dentry *debugfs_root = i915->drm.debugfs_root; 252 252 struct i915_params *params = &i915->params; 253 253 struct dentry *dir; 254 254 255 - dir = debugfs_create_dir("i915_params", minor->debugfs_root); 255 + dir = debugfs_create_dir("i915_params", debugfs_root); 256 256 if (IS_ERR(dir)) 257 257 return dir; 258 258
+3 -3
drivers/gpu/drm/i915/i915_gpu_error.c
··· 2445 2445 2446 2446 void i915_gpu_error_debugfs_register(struct drm_i915_private *i915) 2447 2447 { 2448 - struct drm_minor *minor = i915->drm.primary; 2448 + struct dentry *debugfs_root = i915->drm.debugfs_root; 2449 2449 2450 - debugfs_create_file("i915_error_state", 0644, minor->debugfs_root, i915, 2450 + debugfs_create_file("i915_error_state", 0644, debugfs_root, i915, 2451 2451 &i915_error_state_fops); 2452 - debugfs_create_file("i915_gpu_info", 0644, minor->debugfs_root, i915, 2452 + debugfs_create_file("i915_gpu_info", 0644, debugfs_root, i915, 2453 2453 &i915_gpu_info_fops); 2454 2454 } 2455 2455
+4 -4
drivers/gpu/drm/i915/pxp/intel_pxp_debugfs.c
··· 69 69 70 70 void intel_pxp_debugfs_register(struct intel_pxp *pxp) 71 71 { 72 - struct drm_minor *minor; 72 + struct dentry *debugfs_root; 73 73 struct dentry *pxproot; 74 74 75 75 if (!intel_pxp_is_supported(pxp)) 76 76 return; 77 77 78 - minor = pxp->ctrl_gt->i915->drm.primary; 79 - if (!minor->debugfs_root) 78 + debugfs_root = pxp->ctrl_gt->i915->drm.debugfs_root; 79 + if (!debugfs_root) 80 80 return; 81 81 82 - pxproot = debugfs_create_dir("pxp", minor->debugfs_root); 82 + pxproot = debugfs_create_dir("pxp", debugfs_root); 83 83 if (IS_ERR(pxproot)) 84 84 return; 85 85