Commit aee9781f authored by Michal Wajdeczko's avatar Michal Wajdeczko

drm/xe: Store pointer to struct xe_gt in gt/ debugfs directory

Attributes added under 'gt/' directories may wish to use that
in case they can't obtain it from elsewhere.
Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
Acked-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/20240214115756.1525-2-michal.wajdeczko@intel.comSigned-off-by: default avatarMichal Wajdeczko <michal.wajdeczko@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240328162808.451-2-michal.wajdeczko@intel.com
parent ca83f9d2
...@@ -268,6 +268,13 @@ void xe_gt_debugfs_register(struct xe_gt *gt) ...@@ -268,6 +268,13 @@ void xe_gt_debugfs_register(struct xe_gt *gt)
return; return;
} }
/*
* Store the xe_gt pointer as private data of the gt/ directory node
* so other GT specific attributes under that directory may refer to
* it by looking at its parent node private data.
*/
root->d_inode->i_private = gt;
/* /*
* Allocate local copy as we need to pass in the GT to the debugfs * Allocate local copy as we need to pass in the GT to the debugfs
* entry and drm_debugfs_create_files just references the drm_info_list * entry and drm_debugfs_create_files just references the drm_info_list
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment