drm_gem_vram_offset(9)
π 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.coverview(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:gbomust be pinned toTTM_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
- 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