STRUCT I915_USER_EXTENSION(9)
β¨ struct i915_user_extension(9) β¨
okay so bestie, welcome to the Kernel API Manual π this one's all about struct i915_user_extension β literally the base class for defining a chain of extensions. it's giving "linked list but make it uAPI" and honestly? iconic. π
πΈ NAME πΈ
struct i915_user_extension β base class for defining a chain of extensions π¦
β¨ SYNOPSIS β¨
struct i915_user_extension {
__u64 next_extension;
__u32 name;
__u32 flags;
__u32 rsvd[4];
};
π Members π
next_extensionβ pointer to the nextstruct i915_user_extension, or zero if you've hit the end of the chain. that's the "no more besties after me" signal πnameβ the name of the extension.
note that the name here is just some integer. like, don't go looking for a string, it's not that kind of party π
also note: the namespace for this is not global for the whole driver. its scope/meaning is limited to the specific piece of uAPI which has embedded the struct i915_user_extension. so like, context matters, always π
flagsβ MBZ. all undefined bits must be zero. no cap, zero means zero πrsvdβ MBZ. reserved for future use; must be zero. it's literally sitting there being saved for later, main character energy π
π Description π
many interfaces need to grow over time. in most cases we can simply extend the struct and have userspace pass in more data. another option β as demonstrated by Vulkan's approach to providing extensions for forward and backward compatibility β is to use a list of optional structs to provide those extra details. slay, honestly π«Ά
the key advantage to using an extension chain is that it lets us redefine the interface more easily than an ever growing struct of increasing complexity, and it lets large parts of that interface be entirely optional. the downside? more pointer chasing π specifically, chasing across the __user boundary with pointers encapsulated inside u64. it's giving "trust me bro, it's worth it."
example chaining:
struct i915_user_extension ext3 {
.next_extension = 0, // end
.name = ...,
};
struct i915_user_extension ext2 {
.next_extension = (uintptr_t)ext3,
.name = ...,
};
struct i915_user_extension ext1 {
.next_extension = (uintptr_t)ext2,
.name = ...,
};
typically the struct i915_user_extension would be embedded in some uAPI struct, and in this case we would feed it the head of the chain (i.e ext1), which would then apply all of the above extensions. head of the chain = first one in the group chat, and she passes the message along π
π₯ SEE ALSO π₯
- Kernel file
./tools/perf/trace/beauty/include/uapi/drm/i915_drm.h - uevents generated by i915 on its device node(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_item(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)
and that's the whole page, bestie, you ate that π before you go: this lil beauty came from ./tools/perf/trace/beauty/incl... and she's dated October 2026, so jot that down in your notes app π mwah, go forth and chain your extensions responsibly ππ§
π¦ 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