drm/xe: Define helper for GT specific debugfs files
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Thu, 28 Mar 2024 16:28:07 +0000 (17:28 +0100)
committerMichal Wajdeczko <michal.wajdeczko@intel.com>
Fri, 29 Mar 2024 13:00:06 +0000 (14:00 +0100)
commit19b8f86f4aaa56ee0c8ee56eb8e2b30f6d272199
tree8eac187259b244c1823a5ba08501639d0535b0d4
parentaee9781f81bb0cedd843a24f961f5067ef0cab6e
drm/xe: Define helper for GT specific debugfs files

Many of our debugfs files are GT specific and require a pointer to
struct xe_gt to correctly show its content.  Our initial approach
to use drm_info_list.data field to pass pointer not only requires
extra steps (like copying template per each GT) but also abuses
the rule that this data field should not be device specific.

Introduce helper function that will use xe_gt pointer stored at
parent directory level and use .data only to pass actual print
function that would expects xe_gt pointer as a parameter.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://lore.kernel.org/r/20240214115756.1525-3-michal.wajdeczko@intel.com
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240328162808.451-3-michal.wajdeczko@intel.com
drivers/gpu/drm/xe/xe_gt_debugfs.c
drivers/gpu/drm/xe/xe_gt_debugfs.h