summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_gem.c
diff options
context:
space:
mode:
authorMika Kuoppala <mika.kuoppala@linux.intel.com>2012-12-10 15:41:48 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-12-11 13:32:26 +0100
commitf72b3435c1a75406d82d6e252bb78f009efd4bd9 (patch)
tree5b9e854dc74ca4d52374cd6e7e816312c6daca31 /drivers/gpu/drm/i915/i915_gem.c
parent3ac18232946aacf0a9807c3143f8449ed4aa68f4 (diff)
downloadop-kernel-dev-f72b3435c1a75406d82d6e252bb78f009efd4bd9.zip
op-kernel-dev-f72b3435c1a75406d82d6e252bb78f009efd4bd9.tar.gz
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>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem.c')
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index e4b233d..a81b78a 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1969,7 +1969,7 @@ i915_gem_get_seqno(struct drm_device *dev, u32 *seqno)
dev_priv->next_seqno = 1;
}
- *seqno = dev_priv->next_seqno++;
+ *seqno = dev_priv->last_seqno = dev_priv->next_seqno++;
return 0;
}
OpenPOWER on IntegriCloud