diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-08-06 16:06:40 +0300 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-08-11 13:04:18 +0300 |
commit | 992cbf19b32900efa17850b9fa0031fd623edd4d (patch) | |
tree | 78e8f5380d7c771f211cfd6d066a47253ad77f17 /drivers/gpu/drm/drm_atomic.c | |
parent | 460e8e2cf464dee6f8a3fc1b81340d818d1ad9e4 (diff) | |
download | linux-992cbf19b32900efa17850b9fa0031fd623edd4d.tar.xz |
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: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'drivers/gpu/drm/drm_atomic.c')
-rw-r--r-- | drivers/gpu/drm/drm_atomic.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c index 434915448ea0..1066e4b658cf 100644 --- a/drivers/gpu/drm/drm_atomic.c +++ b/drivers/gpu/drm/drm_atomic.c @@ -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; } EXPORT_SYMBOL(drm_atomic_check_only); |