drm_atomic_get_plane_state(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ drm_atomic_get_plane_state(9) ✨

Okay bestie, so this is a page from the Kernel API Manual β€” yes, the kernel, that big serious thing β€” and it's about grabbing a plane state. Stay with me, it's actually cute. πŸŽ€


🌸 NAME 🌸

drm_atomic_get_plane_state β€” get plane state. That's literally the whole job. Iconic behaviour, no notes. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

struct drm_plane_state * drm_atomic_get_plane_state (struct
drm_atomic_commit *state , struct drm_plane *plane );

πŸ“ ARGUMENTS πŸ“

  • state β€” the global atomic state object. Like, the big picture container for the whole operation. πŸ‘‘
  • plane β€” the plane you want the state object for. This is your main character. 🌟

🌈 DESCRIPTION 🌈

So what this function does: it returns the plane state for the given plane, and it allocates it if needed β€” no cap, it'll make one for you if there isn't one already. 🫢

It also grabs the relevant plane lock, which is the whole vibe check here, because it makes sure the state is consistent. Lock first, chaos never. πŸ”₯


πŸ’– RETURN πŸ’–

You get either the allocated state, or an error code that's been encoded into the pointer. Fr fr, that's how this one works β€” the pointer itself is holding the error. 😭

When the error is EDEADLK, that means the w/w mutex code has detected a deadlock, and the entire atomic sequence must be restarted. Like, not just a little retry β€” the whole sequence. Periodt. πŸ”

All other errors are fatal. πŸ’€ So, y'know, handle those.


πŸ’œ SEE ALSO πŸ’œ

Kernel file ./drivers/gpu/drm/drm_atomic.c 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_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), drm_state_dump(9)

That's a whole friend group of functions, and honestly they all ate. 🧚


And that's the page! This one lives in ./drivers/gpu/drm, it's dated October 2026, and the whole thing is filed under drm_atomic_get_plane_state(9). Go forth and get those plane states, bestie. πŸ¦‹βœ¨πŸ’–

πŸ“¦ where this page comes from