summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vc4/vc4_kms.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/vc4/vc4_kms.c')
-rw-r--r--drivers/gpu/drm/vc4/vc4_kms.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c
index f09254c2497d..bb5529a7a9c2 100644
--- a/drivers/gpu/drm/vc4/vc4_kms.c
+++ b/drivers/gpu/drm/vc4/vc4_kms.c
@@ -363,9 +363,8 @@ static void vc4_atomic_commit_tail(struct drm_atomic_state *state)
for_each_old_crtc_in_state(state, crtc, old_crtc_state, i) {
struct vc4_crtc_state *vc4_crtc_state =
to_vc4_crtc_state(old_crtc_state);
- struct drm_crtc_commit *commit;
unsigned int channel = vc4_crtc_state->assigned_channel;
- unsigned long done;
+ int ret;
if (channel == VC4_HVS_CHANNEL_DISABLED)
continue;
@@ -373,17 +372,9 @@ static void vc4_atomic_commit_tail(struct drm_atomic_state *state)
if (!old_hvs_state->fifo_state[channel].in_use)
continue;
- commit = old_hvs_state->fifo_state[i].pending_commit;
- if (!commit)
- continue;
-
- done = wait_for_completion_timeout(&commit->hw_done, 10 * HZ);
- if (!done)
- drm_err(dev, "Timed out waiting for hw_done\n");
-
- done = wait_for_completion_timeout(&commit->flip_done, 10 * HZ);
- if (!done)
- drm_err(dev, "Timed out waiting for flip_done\n");
+ ret = drm_crtc_commit_wait(old_hvs_state->fifo_state[i].pending_commit);
+ if (ret)
+ drm_err(dev, "Timed out waiting for commit\n");
}
drm_atomic_helper_commit_modeset_disables(dev, state);