[PATCH] drm/i915: Wait pipe disabling if crc computation in progress

Mika Kahola mika.kahola at intel.com
Wed Dec 19 11:05:43 UTC 2018


Signed-off-by: Mika Kahola <mika.kahola at intel.com>
---
 drivers/gpu/drm/i915/intel_pipe_crc.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_pipe_crc.c b/drivers/gpu/drm/i915/intel_pipe_crc.c
index bdabcfab8090..15054ce3c7f8 100644
--- a/drivers/gpu/drm/i915/intel_pipe_crc.c
+++ b/drivers/gpu/drm/i915/intel_pipe_crc.c
@@ -655,6 +655,10 @@ void intel_crtc_disable_pipe_crc(struct intel_crtc *intel_crtc)
 	struct drm_i915_private *dev_priv = to_i915(crtc->dev);
 	struct intel_pipe_crc *pipe_crc = &dev_priv->pipe_crc[crtc->index];
 
+	while (crtc->crc.entries) {
+		usleep_range(100, 200);
+	}
+
 	/* Swallow crc's until we stop generating them. */
 	spin_lock_irq(&pipe_crc->lock);
 	pipe_crc->skipped = INT_MIN;
-- 
2.17.1



More information about the Intel-gfx-trybot mailing list