drm_atomic_helper_suspend — subsystem-level suspend helper
struct drm_atomic_state * drm_atomic_helper_suspend ( | struct drm_device * dev) ; |
Duplicates the current atomic state, disables all active outputs and then
returns a pointer to the original atomic state to the caller. Drivers can
pass this pointer to the drm_atomic_helper_resume
helper upon resume to
restore the output configuration that was active at the time the system
entered suspend.
Note that it is potentially unsafe to use this. The atomic state object returned by this function is assumed to be persistent. Drivers must ensure that this holds true. Before calling this function, drivers must make sure to suspend fbdev emulation so that nothing can be using the device.
A pointer to a copy of the state 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.