drm_gpuvm_b...p_ops_create(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drm_gpuvm_bo_unmap_ops_create β€” Kernel API Manual energy

okay so bestie, this is a page straight out of the Kernel API Manual, and we're talking about drm_gpuvm_bo_unmap_ops_create. it's giving "niche GPU virtual memory lore" and honestly? obsessed. let's get into it πŸŽ€


✨ NAME ✨

drm_gpuvm_bo_unmap_ops_create β€” creates the &drm_gpuva_ops to unmap a GEM 🌸


πŸ¦‹ SYNOPSIS πŸ¦‹

struct drm_gpuva_ops * drm_gpuvm_bo_unmap_ops_create (struct drm_gpuvm_bo *vm_bo );

like, you hand it a vm_bo and it hands you back ops. main character function behaviour fr fr πŸ’«


πŸ“ ARGUMENTS πŸ“

  • vm_bo β€” the drm_gpuvm_bo abstraction. that's it, that's the whole input, she's low maintenance πŸ’–

πŸ‘‘ DESCRIPTION πŸ‘‘

so what does she do. this function creates a list of operations to perform unmapping for every GPUVA attached to a GEM. every single one. no cap.

the list can be iterated with drm_gpuva_for_each_op and consists out of an arbitrary amount of unmap operations β€” like, "arbitrary amount" is doing a lot of work in that sentence but that's literally what the docs say, so. πŸ’…

after the caller finished processing the returned drm_gpuva_ops, they must be freed with drm_gpuva_ops_free. that's not a suggestion bestie, that's a must. memory leaks are not the vibe 😭

this function expects the caller to protect the GEM's GPUVA list against concurrent access using either the GEM's dma-resv or gpuva.lock mutex. so like... lock up before you show up, yk? πŸ”₯


🌈 RETURN 🌈

a pointer to the drm_gpuva_ops on success, an ERR_PTR on failure. so check your pointers, bestie, ERR_PTR is not a real one πŸ™ˆ


⭐ SEE ALSO ⭐

the whole friend group, honestly. iconique lineup:


so there you have it. huge slay, deeply specific, extremely kernel. this whole page lives at ./drivers/gpu/drm, dated October 2026, and the whole thing is filed under drm_gpuvm_b...p_ops_create(9) in case you need to find her again. mwah πŸ’œβœ¨

πŸ“¦ where this page comes from