From: Maarten Lankhorst Date: Tue, 17 May 2016 13:08:02 +0000 (+0200) Subject: Reapply "drm/i915: Avoid stalling on pending flips for legacy cursor updates" X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=95c2ccdc82d520f59ae3b6fdc097b63c9b7082bb;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git Reapply "drm/i915: Avoid stalling on pending flips for legacy cursor updates" This reapplies commit acf4e84d6167317ff21be5c03e1ea76ea5783701. With async unpin this should no longer break. Signed-off-by: Maarten Lankhorst Link: http://patchwork.freedesktop.org/patch/msgid/1463490484-19540-20-git-send-email-maarten.lankhorst@linux.intel.com Reviewed-by: Patrik Jakobsson --- diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index daee426d4fc0..7bb1015c33d4 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -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))