dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Paul <sean@poorly.run>
To: dri-devel@lists.freedesktop.org
Cc: Maxime Ripard <maxime.ripard@bootlin.com>,
	David Airlie <airlied@linux.ie>,
	Sean Paul <seanpaul@chromium.org>, Sean Paul <sean@poorly.run>
Subject: [PATCH 2/3] drm: Move atomic_state_put after locks are dropped
Date: Tue, 27 Nov 2018 17:46:39 -0500	[thread overview]
Message-ID: <20181127224654.48331-2-sean@poorly.run> (raw)
In-Reply-To: <20181127224654.48331-1-sean@poorly.run>

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

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

diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index fe8dd8aa4ae40..15a75b9f185fa 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -3286,9 +3286,10 @@ int drm_atomic_helper_resume(struct drm_device *dev,
 		drm_modeset_backoff(&ctx);
 	}
 
-	drm_atomic_state_put(state);
+	state->acquire_ctx = NULL;
 	drm_modeset_drop_locks(&ctx);
 	drm_modeset_acquire_fini(&ctx);
+	drm_atomic_state_put(state);
 
 	return err;
 }
-- 
Sean Paul, Software Engineer, Google / Chromium OS

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2018-11-27 22:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-27 22:46 [PATCH 1/3] drm: Move drm_mode_setcrtc() local re-init to failure path Sean Paul
2018-11-27 22:46 ` Sean Paul [this message]
2018-11-28  8:35   ` [PATCH 2/3] drm: Move atomic_state_put after locks are dropped Daniel Vetter
2018-11-28 14:27     ` Sean Paul
2018-11-27 22:46 ` [PATCH 3/3] drm: Add DRM_MODESET_LOCK_BEGIN/END helpers Sean Paul
2018-11-28  9:01   ` Daniel Vetter
2018-11-28 14:31     ` Sean Paul
2018-11-28 22:42       ` Daniel Vetter
2018-11-28 16:59     ` Sean Paul
2018-11-28 22:40       ` Daniel Vetter
2018-11-28  8:29 ` [PATCH 1/3] drm: Move drm_mode_setcrtc() local re-init to failure path Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181127224654.48331-2-sean@poorly.run \
    --to=sean@poorly.run \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=maxime.ripard@bootlin.com \
    --cc=seanpaul@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox