summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2017-09-04 12:48:35 +0200
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2017-09-08 10:39:37 +0200
commitde39bec1a0c4e35a679da87127effea817deb07d (patch)
tree0494e343086d5982a010b6afc5fdffa22f0102b5 /drivers
parent163bcc2c74a22c891c1906e6e343e28a70a54978 (diff)
downloadlinux-de39bec1a0c4e35a679da87127effea817deb07d.tar.bz2
drm/atomic: Remove waits in drm_atomic_helper_commit_cleanup_done, v2.
When commit synchronization through drm_crtc_commit was first introduced, we tried to solve the problem of the flip_done needing a reference count by blocking in cleanup_done. This has been changed by commit 24835e442f28 ("drm: reference count event->completion") which made the waits here no longer needed. However, even after this commit we still needed the wait because otherwise we cannot wait for the flip_done because this item might have been removed from the list. Changed since v1: - Make mention of cleanup_done completing before flip_done. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20170904104838.23822-4-maarten.lankhorst@linux.intel.com
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/drm_atomic_helper.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index 075b0b386adc..8bc2f155a7e4 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -1872,7 +1872,6 @@ void drm_atomic_helper_commit_cleanup_done(struct drm_atomic_state *old_state)
struct drm_crtc_state *old_crtc_state;
struct drm_crtc_commit *commit;
int i;
- long ret;
for_each_old_crtc_in_state(old_state, crtc, old_crtc_state, i) {
commit = old_crtc_state->commit;
@@ -1882,22 +1881,6 @@ void drm_atomic_helper_commit_cleanup_done(struct drm_atomic_state *old_state)
complete_all(&commit->cleanup_done);
WARN_ON(!try_wait_for_completion(&commit->hw_done));
- /* 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))
- goto del_commit;
-
- /* We must wait for the vblank event to signal our completion
- * before releasing our reference, since the vblank work does
- * not hold a reference of its own. */
- ret = wait_for_completion_timeout(&commit->flip_done,
- 10*HZ);
- if (ret == 0)
- DRM_ERROR("[CRTC:%d:%s] flip_done timed out\n",
- crtc->base.id, crtc->name);
-
-del_commit:
spin_lock(&crtc->commit_lock);
list_del(&commit->commit_entry);
spin_unlock(&crtc->commit_lock);