mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 04:04:43 +01:00
drm/i915: use drm->debugfs_root for creating debugfs files
Since commit 0b30d57aca ("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>
This commit is contained in:
parent
c5b9077eca
commit
f9b5bf76ea
5 changed files with 21 additions and 22 deletions
|
|
@ -82,14 +82,15 @@ static void gt_debugfs_register(struct intel_gt *gt, struct dentry *root)
|
|||
|
||||
void intel_gt_debugfs_register(struct intel_gt *gt)
|
||||
{
|
||||
struct dentry *debugfs_root = gt->i915->drm.debugfs_root;
|
||||
struct dentry *root;
|
||||
char gtname[4];
|
||||
|
||||
if (!gt->i915->drm.primary->debugfs_root)
|
||||
if (!debugfs_root)
|
||||
return;
|
||||
|
||||
snprintf(gtname, sizeof(gtname), "gt%u", gt->info.id);
|
||||
root = debugfs_create_dir(gtname, gt->i915->drm.primary->debugfs_root);
|
||||
root = debugfs_create_dir(gtname, debugfs_root);
|
||||
if (IS_ERR(root))
|
||||
return;
|
||||
|
||||
|
|
|
|||
|
|
@ -720,26 +720,24 @@ static const struct i915_debugfs_files {
|
|||
{"i915_gem_drop_caches", &i915_drop_caches_fops},
|
||||
};
|
||||
|
||||
void i915_debugfs_register(struct drm_i915_private *dev_priv)
|
||||
void i915_debugfs_register(struct drm_i915_private *i915)
|
||||
{
|
||||
struct drm_minor *minor = dev_priv->drm.primary;
|
||||
struct dentry *debugfs_root = i915->drm.debugfs_root;
|
||||
int i;
|
||||
|
||||
i915_debugfs_params(dev_priv);
|
||||
i915_debugfs_params(i915);
|
||||
|
||||
debugfs_create_file("i915_forcewake_user", S_IRUSR, minor->debugfs_root,
|
||||
to_i915(minor->dev), &i915_forcewake_fops);
|
||||
debugfs_create_file("i915_forcewake_user", S_IRUSR, debugfs_root,
|
||||
i915, &i915_forcewake_fops);
|
||||
for (i = 0; i < ARRAY_SIZE(i915_debugfs_files); i++) {
|
||||
debugfs_create_file(i915_debugfs_files[i].name,
|
||||
S_IRUGO | S_IWUSR,
|
||||
minor->debugfs_root,
|
||||
to_i915(minor->dev),
|
||||
debugfs_create_file(i915_debugfs_files[i].name, S_IRUGO | S_IWUSR,
|
||||
debugfs_root, i915,
|
||||
i915_debugfs_files[i].fops);
|
||||
}
|
||||
|
||||
drm_debugfs_create_files(i915_debugfs_list,
|
||||
ARRAY_SIZE(i915_debugfs_list),
|
||||
minor->debugfs_root, minor);
|
||||
debugfs_root, i915->drm.primary);
|
||||
|
||||
i915_gpu_error_debugfs_register(dev_priv);
|
||||
i915_gpu_error_debugfs_register(i915);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -248,11 +248,11 @@ i915_debugfs_create_charp(const char *name, umode_t mode,
|
|||
/* add a subdirectory with files for each i915 param */
|
||||
struct dentry *i915_debugfs_params(struct drm_i915_private *i915)
|
||||
{
|
||||
struct drm_minor *minor = i915->drm.primary;
|
||||
struct dentry *debugfs_root = i915->drm.debugfs_root;
|
||||
struct i915_params *params = &i915->params;
|
||||
struct dentry *dir;
|
||||
|
||||
dir = debugfs_create_dir("i915_params", minor->debugfs_root);
|
||||
dir = debugfs_create_dir("i915_params", debugfs_root);
|
||||
if (IS_ERR(dir))
|
||||
return dir;
|
||||
|
||||
|
|
|
|||
|
|
@ -2445,11 +2445,11 @@ static const struct file_operations i915_error_state_fops = {
|
|||
|
||||
void i915_gpu_error_debugfs_register(struct drm_i915_private *i915)
|
||||
{
|
||||
struct drm_minor *minor = i915->drm.primary;
|
||||
struct dentry *debugfs_root = i915->drm.debugfs_root;
|
||||
|
||||
debugfs_create_file("i915_error_state", 0644, minor->debugfs_root, i915,
|
||||
debugfs_create_file("i915_error_state", 0644, debugfs_root, i915,
|
||||
&i915_error_state_fops);
|
||||
debugfs_create_file("i915_gpu_info", 0644, minor->debugfs_root, i915,
|
||||
debugfs_create_file("i915_gpu_info", 0644, debugfs_root, i915,
|
||||
&i915_gpu_info_fops);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -69,17 +69,17 @@ DEFINE_SIMPLE_ATTRIBUTE(pxp_terminate_fops, pxp_terminate_get, pxp_terminate_set
|
|||
|
||||
void intel_pxp_debugfs_register(struct intel_pxp *pxp)
|
||||
{
|
||||
struct drm_minor *minor;
|
||||
struct dentry *debugfs_root;
|
||||
struct dentry *pxproot;
|
||||
|
||||
if (!intel_pxp_is_supported(pxp))
|
||||
return;
|
||||
|
||||
minor = pxp->ctrl_gt->i915->drm.primary;
|
||||
if (!minor->debugfs_root)
|
||||
debugfs_root = pxp->ctrl_gt->i915->drm.debugfs_root;
|
||||
if (!debugfs_root)
|
||||
return;
|
||||
|
||||
pxproot = debugfs_create_dir("pxp", minor->debugfs_root);
|
||||
pxproot = debugfs_create_dir("pxp", debugfs_root);
|
||||
if (IS_ERR(pxproot))
|
||||
return;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue