drm/i915: Don't emit semaphore wait if wrap happened
authorMika Kuoppala <mika.kuoppala@linux.intel.com>
Mon, 10 Dec 2012 13:41:48 +0000 (15:41 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 11 Dec 2012 12:32:26 +0000 (13:32 +0100)
commitf72b3435c1a75406d82d6e252bb78f009efd4bd9
tree5b9e854dc74ca4d52374cd6e7e816312c6daca31
parent3ac18232946aacf0a9807c3143f8449ed4aa68f4
drm/i915: Don't emit semaphore wait if wrap happened

If wrap just happened we need to prevent emitting waits for
pre wrap values. Detect this and emit no-ops instead.

v2: Use olr > seqno to detect wrap instead of *seqno == 0
as suggested by Chris Wilson.

v3: Use last used seqno to detect the wraparound. From
Chris Wilson

v4: Fixed unnecessary last_seqno assigment

References: https://bugs.freedesktop.org/show_bug.cgi?id=57967
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/intel_ringbuffer.c