pvr_vm_unmap_obj_locked(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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

okay so picture this: you're deep in the kernel, the vibes are immaculate, and you need to unmap an already mapped section of device-virtual memory. yeah. that's the whole plot. this is that function. no cap. ✨


🌸 SYNOPSIS 🌸

int pvr_vm_unmap_obj_locked (struct pvr_vm_context *vm_ctx , struct
       pvr_gem_object *pvr_obj , u64 device_addr , u64 size );

like, four things in, one int out. it's giving "small function, big responsibility" and honestly? obsessed. 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • vm_ctx β€” the target VM context πŸ’– like, which VM are we even doing this in, bestie? this one.
  • pvr_obj β€” the target PowerVR memory object 🌈 the actual thing being referenced here.
  • device_addr β€” the virtual device address at the start of the target mapping πŸ“ the beginning. the opening scene. the main character's entrance.
  • size β€” size of the target mapping πŸ“ how much of the map we're talking about.

⭐ RETURN ⭐

  • 0 on success β€” slay, it worked πŸ’…
  • -EINVAL if device_addr is not a valid page-aligned device-virtual address 😭 like bestie, page-aligned. we said page-aligned. it literally has to be page-aligned.
  • Any error encountered while performing internal operations required to destroy the mapping (returned from pvr_vm_gpuva_unmap or pvr_vm_gpuva_remap) πŸ’€ those internals don't play, and if they're upset you're gonna hear about it.

🧚 DESCRIPTION 🧚

The vm_ctx->lock must be held when calling this function.

ok this is the important part, do not skip it πŸ”₯ the lock is held before you call in. that's why _locked is right there in the name, iykyk. the function is trusting you to already be holding it. don't betray that trust. πŸ’œ

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./drivers/gpu/drm/imagination/pvr_vm.c, Memory context(9), struct pvr_vm_context(9), pvr_vm_get_page_table_root_addr(9), pvr_vm_get_dma_resv(9), Memory mappings(9), struct pvr_vm_gpuva(9), struct pvr_vm_bind_op(9), pvr_vm_bind_op_exec(9), pvr_vm_gpuva_map(9), pvr_vm_gpuva_unmap(9), pvr_vm_gpuva_remap(9), pvr_device_addr_is_valid(9), pvr_device_addr_and_size_are_valid(9), pvr_vm_create_context(9), pvr_vm_context_release(9), pvr_vm_context_lookup(9), pvr_vm_context_put(9), pvr_destroy_vm_contexts_for_file(9), pvr_vm_map(9), pvr_vm_unmap_obj(9), pvr_vm_unmap(9), pvr_vm_unmap_all(9), pvr_heap_contains_range(9), pvr_find_heap_containing(9), pvr_vm_find_gem_object(9), pvr_vm_get_fw_mem_context(9)

like yes that's a lot of reading but they're all literally right there and they all ate πŸ’…πŸ“š


and that's the whole page, bestie 🌈 straight out of ./drivers/gpu/drm/imagination, dated October 2026 β€” catch you in the next manpage, mwah πŸ“πŸ’–πŸ¦‹

πŸ“¦ where this page comes from