drm_state_dump(9)
π 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 π«Ά:
state lifetime(9)drm_crtc_commit_wait(9)drm_atomic_commit_default_release(9)drm_atomic_commit_init(9)drm_atomic_commit_alloc(9)drm_atomic_commit_default_clear(9)drm_atomic_commit_clear(9)__drm_atomic_commit_free(9)drm_atomic_get_crtc_state(9)drm_atomic_get_plane_state(9)drm_atomic_get_colorop_state(9)drm_atomic_get_old_colorop_state(9)drm_atomic_get_new_colorop_state(9)drm_atomic_plane_check(9)handling driver private state(9)drm_atomic_private_obj_init(9)drm_atomic_private_obj_fini(9)drm_atomic_get_private_obj_state(9)drm_atomic_get_old_private_obj_state(9)drm_atomic_get_new_private_obj_state(9)drm_atomic_get_old_connector_for_encoder(9)drm_atomic_get_new_connector_for_encoder(9)drm_atomic_get_connector_for_encoder(9)drm_atomic_get_old_crtc_for_encoder(9)drm_atomic_get_new_crtc_for_encoder(9)drm_atomic_get_connector_state(9)drm_atomic_get_bridge_state(9)drm_atomic_get_old_bridge_state(9)drm_atomic_get_new_bridge_state(9)drm_atomic_add_encoder_bridges(9)drm_atomic_add_affected_connectors(9)drm_atomic_add_affected_planes(9)drm_atomic_add_affected_colorops(9)drm_atomic_check_only(9)drm_atomic_commit(9)drm_atomic_nonblocking_commit(9)drm_atomic_print_new_state(9)
π 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
- 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