diff mbox series

[v2,3/4] drm: Move atomic_state_put after locks are dropped

Message ID 20181129150423.239081-3-sean@poorly.run (mailing list archive)
State New, archived
Headers show
Series [v2,1/4] drm: Clear state->acquire_ctx before leaving drm_atomic_helper_commit_duplicated_state() | expand

Commit Message

Sean Paul Nov. 29, 2018, 3:04 p.m. UTC
From: Sean Paul <seanpaul@chromium.org>

drm_atomic_state_put doesn't require any locking, and this makes things
easier for switching to modeset_lock_all helpers in a future patch

Changes in v2:
- Moved state->acquire_ctx clear to a separate patch (Daniel)

Reviewed-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
---
 drivers/gpu/drm/drm_atomic_helper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index 5e03bebc7f9e6..43e129eee244a 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -3290,9 +3290,9 @@  int drm_atomic_helper_resume(struct drm_device *dev,
 		drm_modeset_backoff(&ctx);
 	}
 
-	drm_atomic_state_put(state);
 	drm_modeset_drop_locks(&ctx);
 	drm_modeset_acquire_fini(&ctx);
+	drm_atomic_state_put(state);
 
 	return err;
 }