drm_state_dump(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drm_state_dump(9) β€” Kernel API Manual ✨

okay bestie, welcome to the drm_state_dump page, straight out of the Kernel API Manual πŸŽ€


🌸 NAME 🌸

drm_state_dump β€” dump the entire device atomic state, like, all of it πŸ’–


✨ SYNOPSIS ✨

void drm_state_dump (struct drm_device *dev , struct drm_printer *p );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • dev β€” the drm device πŸ‘‘
  • p β€” where to print the state to πŸ–¨οΈ

πŸ’… DESCRIPTION πŸ’…

So this one is just for debugging, no cap. Drivers might want to have an option to dump state to dmesg in case of error irq's β€” like, when stuff goes wrong and you're like "what is even happening rn 😭". (Hint: you probably want to ratelimit this! fr fr, otherwise your log is gonna be a whole mess πŸ’€)

The caller must wrap this in drm_modeset_lock_all_ctx and drm_modeset_drop_locks. If this is called from an error irq handler, it should not be enabled by default β€” if you are debugging errors you might not care that this is racey, but calling this without all modeset locks held is inherently unsafe πŸ™ˆ. Like, that's not a vibe, that's a bug waiting to happen.

⚠️ bestie pls read this part twice: no locks held = unsafe. periodt.

🌈 SEE ALSO 🌈

Kernel file ./drivers/gpu/drm/drm_atomic.c β€” plus the whole friend group 🫢:


πŸ’– that's the whole page bestie, go forth and dump that state πŸ’–

this iconic lil page lives in ./drivers/gpu/drm, dated October 2026, and it's drm_state_dump(9) β€” mwah, slay, bye πŸ§šβ€β™€οΈβœ¨

πŸ“¦ where this page comes from