drm_atomic_print_new_state(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drm_atomic_print_new_state(9) β€” like, the Kernel API Manual bestie ✨

okay so picture this: you're deep in the DRM atomic guts at 2am, and you just want to see what the state actually looks like. enter this little icon, straight out of the Kernel API Manual. no cap, it's giving debugging main character energy πŸŽ€


🌸 NAME 🌸

drm_atomic_print_new_state β€” prints drm atomic state πŸ’– (yes, that's literally the whole job, and she does it beautifully)


✨ SYNOPSIS ✨

void drm_atomic_print_new_state (const struct drm_atomic_commit *state ,
       struct drm_printer *p );

🫢 ARGUMENTS 🫢

  • state β€” the atomic configuration to check πŸ” like, the whole snapshot of atomic vibes you're inspecting
  • p β€” the drm printer 🌈 this is the thing that actually does the printing, she's the messenger

πŸ’… DESCRIPTION πŸ’…

so this function prints the drm atomic state snapshot using the drm printer that gets passed into it. that's it, that's the vibe. the snapshot is genuinely useful for debugging purposes β€” think of it as a little screenshot of your atomic state, but for nerds πŸ¦‹

⚠️ ok important heads-up bestie: this function looks into the new state objects. which means it is not safe to be used after the call to drm_atomic_helper_commit_hw_done. like, do not do that. the state objects have moved on and you'll be poking at ghosts πŸ’€ seriously, respect the lifetime.

πŸ‘‘ SEE ALSO πŸ‘‘

the kernel file ./drivers/gpu/drm/drm_atomic.c is where the magic lives, and here's the whole crew she runs with β€” go say hi to all of them, fr fr:


okay that's the whole page, hope you slayed your debugging session πŸ’œ

source: ./drivers/gpu/drm 🌸 dated October 2026 🌸 from the Kernel API Manual, mwah πŸŽ€

πŸ“¦ where this page comes from