STRUCT DRM_GPUVA_OP_REMAP(9)
π struct drm_gpuva_op_remap(9) β GPU VA remap operation π
okay so bestie, welcome to the Kernel API Manual β¨ (yes that's the manual name, we're being fancy today). This one's about struct drm_gpuva_op_remap, and honestly it's giving "quietly iconic supporting character" energy β it doesn't do the whole job itself, it just tells the driver how the mapping situation got split. Let's get into it π
β¨ NAME β¨
struct drm_gpuva_op_remap β the GPU VA remap operation, periodt π
πΈ SYNOPSIS πΈ
struct drm_gpuva_op_remap {
struct drm_gpuva_op_map *prev;
struct drm_gpuva_op_map *next;
struct drm_gpuva_op_unmap *unmap;
};
three lil pointers, one big job π«Ά
π¦ Members π¦
prevβ the preceding part of a split mapping. like, the leftovers before the cut βοΈnextβ the subsequent part of a split mapping. the leftovers after the cut, bestie βunmapβ the unmap operation for the original existing mapping. somebody's gotta clean up the original π
π Description π
so this represents a single remap operation generated by the DRM GPU VA manager. one operation, one remap, no cap π
A remap operation is generated when an existing GPU VA mmapping is split up by inserting a new GPU VA mapping or by partially unmapping existent mapping(s) β hence it consists of a maximum of two map and one unmap operation. iykyk π
The unmap operation takes care of removing the original existing mapping. prev is used to remap the preceding part, next the subsequent part. the way that's literally the whole plan π§
Now for the alignment lore, listen up π β if either a new mapping's start address is aligned with the start address of the old mapping, or the new mapping's end address is aligned with the end address of the old mapping, then either prev or next is NULL. This will also be the case when the requested mapping begins before the old mapping's start address or stretches beyond its end address. so yeah, don't go dereferencing both without a vibe check first π
Note π β the reason for a dedicated remap operation, rather than arbitrary unmap and map operations, is to give drivers the chance of extracting driver specific data for creating the new mappings from the unmap operations's drm_gpuva structure, which typically is embedded in larger driver specific structures. that's the whole point fr fr β it's giving driver-specific-data-extraction main character energy π
π SEE ALSO π
Kernel file ./include/drm/drm_gpuvm.h β and the whole extended friend group, in order, no skips π«Ά
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_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)
okay and that's the whole page bestie πΈ this cutie landed from ./include/drm, the October 2026 edition of struct drm_gpuva_op_remap(9) β go read the source, slay, bye πβ¨π
π¦ 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