STRUCT DRM_I915_QUERY_ITEM(9)
π struct drm_i915_query_item(9) π
okay so bestie, welcome to the struct drm_i915_query_item(9) page from the Kernel API Manual β¨ this is the little struct you hand to the kernel when you want it to go fetch you some info β think of it as your query's main character energy π«Ά
πΈ NAME πΈ
struct drm_i915_query_item β literally just an individual query for the kernel to process π
β¨ SYNOPSIS β¨
struct drm_i915_query_item {
__u64 query_id;
#define DRM_I915_QUERY_TOPOLOGY_INFO 1;
#define DRM_I915_QUERY_ENGINE_INFO 2;
#define DRM_I915_QUERY_PERF_CONFIG 3;
#define DRM_I915_QUERY_MEMORY_REGIONS 4;
#define DRM_I915_QUERY_HWCONFIG_BLOB 5;
#define DRM_I915_QUERY_GEOMETRY_SUBSLICES 6;
#define DRM_I915_QUERY_GUC_SUBMISSION_VERSION 7;
__s32 length;
__u32 flags;
#define DRM_I915_QUERY_PERF_CONFIG_LIST 1;
#define DRM_I915_QUERY_PERF_CONFIG_DATA_FOR_UUID 2;
#define DRM_I915_QUERY_PERF_CONFIG_DATA_FOR_ID 3;
__u64 data_ptr;
};
π Members π
query_idβ the id for this query π― and rn the accepted query IDs are, in no particular order (okay, in this order):DRM_I915_QUERY_TOPOLOGY_INFO(seestruct drm_i915_query_topology_info)DRM_I915_QUERY_ENGINE_INFO(seestruct drm_i915_engine_info)DRM_I915_QUERY_PERF_CONFIG(seestruct drm_i915_query_perf_config)DRM_I915_QUERY_MEMORY_REGIONS(seestruct drm_i915_query_memory_regions)DRM_I915_QUERY_HWCONFIG_BLOB(seeGuC HWCONFIG blob uAPI)DRM_I915_QUERY_GEOMETRY_SUBSLICES(seestruct drm_i915_query_topology_info)DRM_I915_QUERY_GUC_SUBMISSION_VERSION(seestruct drm_i915_query_guc_submission_version)
lengthβ when userspace sets this to zero, the kernel fills it in with the size of the data that's gonna be written at thedata_ptrpointer π and if a particular query item goes wrong, the kernel sets this value to a negative value to signal that error π so yeah, check it.flagsβ okay so this one's got rules π¨ whenquery_id == DRM_I915_QUERY_TOPOLOGY_INFO, it must be0.
When query_id == DRM_I915_QUERY_PERF_CONFIG, it must be one of these:
DRM_I915_QUERY_PERF_CONFIG_LISTDRM_I915_QUERY_PERF_CONFIG_DATA_FOR_UUIDDRM_I915_QUERY_PERF_CONFIG_FOR_UUID
When query_id == DRM_I915_QUERY_GEOMETRY_SUBSLICES it must contain a struct i915_engine_class_instance that references a render engine π
data_ptrβ the data gets written at whereverdata_ptrpoints, but only when the value oflengthmatches the length of the data the kernel is gonna write π«
π¦ Description π¦
The whole vibe is determined by the query_id β it's giving "you pick the lane, kernel handles the rest" π and note that exactly what data_ptr is also depends on the specific query_id π like, that's the whole plot twist.
π SEE ALSO π
bestie, the reading list is long but we stan a thorough cross-reference π«Ά
- Kernel file
./tools/perf/trace/beauty/include/uapi/drm/i915_drm.h uevents generated by i915 on its device node(9)struct i915_user_extension(9)enum drm_i915_gem_engine_class(9)struct i915_engine_class_instance(9)perf_events exposed by i915 through /sys/bus/event_sources/drivers/i915(9)struct drm_i915_getparam(9)drm_i915_getparam_t(9)struct drm_i915_gem_mmap_offset(9)struct drm_i915_gem_set_domain(9)struct drm_i915_gem_exec_fence(9)struct drm_i915_gem_execbuffer_ext_timeline_fences(9)struct drm_i915_gem_execbuffer2(9)struct drm_i915_gem_caching(9)struct drm_i915_gem_context_create_ext(9)struct drm_i915_gem_context_param(9)Virtual Engine uAPI(9)struct i915_context_engines_parallel_submit(9)Context Engine Map uAPI(9)struct drm_i915_gem_context_create_ext_setparam(9)struct drm_i915_gem_vm_control(9)struct drm_i915_gem_userptr(9)struct drm_i915_perf_oa_config(9)struct drm_i915_query(9)struct drm_i915_query_topology_info(9)Engine Discovery uAPI(9)struct drm_i915_engine_info(9)struct drm_i915_query_engine_info(9)struct drm_i915_query_perf_config(9)enum drm_i915_gem_memory_class(9)struct drm_i915_gem_memory_class_instance(9)struct drm_i915_memory_region_info(9)struct drm_i915_query_memory_regions(9)struct drm_i915_query_guc_submission_version(9)GuC HWCONFIG blob uAPI(9)struct drm_i915_gem_create_ext(9)struct drm_i915_gem_create_ext_memory_regions(9)struct drm_i915_gem_create_ext_protected_content(9)struct drm_i915_gem_create_ext_set_pat(9)
ngl, the DRM_I915_QUERY_PERF_CONFIG_FOR_UUID entry in that flags list is exactly how it's written here β I'm not out here editing manpages, I'm just relaying the lore π
and that's the whole page, bestie! π§ source/version: ./tools/perf/trace/beauty/incl... β dated October 2026 β and we close it out with struct drm_i915_query_item(9) π ty for reading, mwah π
π¦ 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