drm/atomic-helper: Implement drm_atomic_helper_duplicate_state()

This function can be used to duplicate an atomic state object. This is
useful for example to implement suspend/resume, where the state before
suspend can be saved and restored upon resume.

v2: move locking to caller, be more explicit about prerequisites
v3: explicitly pass lock acquisition context, improve kerneldoc

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Thierry Reding 2015-09-08 15:00:45 +02:00 • committed by Daniel Vetter
commit 397fd77c04
2 changed files with 81 additions and 0 deletions