Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/atomic-helper: WARN if fake_commit->hw_done is not completed as expected

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.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181122143412.11655-2-ville.syrjala@linux.intel.com
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>

+3 -1
+3 -1
drivers/gpu/drm/drm_atomic_helper.c
··· 2216 2216 spin_unlock(&crtc->commit_lock); 2217 2217 } 2218 2218 2219 - if (old_state->fake_commit) 2219 + if (old_state->fake_commit) { 2220 2220 complete_all(&old_state->fake_commit->cleanup_done); 2221 + WARN_ON(!try_wait_for_completion(&old_state->fake_commit->hw_done)); 2222 + } 2221 2223 } 2222 2224 EXPORT_SYMBOL(drm_atomic_helper_commit_cleanup_done); 2223 2225