STRUCT DRM_MODE_CONFIG_HELPER_FUNCS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay bestie, this is the struct drm_...helper_funcs(9) page in the Kernel API Manual, and it’s all about struct drm_mode_config_helper_funcs β€” the way this struct carries the global modeset helper operations is iconic. lowkey very DRM, highkey very important. πŸ’…βœ¨

  • struct drm_mode_config_helper_funcs β€” global modeset helper operations

✨ SYNOPSIS ✨

struct drm_mode_config_helper_funcs {
    void (*atomic_commit_tail)(struct drm_atomic_commit *state);
    int (*atomic_commit_setup)(struct drm_atomic_commit *state);
 };

πŸ‘― Members πŸ‘―

atomic_commit_tail

  • This hook is used by the default atomic_commit hook implemented in drm_atomic_helper_commit together with the nonblocking commit helpers (peep drm_atomic_helper_setup_commit for a starting point) to implement blocking and nonblocking commits easily. Heads up: it is not used by the atomic helpers. 😭
  • This function is called when the new atomic state has already been swapped into the various state pointers. The state passed in therefore contains copies of the old/previous state. This hook should commit the new state into hardware. The helpers have already waited for preceding atomic commits and fences, but drivers can add more waiting calls at the start of their implementation, e.g. to wait for a driver-internal request for implicit syncing, before starting to commit the update to the hardware. 🫢
  • After the atomic update is committed to the hardware, this hook needs to call drm_atomic_helper_commit_hw_done. Then wait for the update to be executed by the hardware β€” for example using drm_atomic_helper_wait_for_vblanks or drm_atomic_helper_wait_for_flip_done β€” and then clean up the old framebuffers using drm_atomic_helper_cleanup_planes. ✨
  • When disabling a CRTC, this hook _must_ stall for the commit to complete. Vblank waits don’t work on disabled CRTC, hence the core can’t take care of this. And it also can’t rely on the vblank event, since that can be signalled already when the screen shows black, which can happen much earlier than the last hardware access needed to shut off the display pipeline completely. πŸ’€
  • This hook is optional. The default implementation is drm_atomic_helper_commit_tail. πŸŽ€

atomic_commit_setup

  • This hook is used by the default atomic_commit hook implemented in drm_atomic_helper_commit together with the nonblocking helpers (see drm_atomic_helper_setup_commit) to extend the DRM commit setup. It is not used by the atomic helpers. πŸ’…
  • This function is called at the end of drm_atomic_helper_setup_commit, so once the commit has been properly setup across the generic DRM object states. It lets drivers do some additional commit tracking that isn’t related to a CRTC, plane or connector, tracked in a drm_private_obj structure. πŸ¦‹
  • Note that the documentation of drm_private_obj has more details on how one should implement this. πŸ‘‘
  • This hook is optional. 🌸

🌈 Description 🌈

These helper functions are used by the atomic helpers. periodt, that’s the whole vibe. no cap. πŸ’–

πŸ¦‹ SEE ALSO πŸ¦‹


xoxo, bestie πŸ’… β€” source/version: ./include/drm; date: October 2026. slay. πŸŽ€

πŸ“¦ where this page comes from