STRUCT DRM_XE_GT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct drm_xe_gt(9) πŸ’…

okay bestie, buckle up β€” this is a page straight out of the Kernel API Manual, and it's all about struct drm_xe_gt, which is literally just the glow-up description of one single GT. that's it. that's the whole vibe. let's get into it 🫢


✨ NAME ✨

struct drm_xe_gt β€” describe an individual GT. one GT. a whole little profile card for it. slay πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

struct drm_xe_gt {
  #define DRM_XE_QUERY_GT_TYPE_MAIN               0;
  #define DRM_XE_QUERY_GT_TYPE_MEDIA              1;
    __u16 type;
    __u16 tile_id;
    __u16 gt_id;
    __u16 pad[3];
    __u32 reference_clock;
    __u64 near_mem_regions;
    __u64 far_mem_regions;
    __u16 ip_ver_major;
    __u16 ip_ver_minor;
    __u16 ip_ver_rev;
    __u16 pad2;
    __u64 reserved[7];
 };

like… look at it. it's giving "humble struct, big responsibilities." no cap 🌸


πŸŽ€ Members πŸŽ€

  • type β€” the GT type: Main or Media. that's the whole personality check ✨
  • tile_id β€” the Tile ID where this GT lives. and bestie, this is (Information only) β€” like, it's tea, not a directive πŸ™ˆ
  • gt_id β€” the unique ID of this GT within the PCI Device. its little passport number πŸ¦‹
  • pad β€” MBZ. (that's "must be zero," so like… leave it alone, it's not your moment) πŸ’€
  • reference_clock β€” a clock frequency for timestamp. the metronome of the whole operation πŸ‘‘
  • near_mem_regions β€” a bit mask of instances from drm_xe_query_mem_regions that are nearest to the current engines of this GT. each index in this mask refers directly to the struct drm_xe_query_mem_regions' instance, and β€” important β€” no assumptions should be made about order. the type of each region is described by struct drm_xe_query_mem_regions' mem_class. so close to home it can smell the engines πŸ”₯
  • far_mem_regions β€” a bit mask of instances from drm_xe_query_mem_regions that are far from the engines of this GT. in general, they have extra indirections when compared to the near_mem_regions. for a discrete device this could mean system memory and memory living in a different tile. each index in this mask refers directly to the struct drm_xe_query_mem_regions' instance, and again β€” no assumptions should be made about order. the type of each region is described by struct drm_xe_query_mem_regions' mem_class. long-distance relationship energy 😭
  • ip_ver_major β€” Graphics/media IP major version on GMD_ID platforms 🌈
  • ip_ver_minor β€” Graphics/media IP minor version on GMD_ID platforms ⭐
  • ip_ver_rev β€” Graphics/media IP revision version on GMD_ID platforms 🧚
  • pad2 β€” MBZ. second pad, same rule, still not your moment πŸ’€
  • reserved β€” Reserved. like a "do not disturb" sign but for bytes πŸ“

πŸ’– Description πŸ’–

so here's the lore: this struct is meant to be used with drm_xe_query_gt_list, which will return a list with all the existing GT individual descriptions. and what even is a GT? Graphics Technology (GT) is a subset of a GPU/tile that is responsible for implementing graphics and/or media operations. it's a little specialized department inside the bigger GPU building, iykyk 🏒✨

the index in type can be:

  • DRM_XE_QUERY_GT_TYPE_MAIN
  • DRM_XE_QUERY_GT_TYPE_MEDIA

those are the only two options, bestie. pick your fighter πŸ’…


πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./include/uapi/drm/xe_drm.h β€” and honestly the whole friend group showed up, so let's shout them out one by one, in order, no skips:

  • Xe Device Block Diagram(9)
  • Xe uAPI Overview(9)
  • Xe IOCTL Extensions(9)
  • struct drm_xe_user_extension(9)
  • struct drm_xe_ext_set_property(9)
  • struct drm_xe_engine_class_instance(9)
  • struct drm_xe_engine(9)
  • struct drm_xe_query_engines(9)
  • enum drm_xe_memory_class(9)
  • struct drm_xe_mem_region(9)
  • struct drm_xe_query_mem_regions(9)
  • struct drm_xe_query_config(9)
  • struct drm_xe_query_gt_list(9)
  • struct drm_xe_query_topology_mask(9)
  • struct drm_xe_query_engine_cycles(9)
  • struct drm_xe_query_uc_fw_version(9)
  • struct drm_xe_query_pxp_status(9)
  • struct drm_xe_device_query(9)
  • struct drm_xe_gem_create(9)
  • struct drm_xe_gem_mmap_offset(9)
  • struct drm_xe_vm_create(9)
  • struct drm_xe_vm_destroy(9)
  • struct drm_xe_vm_bind_op(9)
  • struct drm_xe_vm_bind(9)
  • struct drm_xe_vm_get_property(9)
  • struct drm_xe_exec_queue_create(9)
  • struct drm_xe_exec_queue_destroy(9)
  • struct drm_xe_exec_queue_get_property(9)
  • struct drm_xe_sync(9)
  • struct drm_xe_exec(9)
  • struct drm_xe_wait_user_fence(9)
  • enum drm_xe_observation_type(9)
  • enum drm_xe_observation_op(9)
  • struct drm_xe_observation_param(9)
  • enum drm_xe_observation_ioctls(9)
  • enum drm_xe_oa_unit_type(9)
  • struct drm_xe_oa_unit(9)
  • struct drm_xe_query_oa_units(9)
  • enum drm_xe_oa_format_type(9)
  • enum drm_xe_oa_property_id(9)
  • struct drm_xe_oa_config(9)
  • struct drm_xe_oa_stream_status(9)
  • struct drm_xe_oa_stream_info(9)
  • enum drm_xe_pxp_session_type(9)
  • enum drm_xe_eu_stall_property_id(9)
  • struct drm_xe_query_eu_stall(9)
  • struct drm_xe_madvise(9)
  • struct drm_xe_mem_range_attr(9)
  • struct drm_xe_vm_query_mem_range_attr(9)
  • struct drm_xe_exec_queue_set_property(9)
  • Xe DRM RAS(9)
  • enum drm_xe_ras_error_severity(9)
  • enum drm_xe_ras_error_component(9)
that's the entire group chat tagged. don't leave anyone on read 🫢

and that's the page!! mwah πŸ’‹ this one came from ./include/uapi/drm, dated October 2026, and it's filed under struct drm_xe_gt(9) β€” go be iconic with your GTs, bestie. periodt. πŸ‘‘βœ¨

πŸ“¦ where this page comes from