drm_atomic_helper_duplicate_state(9) duplicate an atomic state object

SYNOPSIS

struct drm_atomic_state * drm_atomic_helper_duplicate_state(struct drm_device * dev, struct drm_modeset_acquire_ctx * ctx);

ARGUMENTS

dev

DRM device

ctx

lock acquisition context

DESCRIPTION

Makes a copy of the current atomic state by looping over all objects and duplicating their respective states. This is used for example by suspend/ resume support code to save the state prior to suspend such that it can be restored upon resume.

Note that this treats atomic state as persistent between save and restore. Drivers must make sure that this is possible and won't result in confusion or erroneous behaviour.

Note that if callers haven't already acquired all modeset locks this might return -EDEADLK, which must be handled by calling drm_modeset_backoff.

RETURNS

A pointer to the copy of the atomic state object on success or an ERR_PTR-encoded error code on failure.

AUTHORS

Jesse Barnes <[email protected]>
Intel Corporation,         
        

Initial version

Laurent Pinchart <[email protected]>
Ideas on board SPRL,         
        

Driver internals

Daniel Vetter <[email protected]>
Intel Corporation,         
        

Contributions all over the place

Lukas Wunner <[email protected]>

vga_switcheroo documentation

COPYRIGHT