From: Ville Syrjälä <ville.syrj...@linux.intel.com>

For real commits we WARN if ->hw_done hasn't been completed by the time
drm_atomic_helper_commit_cleanup_done() is called. Let's do the same for
the fake commit.

Signed-off-by: Ville Syrjälä <ville.syrj...@linux.intel.com>
---
 drivers/gpu/drm/drm_atomic_helper.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_atomic_helper.c 
b/drivers/gpu/drm/drm_atomic_helper.c
index 47398662b895..bc9fc9665614 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -2220,8 +2220,10 @@ void drm_atomic_helper_commit_cleanup_done(struct 
drm_atomic_state *old_state)
                spin_unlock(&crtc->commit_lock);
        }
 
-       if (old_state->fake_commit)
+       if (old_state->fake_commit) {
                complete_all(&old_state->fake_commit->cleanup_done);
+               
WARN_ON(!try_wait_for_completion(&old_state->fake_commit->hw_done));
+       }
 }
 EXPORT_SYMBOL(drm_atomic_helper_commit_cleanup_done);
 
-- 
2.18.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to