drm_gpuvm_bo_obtain_locked(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drm_gpuvm_bo_obtain_locked(9) πŸ’…

hiii bestie πŸ’– welcome to the Kernel API Manual page for drm_gpuvm_bo_obtain_locked(9). this one is lowkey a little matchmaker for a drm_gpuvm and a drm_gem_object, and it's giving β€œfind or create the right drm_gpuvm_bo” energy. no cap. πŸŽ€


✨ NAME ✨

drm_gpuvm_bo_obtain_locked β€” obtains an instance of the &drm_gpuvm_bo for the given &drm_gpuvm and &drm_gem_object. 🫢

🌸 SYNOPSIS 🌸

struct drm_gpuvm_bo * drm_gpuvm_bo_obtain_locked (struct drm_gpuvm
*gpuvm , struct drm_gem_object *obj );

πŸŽ€ ARGUMENTS πŸŽ€

  • gpuvm β€” the drm_gpuvm that obj is mapped in.
  • obj β€” the drm_gem_object that's being mapped in the gpuvm.

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the vibe: this function finds the drm_gpuvm_bo that represents the combination of the given drm_gpuvm and drm_gem_object. if it finds one, it increases the reference count of that drm_gpuvm_bo accordingly. if it doesn't find one, it allocates a new drm_gpuvm_bo. literally matchmade in kernel space. πŸ’…

⚠️ bestie, this requires the lock for the GEMs gpuva list. don't skip that, fr fr.

a new drm_gpuvm_bo is added to the GEMs gpuva list. 🫢

🌈 RETURN 🌈

on success, you get a pointer to the drm_gpuvm_bo; on failure, you get an ERR_PTR. that's it, that's the tea. πŸ’–

πŸ‘‘ SEE ALSO πŸ‘‘

bestie, the whole squad is here:


okay that's the page, bestie πŸ’– footer tea: source/version line ./drivers/gpu/drm; date October 2026; and the page itself is drm_gpuvm_bo_obtain_locked(9). slay. πŸŽ€

πŸ“¦ where this page comes from