diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-06-15 12:24:26 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-06-15 17:25:36 +0200 |
commit | 7deef7f1ae5d0bf98c1ec9eb4bc87b29478c2adb (patch) | |
tree | 5c709e921a4e1eb76a684a22ef274e547d16ae0f /drivers/gpu/drm/drm_atomic_helper.c | |
parent | 723c3e553051bcb82eb8d8962c04171040068e83 (diff) | |
download | lwn-7deef7f1ae5d0bf98c1ec9eb4bc87b29478c2adb.tar.gz lwn-7deef7f1ae5d0bf98c1ec9eb4bc87b29478c2adb.zip |
drm/atomic-helpers: Clear up cleanup_done a bit
It's not obvious at first sight that this is a fastpath, make that
clearer with a goto. Fallout from a discussion with Liviu on irc.
v2: Drop bogus hunks that crept in.
v3: Make it compile.
Cc: Liviu.Dudau@arm.com
Acked-by: Liviu.Dudau@arm.com
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1465986266-2831-1-git-send-email-daniel.vetter@ffwll.ch
Diffstat (limited to 'drivers/gpu/drm/drm_atomic_helper.c')
-rw-r--r-- | drivers/gpu/drm/drm_atomic_helper.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c index 716aa535eb98..de7fddce3cef 100644 --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c @@ -1579,11 +1579,8 @@ void drm_atomic_helper_commit_cleanup_done(struct drm_atomic_state *state) /* commit_list borrows our reference, need to remove before we * clean up our drm_atomic_state. But only after it actually * completed, otherwise subsequent commits won't stall properly. */ - if (try_wait_for_completion(&commit->flip_done)) { - list_del(&commit->commit_entry); - spin_unlock(&crtc->commit_lock); - continue; - } + if (try_wait_for_completion(&commit->flip_done)) + goto del_commit; spin_unlock(&crtc->commit_lock); @@ -1597,6 +1594,7 @@ void drm_atomic_helper_commit_cleanup_done(struct drm_atomic_state *state) crtc->base.id, crtc->name); spin_lock(&crtc->commit_lock); +del_commit: list_del(&commit->commit_entry); spin_unlock(&crtc->commit_lock); } |