diff options
| author | Michal Wajdeczko <michal.wajdeczko@intel.com> | 2024-03-28 17:28:06 +0100 |
|---|---|---|
| committer | Michal Wajdeczko <michal.wajdeczko@intel.com> | 2024-03-29 14:00:05 +0100 |
| commit | aee9781f81bb0cedd843a24f961f5067ef0cab6e (patch) | |
| tree | a8edfa2ff01411975a6d2d97cf3041adf766e4aa | |
| parent | ca83f9d20171ce1ba5f82fb28b77eddabd636443 (diff) | |
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: Rodrigo Vivi <rodrigo.vivi@intel.com>
Acked-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/20240214115756.1525-2-michal.wajdeczko@intel.com
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240328162808.451-2-michal.wajdeczko@intel.com
| -rw-r--r-- | drivers/gpu/drm/xe/xe_gt_debugfs.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/xe/xe_gt_debugfs.c b/drivers/gpu/drm/xe/xe_gt_debugfs.c index 6b4dc2927727..abec616927f0 100644 --- a/drivers/gpu/drm/xe/xe_gt_debugfs.c +++ b/drivers/gpu/drm/xe/xe_gt_debugfs.c @@ -269,6 +269,13 @@ void xe_gt_debugfs_register(struct xe_gt *gt) } /* + * 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 * entry and drm_debugfs_create_files just references the drm_info_list * passed in (e.g. can't define this on the stack). |
