Commit 95c2ccdc authored by Maarten Lankhorst's avatar Maarten Lankhorst

Reapply "drm/i915: Avoid stalling on pending flips for legacy cursor updates"

This reapplies commit acf4e84d.
With async unpin this should no longer break.
Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1463490484-19540-20-git-send-email-maarten.lankhorst@linux.intel.comReviewed-by: default avatarPatrik Jakobsson <patrik.jakobsson@linux.intel.com>
parent a6747b73
...@@ -12928,12 +12928,14 @@ static int intel_atomic_prepare_commit(struct drm_device *dev, ...@@ -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_crtc *intel_crtc = to_intel_crtc(crtc);
struct intel_flip_work *work; struct intel_flip_work *work;
ret = intel_crtc_wait_for_pending_flips(crtc); if (!state->legacy_cursor_update) {
if (ret) ret = intel_crtc_wait_for_pending_flips(crtc);
return ret; if (ret)
return ret;
if (atomic_read(&intel_crtc->unpin_work_count) >= 2) if (atomic_read(&intel_crtc->unpin_work_count) >= 2)
flush_workqueue(dev_priv->wq); flush_workqueue(dev_priv->wq);
}
/* test if we need to update something */ /* test if we need to update something */
if (!needs_work(crtc_state)) if (!needs_work(crtc_state))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment