]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Flush outstanding requests before allocating new seqno
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 2 Jan 2014 14:32:35 +0000 (14:32 +0000)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 7 Jan 2014 11:33:41 +0000 (12:33 +0100)
commit8743e3711f238f0010633d953e46af2a666b6a96
tree65f3e5fb0f86a456430918d45a9f7c3425a47a3b
parent48c811da54d331896ad1920f272faa7de1e6bfdc
drm/i915: Flush outstanding requests before allocating new seqno

In very rare cases (such as a memory failure stress test) it is possible
to fill the entire ring without emitting a request. Under this
circumstance, the outstanding request is flushed and waited upon. After
space on the ring is cleared, we return to emitting the new command -
except that we just cleared the seqno allocated for this operation and
trigger the sanity check that a request is only ever emitted with a
valid seqno. The fix is to rearrange the code to make sure the
allocation of the seqno for this operation is after any required flushes
of outstanding operations.

The bug exists since the preallocation was introduced in
commit 9ff25d274182726b5402ee5127700b582b2d3831
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Nov 27 16:22:52 2012 +0000

    drm/i915: Preallocate next seqno before touching the ring

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: stable@vger.kernel.org
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_ringbuffer.c