drm_gem_vram_offset(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drm_gem_vram_offset(9) πŸ’…

okay bestie, welcome to the Linux Kernel API Manual page for drm_gem_vram_offset β€” yes it's a whole function, yes it's iconic, and yes it's from the kernel API manual, we love a documented kernel helper 🫢


✨ NAME ✨

drm_gem_vram_offset β€” literally just returns a GEM VRAM object's offset in video memory. that's the whole vibe. no cap πŸ’–


🌸 SYNOPSIS 🌸

s64 drm_gem_vram_offset (struct drm_gem_vram_object *gbo );

like, that's it. one function, one argument, one s64. slay ✨


πŸ¦‹ ARGUMENTS πŸ¦‹

  • gbo β€” the GEM VRAM object πŸŽ€ (yes, the object, the one you're asking about, the main character of this function)

πŸ’œ DESCRIPTION πŸ’œ

okay so here's the tea β˜• β€” this function returns the buffer object's offset in the device's video memory.

but (and this is important, bestie, don't skip this part πŸ™ˆ) the buffer object has to be pinned to TTM_PL_VRAM. like, that's a requirement, not a suggestion. if it's not pinned there, that's not it, that's not the vibe, and honestly you should go pin it first πŸ’…


🌈 RETURN 🌈

  • on success: the buffer object's offset in video memory ⭐ iconic, exactly what you asked for
  • otherwise: a negative errno code 😭 not iconic, but that's how you know something went wrong

πŸ‘‘ SEE ALSO πŸ‘‘

like the whole friend group, fr fr:

  • Kernel file ./drivers/gpu/drm/drm_gem_vram_helper.c overview(9)
  • drm_gem_vram_create(9)
  • drm_gem_vram_put(9)
  • drm_gem_vram_vmap(9)
  • drm_gem_vram_vunmap(9)
  • drm_gem_vram_fill_create_dumb(9)
  • drm_gem_vram_object_free(9)
  • drm_gem_vram_driver_dumb_create(9)
  • drm_gem_vram_plane_helper_prepare_fb(9)
  • drm_gem_vram_plane_helper_cleanup_fb(9)
  • drm_gem_vram_object_vmap(9)
  • drm_gem_vram_object_vunmap(9)
  • drm_vram_mm_debugfs_init(9)
  • drmm_vram_helper_init(9)
  • drm_vram_helper_mode_valid(9)

πŸ’€ reminder bestie: gbo must be pinned to TTM_PL_VRAM. i'm not gonna say it a third time. well. maybe i will. iykyk πŸ’–

okay that's the page!! sourced from ./drivers/gpu/drm, dated October 2026 β€” the Kernel API Manual said it, i just made it cute πŸŽ€βœ¨ mwah, go read the other drm_gem_vram pages, ily πŸ«ΆπŸ’œ

πŸ“¦ where this page comes from