drm_fb_dma_...anout_buffer(9)
π drm_fb_dma_get_scanout_buffer(9) π
okay so this is a page from the Kernel API Manual bestie, and it's about one very specific little function that has a very specific little job. it's giving "emergency era" energy, and honestly? iconic.
β¨ NAME β¨
drm_fb_dma_get_scanout_buffer β provide a scanout buffer in case of panic π«Ά
like, the whole point: panic happens, screen still needs to show something, this is the hook that hands over the buffer.
π¦ SYNOPSIS π¦
int drm_fb_dma_get_scanout_buffer (struct drm_plane *plane , struct
drm_scanout_buffer *sb );
that's the whole signature, no cap. two args, one int coming back at you.
πΈ ARGUMENTS πΈ
planeβ the DRM primary plane. yes, the primary one. main character plane energy πsbβ the scanout buffer, but specifically for the panic handler. it's the buffer that gets to shine when everything else has gone sideways π
β RETURN β
0, or a negative error code. that's it, that's the vibe check. zero means slay, negative means uh oh π
π DESCRIPTION π
so this is the generic get_scanout_buffer implementation β the one for drivers that use the drm_fb_dma_helper. if that's your driver, congrats, this is your girl π
here's the important part, and I need you to actually read it: it won't call vmap in the panic context. like, literally will not. so the driver has to make sure the primary plane is already vmapped β otherwise the panic screen won't get displayed. no vmapped plane, no panic screen, and that's a whole mess you do not want π
β οΈ warning bestie: forgetting the vmap is not a cute look. this is panic-context code, there's no second chances, no do-overs, no "let me just fix that real quick." make sure the primary plane is vmapped or your panic screen is simply not happening π
π SEE ALSO π
- Kernel file
./drivers/gpu/drm/drm_fb_dma_helper.cframebuffer dma helper functions(9) drm_fb_dma_get_gem_obj(9)drm_fb_dma_get_gem_addr(9)drm_fb_dma_sync_non_coherent(9)
go read the whole squad, they're all in their helper era together π§β¨
and that's the page, fr fr π this one's from ./drivers/gpu/drm, dated October 2026 β mwah, go forth and vmap your planes ππ¦
π¦ 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