Skip to content

Commit

Permalink
Reapply "drm/i915: Avoid stalling on pending flips for legacy cursor …
Browse files Browse the repository at this point in the history
…updates"

This reapplies commit acf4e84.
With async unpin this should no longer break.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1463490484-19540-20-git-send-email-maarten.lankhorst@linux.intel.com
Reviewed-by: Patrik Jakobsson <patrik.jakobsson@linux.intel.com>
  • Loading branch information
Maarten Lankhorst committed May 19, 2016
1 parent a6747b7 commit 95c2ccd
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -12928,12 +12928,14 @@ static int intel_atomic_prepare_commit(struct drm_device *dev,
struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
struct intel_flip_work *work;

ret = intel_crtc_wait_for_pending_flips(crtc);
if (ret)
return ret;
if (!state->legacy_cursor_update) {
ret = intel_crtc_wait_for_pending_flips(crtc);
if (ret)
return ret;

if (atomic_read(&intel_crtc->unpin_work_count) >= 2)
flush_workqueue(dev_priv->wq);
if (atomic_read(&intel_crtc->unpin_work_count) >= 2)
flush_workqueue(dev_priv->wq);
}

/* test if we need to update something */
if (!needs_work(crtc_state))
Expand Down

0 comments on commit 95c2ccd

Please sign in to comment.