xe_gt_debugfs_simple_show(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 β€” the seq_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 🌈


Fr fr, this page lives in ./drivers/gpu/drm/xe, it's dated October 2026, and it's serving xe_gt_debugfs_simple_show(9) energy the entire time. Mwah, go read the source, ily, bye πŸ«ΆπŸ’…βœ¨
πŸ“¦ where this page comes from