STRUCT DRM_I915_QUERY_ITEM(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 (see struct drm_i915_query_topology_info)
    • DRM_I915_QUERY_ENGINE_INFO (see struct drm_i915_engine_info)
    • DRM_I915_QUERY_PERF_CONFIG (see struct drm_i915_query_perf_config)
    • DRM_I915_QUERY_MEMORY_REGIONS (see struct drm_i915_query_memory_regions)
    • DRM_I915_QUERY_HWCONFIG_BLOB (see GuC HWCONFIG blob uAPI)
    • DRM_I915_QUERY_GEOMETRY_SUBSLICES (see struct drm_i915_query_topology_info)
    • DRM_I915_QUERY_GUC_SUBMISSION_VERSION (see struct 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 the data_ptr pointer πŸ“ 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 🚨 when query_id == DRM_I915_QUERY_TOPOLOGY_INFO, it must be 0.

When query_id == DRM_I915_QUERY_PERF_CONFIG, it must be one of these:

  • DRM_I915_QUERY_PERF_CONFIG_LIST
  • DRM_I915_QUERY_PERF_CONFIG_DATA_FOR_UUID
  • DRM_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 wherever data_ptr points, but only when the value of length matches 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