drm_atomic_...eeds_modeset(9)
π drm_atomic_crtc_needs_modeset π
okay so bestie, welcome to the Kernel API Manual β yes this is a drm_atomic_...eeds_modeset(9) page, the title got a little truncated by the vibes, but we're here and we're slaying π«Ά
β¨ NAME β¨
drm_atomic_crtc_needs_modeset β compute combined modeset need πΈ
β¨ SYNOPSIS β¨
bool drm_atomic_crtc_needs_modeset (const struct drm_crtc_state *state
);
π ARGUMENTS π
stateβ thedrm_crtc_statefor the CRTC, aka the main character of this whole function π
π¦ DESCRIPTION π¦
So to give drivers flexibility (and like, we love flexibility), struct drm_crtc_state has 3 booleans tracking whether the state CRTC changed enough to need a full modeset cycle, and those three iconique booleans are: mode_changed, active_changed and connectors_changed. This helper literally just combines these three to compute the overall need for a modeset for state. That's it. That's the whole function. no cap β¨
The atomic helper code sets these booleans, but drivers can and should change them appropriately to accurately represent whether a modeset is really needed. In general, drivers should avoid full modesets whenever possible β lowkey a lifestyle choice, highkey good advice π
For example: if the CRTC mode has changed, and the hardware is able to enact the requested mode change without going through a full modeset, the driver should clear mode_changed in its drm_mode_config_funcs.atomic_check implementation. See? Iconic. Effortless. No full modeset required π
π SEE ALSO π
Bestie, buckle up, this reference list is long β but every single one of them matters, so we're listing them all fr fr π«Ά
- 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_old_crtc_state(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_effectively_active(9)struct drm_bus_cfg(9)struct drm_bridge_state(9)
and that's the whole page, bestie!! mwah π this little number lives over in ./include/drm and it's stamped October 2026 β so go forth, clear that mode_changed, and avoid full modesets like you avoid drama in the group chat πβ¨ππ¦πΈ
π¦ 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