Commit 992cbf19 authored by Daniel Vetter's avatar Daniel Vetter

drm/atomic: Call ww_acquire_done after check phase is complete

We want to make sure that no one tries to acquire more locks and
states, and ww mutexes provide debug facilities for that. So use them.

v2: Only call acquire_done when ->atomic_check was successful to avoid
falling over an -EDEADLK (spotted by Maarten).

Cc: Rob Clark <robdclark@gmail.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
parent 460e8e2c
...@@ -1230,6 +1230,9 @@ int drm_atomic_check_only(struct drm_atomic_state *state) ...@@ -1230,6 +1230,9 @@ int drm_atomic_check_only(struct drm_atomic_state *state)
} }
} }
if (ret == 0)
ww_acquire_done(&state->acquire_ctx->ww_ctx);
return ret; return ret;
} }
EXPORT_SYMBOL(drm_atomic_check_only); EXPORT_SYMBOL(drm_atomic_check_only);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment