drm_fb_dma_...anout_buffer(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 🌈

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