drm_atomic_...d_crtc_state(9)
π¦ drm_atomic_get_old_crtc_state β get old CRTC state, if it exists π¦
okay so real talk, bestie: this one's from the Kernel API Manual, and it's genuinely one of the shorter ones, so likeβ¦ grab a lil snack and let's go π
β¨ NAME β¨
drm_atomic_get_old_crtc_state β get old CRTC state, if it exists.
no cap, that's the whole pitch π
πΈ SYNOPSIS πΈ
struct drm_crtc_state * drm_atomic_get_old_crtc_state (const struct
drm_atomic_commit *state , struct drm_crtc *crtc );
like, yes, it's one function call, it's not that deep π
π ARGUMENTS π
stateβ the global atomic state object. this is the big-picture vibe holder, the main character of the whole atomic commit situation πcrtcβ the CRTC you wanna grab, specifically. the one you're asking about π«Ά
π« DESCRIPTION π«
so here's the tea: this function returns the old CRTC state for the CRTC you pass in. literally that's it, that's the function.
and if the CRTC is not part of the global atomic state? then it hands you back NULL. no state, no drama, just NULL. don't come for it π
fr fr check for that NULL, bestie β the page says "if it exists" for a reason π
π SEE ALSO π
okay this part is lowkey iconic because the list is long, but every single one of these is a real friend of the function, so:
- Kernel file
./include/drm/drm_atomic.h struct drm_crtc_commit(9)struct drm_private_state_funcs(9)struct drm_private_obj(9)drm_for_each_privobj(9)struct drm_private_state(9)struct drm_atomic_commit(9)drm_crtc_commit_get(9)drm_crtc_commit_put(9)drm_atomic_commit_get(9)drm_atomic_commit_put(9)drm_atomic_get_new_crtc_state(9)drm_atomic_get_old_plane_state(9)drm_atomic_get_new_plane_state(9)drm_atomic_get_old_connector_state(9)drm_atomic_get_new_connector_state(9)__drm_atomic_get_current_plane_state(9)for_each_oldnew_connector_in_state(9)for_each_old_connector_in_state(9)for_each_new_connector_in_state(9)for_each_oldnew_crtc_in_state(9)for_each_old_crtc_in_state(9)for_each_new_crtc_in_state(9)for_each_oldnew_colorop_in_state(9)for_each_new_colorop_in_state(9)for_each_oldnew_plane_in_state(9)for_each_oldnew_plane_in_state_reverse(9)for_each_new_plane_in_state_reverse(9)for_each_old_plane_in_state(9)for_each_new_plane_in_state(9)for_each_oldnew_private_obj_in_state(9)for_each_old_private_obj_in_state(9)for_each_new_private_obj_in_state(9)drm_atomic_crtc_needs_modeset(9)drm_atomic_crtc_effectively_active(9)struct drm_bus_cfg(9)struct drm_bridge_state(9)
like I said. a lot of friends. iykyk π
aaaand that's the page, bestie!! π§β¨ this cutie came out of the ./include/drm source, dated October 2026, under the Kernel API Manual β mwah, slay, periodt πππ
π¦ 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