[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20130115224321.865507991@linuxfoundation.org>
Date: Tue, 15 Jan 2013 14:44:43 -0800
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
alan@...rguk.ukuu.org.uk, Sean Paul <seanpaul@...omium.org>,
Ben Widawsky <ben@...dawsk.net>,
Daniel Vetter <daniel.vetter@...ll.ch>,
Julien Cristau <jcristau@...ian.org>
Subject: [ 118/171] drm/i915: Add wait_for in init_ring_common
3.4-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sean Paul <seanpaul@...omium.org>
commit f01db988ef6f6c70a6cc36ee71e4a98a68901229 upstream.
I have seen a number of "blt ring initialization failed" messages
where the ctl or start registers are not the correct value. Upon further
inspection, if the code just waited a little bit, it would read the
correct value. Adding the wait_for to these reads should eliminate the
issue.
Signed-off-by: Sean Paul <seanpaul@...omium.org>
Reviewed-by: Ben Widawsky <ben@...dawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@...ll.ch>
Signed-off-by: Julien Cristau <jcristau@...ian.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/gpu/drm/i915/intel_ringbuffer.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -295,9 +295,9 @@ static int init_ring_common(struct intel
| RING_VALID);
/* If the head is still not zero, the ring is dead */
- if ((I915_READ_CTL(ring) & RING_VALID) == 0 ||
- I915_READ_START(ring) != obj->gtt_offset ||
- (I915_READ_HEAD(ring) & HEAD_ADDR) != 0) {
+ if (wait_for((I915_READ_CTL(ring) & RING_VALID) != 0 &&
+ I915_READ_START(ring) == obj->gtt_offset &&
+ (I915_READ_HEAD(ring) & HEAD_ADDR) == 0, 50)) {
DRM_ERROR("%s initialization failed "
"ctl %08x head %08x tail %08x start %08x\n",
ring->name,
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists