drm_atomic_helper_suspend(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drm_atomic_helper_suspend β€” the subsystem-level suspend helper (yes it's from the Kernel API Manual, we stan)

okay so bestie, settle in, because this one is genuinely iconic for anyone writing DRM drivers πŸŽ€

🌸 SYNOPSIS 🌸

struct drm_atomic_commit * drm_atomic_helper_suspend (struct drm_device *dev );

✨ ARGUMENTS ✨

  • dev β€” your DRM device. that's it, that's the whole argument 🫢

πŸ’– DESCRIPTION πŸ’–

So here's the vibe: this helper duplicates the current atomic state, disables all active outputs, and then hands a pointer to the original atomic state right back to you. the way it works is β€” drivers can pass that pointer to the drm_atomic_helper_resume helper when they wake back up, and boom, the output configuration that was live at the moment the system went into suspend gets restored. slay 🌈

⚠️ heads up, and I mean this fr fr: it is potentially unsafe to use this. the atomic state object returned by this function is assumed to be persistent, and drivers must ensure that this holds true. also, before calling this function, drivers must make sure to suspend fbdev emulation so that nothing can be using the device. like, nothing. nobody. no cap. πŸ’€

See also: drm_atomic_helper_duplicate_state, drm_atomic_helper_disable_all, drm_atomic_helper_resume, drm_atomic_helper_commit_duplicated_state

πŸ”₯ RETURN πŸ”₯

A pointer to a copy of the state from before suspend on success, or an ERR_PTR-encoded error code on failure. drivers should store the returned atomic state object and pass it to the drm_atomic_helper_resume helper upon resume. lowkey the whole point 🧚

πŸ‘‘ SEE ALSO πŸ‘‘

the full friend group, in order, no skipping:


πŸ¦‹ mwah, that's the whole page. it lives over in ./drivers/gpu/drm and this particular glow-up is dated October 2026 β€” take care of her, she's iconic πŸ’œβœ¨

πŸ“¦ where this page comes from