xe_gt_debugfs_simple_show(9)
π NAME π
xe_gt_debugfs_simple_show β bestie, it's literally a show callback for struct drm_info_list β¨
π SYNOPSIS π
int xe_gt_debugfs_simple_show (struct seq_file *m , void *data );
π¦ ARGUMENTS π¦
mβ theseq_file, aka the whole vibe container π«Άdataβ the data used by the drm debugfs helpers, iconic of it honestly
β¨ DESCRIPTION β¨
Okay so picture this: you can drop this callback into struct drm_info_list to describe debugfs files that are xe_gt specific. That's the whole assignment, no cap π
So the assumption here β and it's a big one, so listen β is that those debugfs files get created on a directory entry whose struct dentry d_inode->i_private points to xe_gt. Like, that's the setup, that's the deal π
This function also assumes that m->private will be set to the struct drm_info_node corresponding to the instance of the info on a given struct drm_minor (peep struct drm_info_list.show for the details if you're curious, iykyk) π
And one more assumption, because this function is highkey built on trust: struct drm_info_list.data will point to the function code that will actually print a file content. The signature is giving:
int (*print)(struct xe_gt *, struct drm_printer *)
Example time, bestie, get comfy πΈ
int foo(struct xe_gt *gt, struct drm_printer *p)
{
drm_printf(p, "GTu0, gt->info.id);
return 0;
}
static const struct drm_info_list bar[] = {
{ name = "foo", .show = xe_gt_debugfs_simple_show, .data = foo },
};
dir = debugfs_create_dir("gt", parent);
dir->d_inode->i_private = gt;
drm_debugfs_create_files(bar, ARRAY_SIZE(bar), dir, minor);
Slay, that's the whole flow π₯
β RETURN β
0 on success, or a negative error code on failure. Simple. Clean. Periodt π
π SEE ALSO π
- Kernel file
./drivers/gpu/drm/xe/xe_gt_debugfs.cπ xe_gt_debugfs_show_with_rpm(9)π
Fr fr, this page lives in./drivers/gpu/drm/xe, it's dated October 2026, and it's servingxe_gt_debugfs_simple_show(9)energy the entire time. Mwah, go read the source, ily, bye π«Άπ β¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms