Name

drm_atomic_helper_duplicate_state — 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.

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.