[PATCH 25/25] drm/i915: don't write ring regs until they're set up

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



intel_clear_scanline_wait tries to clear ring wait conditions when we
turn off pipes, to prevent hanging WAIT_EVENT and similar commands.  But
we call it early before rings have been setup during initialization and
shouldn't touch the ring regs yet.

Signed-off-by: Jesse Barnes <jbarnes at virtuousgeek.org>
---
 drivers/gpu/drm/i915/intel_display.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index dc0ef17..1a8cb30 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -3098,6 +3098,10 @@ static void intel_clear_scanline_wait(struct drm_device *dev)
 
 	ring = LP_RING(dev_priv);
 
+	/* This may be called before rings are initialized */
+	if (!ring->mmio_base)
+		return;
+
 	tmp = I915_READ_CTL(ring);
 	if (tmp & RING_WAIT)
 		I915_WRITE_CTL(ring, tmp);
-- 
1.7.5.4



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux