drm_gpuvm_exec_lock(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so bestie, we're deep in the Kernel API Manual and today's main character is drm_gpuvm_exec_lock(9) β€” she's here to lock all dma-resv of all associated BOs, no cap. ✨

🌸 NAME 🌸

drm_gpuvm_exec_lock β€” lock all dma-resv of all associated BOs. πŸ’…

✨ SYNOPSIS ✨

int drm_gpuvm_exec_lock (struct drm_gpuvm_exec *vm_exec );

πŸŽ€ ARGUMENTS πŸŽ€

  • vm_exec β€” the drm_gpuvm_exec wrapper. That's the whole arg, bestie. 🫢

πŸ’… DESCRIPTION πŸ’…

Okay so here's the tea: this function acquires all dma-resv locks of all drm_gem_objects the given drm_gpuvm contains mappings of. Literally all the locks, all the mappings, the whole vibe check. πŸ”₯

Additionally, when calling this function with struct drm_gpuvm_exec::extra being set, the driver receives the given fn callback to lock additional dma-resv in the context of the drm_gpuvm_exec instance. And typically, drivers would call drm_exec_prepare_obj from within this callback. Obsessed with a callback that knows its assignment. πŸ’–

πŸ”₯ RETURN πŸ”₯

0 on success, negative error code on failure. Slay when it's zero; when it's negative, that's the sad trombone. 😭

🌈 SEE ALSO 🌈

Kernel file ./drivers/gpu/drm/drm_gpuvm.c plus the whole SEE ALSO squad:


β€” signing off from ./drivers/gpu/drm, October 2026. mwah πŸ’–

πŸ“¦ where this page comes from