drm/atomic: Call ww_acquire_done after check phase is complete
Subsystems (2)
PATCH 1/1 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 <[email protected]>
Cc Maarten Lankhorst <[email protected]>
Signed-off-by Daniel Vetter <[email protected]>
--- drivers/gpu/drm/drm_atomic.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/drm_atomic.c +3 -0
@@ -1268,6 +1268,9 @@ int drm_atomic_check_only(struct drm_atomic_state *state) } } +if (ret ==0 ) +ww_acquire_done (&state->acquire_ctx->ww_ctx); +return ret; }EXPORT_SYMBOL (drm_atomic_check_only);
Signature · 6 lines
2.5.0 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Daniel Vetter
AppliedQuoted 9 lines · Daniel Vetter
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_donewhen ->atomic_check was successful to avoid falling over an-EDEADLK(spotted by Maarten).Cc Rob Clark <[email protected]>Cc Maarten Lankhorst <[email protected]>Signed-off-by Daniel Vetter <[email protected]>
Picked up to drm-misc with Maarten's irc r-b.
-Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx