drm/atomic-helper: remove modeset_lock_all from helper_resume

Atomic code rely shouldn't rely on the magic hidden acquire context.

v2: Remove unused config local var (gcc).

Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170403083304.9083-5-daniel.vetter@ffwll.ch
This commit is contained in:
Daniel Vetter 2017-04-03 10:32:53 +02:00
parent b260ac3ebe
commit a5b8444e28

View file

@ -2622,14 +2622,22 @@ EXPORT_SYMBOL(drm_atomic_helper_commit_duplicated_state);
int drm_atomic_helper_resume(struct drm_device *dev, int drm_atomic_helper_resume(struct drm_device *dev,
struct drm_atomic_state *state) struct drm_atomic_state *state)
{ {
struct drm_mode_config *config = &dev->mode_config; struct drm_modeset_acquire_ctx ctx;
int err; int err;
drm_mode_config_reset(dev); drm_mode_config_reset(dev);
drm_modeset_lock_all(dev); drm_modeset_acquire_init(&ctx, 0);
err = drm_atomic_helper_commit_duplicated_state(state, config->acquire_ctx); while (1) {
drm_modeset_unlock_all(dev); err = drm_atomic_helper_commit_duplicated_state(state, &ctx);
if (err != -EDEADLK)
break;
drm_modeset_backoff(&ctx);
}
drm_modeset_drop_locks(&ctx);
drm_modeset_acquire_fini(&ctx);
return err; return err;
} }