STRUCT DRM_GPUVM_EXEC(9)
π struct drm_gpuvm_exec(9) β the Kernel API Manual moment
Okay bestie, gather round, because this one is a whole vibe. This page lives in the Kernel API Manual, and it's about struct drm_gpuvm_exec, which is literally the &drm_gpuvm abstraction of &drm_exec. Yes, that's the entire NAME section, and yes, it ate. π
β¨ SYNOPSIS β¨
struct drm_gpuvm_exec {
struct drm_exec exec;
u32 flags;
struct drm_gpuvm *vm;
unsigned int num_fences;
struct {
int (*fn)(struct drm_gpuvm_exec *vm_exec);
void *priv;
} extra;
};
Look at her. Gorgeous. Structured. Stack-allocated. π
π«Ά Members π«Ά
execβ thedrm_execstructure. It's giving "the whole point" energy, honestly.flagsβ the flags for thestruct drm_exec. Little toggles, big personality.vmβ thedrm_gpuvmto lock its DMA reservations. She's the main character, obviously.num_fencesβ the number of fences to reserve for thedma_resvof the lockeddrm_gem_objects. Count 'em, bestie.extraβ callback plus corresponding private data, so the driver can lock arbitrary additionaldrm_gem_objects. Optional queen behavior. πextra.fnβ the driver callback to lock additionaldrm_gem_objects.extra.privβ driver private data for thefncallback.
πΈ Description πΈ
Okay so here's the tea: this structure should be created on the stack, as drm_exec should be. Stack. Not heap. Don't do anything weird, iykyk. π«Ά
Optionally, extra can be set in order to lock additional drm_gem_objects. That's it, that's the paragraph, and honestly? Lowkey perfect. β¨
π§ Friendly reminder that "optionally" means optional β if you don't need the extra lock-arbitrary-drm_gem_objects behavior, you don't gotta set it. No cap.
π¦ SEE ALSO π¦
Kernel file ./include/drm/drm_gpuvm.h β and the entire extended friend group:
enum drm_gpuva_flags(9)struct drm_gpuva(9)drm_gpuva_invalidate(9)drm_gpuva_invalidated(9)enum drm_gpuvm_flags(9)struct drm_gpuvm(9)drm_gpuvm_get(9)drm_gpuvm_resv_protected(9)drm_gpuvm_immediate_mode(9)drm_gpuvm_resv(9)drm_gpuvm_resv_obj(9)drm_gpuvm_is_extobj(9)drm_gpuvm_for_each_va_range(9)drm_gpuvm_for_each_va_range_safe(9)drm_gpuvm_for_each_va(9)drm_gpuvm_for_each_va_safe(9)drm_gpuvm_exec_unlock(9)drm_gpuvm_exec_resv_add_fence(9)drm_gpuvm_exec_validate(9)struct drm_gpuvm_bo(9)drm_gpuvm_bo_get(9)drm_gpuvm_bo_gem_evict(9)drm_gpuvm_bo_for_each_va(9)drm_gpuvm_bo_for_each_va_safe(9)enum drm_gpuva_op_type(9)struct drm_gpuva_op_map(9)struct drm_gpuva_op_unmap(9)struct drm_gpuva_op_remap(9)struct drm_gpuva_op_prefetch(9)struct drm_gpuva_op(9)struct drm_gpuva_ops(9)drm_gpuva_for_each_op(9)drm_gpuva_for_each_op_safe(9)drm_gpuva_for_each_op_from_reverse(9)drm_gpuva_for_each_op_reverse(9)drm_gpuva_first_op(9)drm_gpuva_last_op(9)drm_gpuva_prev_op(9)drm_gpuva_next_op(9)struct drm_gpuvm_map_req(9)struct drm_gpuvm_ops(9)drm_gpuva_op_remap_to_unmap_range(9)
Like, that's the whole group chat. Read them all. Slay. π₯
Sign-off time, babes: this masterpiece dropped from ./include/drm, dated October 2026, and it's filed under struct drm_gpuvm_exec(9) in the Kernel API Manual. Periodt. ππβ
π¦ 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