Re: [PATCH] drm/i915/ringbuffer: Fix use of stale HEAD position whilstpolling for space

From: Jiri Slaby
Date: Fri Jan 21 2011 - 03:35:49 EST


On 01/20/2011 06:41 PM, Chris Wilson wrote:
> During suspend, Linus found that his machine would hang for 3 seconds,
> and identified that intel_ring_buffer_wait() was the culprit:

FWIW works for me. From 4s I'm back to:
PM: suspend of devices complete after 1087.670 msecs

BTW I did this change as there are loops running out of bounds of this
array added in 1ec14ad3.
--- a/drivers/gpu/drm/i915/intel_ringbuffer.h
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.h
@@ -52,7 +52,7 @@ struct intel_ring_buffer {

u32 irq_seqno; /* last seq seem at irq
time */
u32 waiting_seqno;
- u32 sync_seqno[I915_NUM_RINGS-1];
+ u32 sync_seqno[I915_NUM_RINGS];
atomic_t irq_refcount;
bool __must_check (*irq_get)(struct intel_ring_buffer *ring);
void (*irq_put)(struct intel_ring_buffer *ring);

thanks,
--
js
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/