drm_gpuva_o..._unmap_range(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drm_gpuva_op_remap_to_unmap_range(9) β€” from the Kernel API Manual, bestie

okay so real talk, this is a page about one tiny helper function in the kernel's DRM/GPUVM universe, and it's genuinely not that deep once you see what it's doing. it's from the Kernel API Manual (section 9), and no cap it's a little cutie. let's get into it ✨


🌸 NAME 🌸

drm_gpuva_op_remap_to_unmap_range β€” a helper that hands you the start address and the range of the unmap stage of a remap op. that's it. that's the whole job. πŸŽ€


✨ SYNOPSIS ✨

void drm_gpuva_op_remap_to_unmap_range (const struct drm_gpuva_op_remap
*op , u64 *start_addr , u64 *range );

like, look at it. it takes a remap op, and it fills in two output pointers for you. lowkey elegant πŸ’…


🫢 ARGUMENTS 🫢

  • op β€” the remap op itself. that's the input, bestie, that's what we're reading from. Remap op.
  • start_addr β€” an output pointer 🌟 this is where the start of the required unmap gets written. it's a pointer to a u64, so it's got somewhere to actually put that value.
  • range β€” also an output pointer, also a u64 🎯 this one receives the length of the required unmap.

two outs, one in. classic. iykyk.


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the vibe: this function sets the given start address and range so that they represent the range of the address space that was previously covered by the mapping being re-mapped, but is now empty. πŸ«₯

the way that works is β€” that chunk of address space used to have a mapping sitting on it, and after the remap it's just… not occupied anymore. so you need to unmap it. this helper is literally just telling you "hey bestie, here's where that empty leftover starts, and here's how long it is." that's the entire personality. it's giving "here's your unmap coordinates, go slay." πŸ”₯

no clever allocation, no side quests. you pass in pointers, it fills them in, you go do the unmap. periodt. πŸ’œ


πŸ‘‘ SEE ALSO πŸ‘‘

the kernel file is ./include/drm/drm_gpuvm.h β€” that's where the whole friend group lives 🏠 and here's every single one of them, no gatekeeping:

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), struct drm_gpuvm_exec(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)

like, that is a list. go read them, they're all right there in ./include/drm 🧚


and that's the whole page, bestie!! this little icon came to you from the source at ./include/drm, dated October 2026, and it's filed under drm_gpuva_o..._unmap_range(9) in the Kernel API Manual πŸ’– mwah, go unmap something responsibly 🌈⭐

πŸ“¦ where this page comes from