summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2013-11-28 20:32:21 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2013-11-28 20:32:21 +0000
commit9010e158dcc1cc999306e003bc9dc104cacedddf (patch)
tree1697262352e67e83263411e2a111a22ec39dfe8e /sys/dev
parent9aebe43fa01d179399c2897cca2e774b6ae27af0 (diff)
Add short-circuit code to __wait_seqno() that's also present in Linux.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/drm/i915/i915_gem.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/i915/i915_gem.c b/sys/dev/pci/drm/i915/i915_gem.c
index cc130b42a4f..18c6c41858d 100644
--- a/sys/dev/pci/drm/i915/i915_gem.c
+++ b/sys/dev/pci/drm/i915/i915_gem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: i915_gem.c,v 1.47 2013/11/27 20:13:30 kettenis Exp $ */
+/* $OpenBSD: i915_gem.c,v 1.48 2013/11/28 20:32:20 kettenis Exp $ */
/*
* Copyright (c) 2008-2009 Owain G. Ainsworth <oga@openbsd.org>
*
@@ -1027,6 +1027,9 @@ static int __wait_seqno(struct intel_ring_buffer *ring, u32 seqno,
drm_i915_private_t *dev_priv = dev->dev_private;
int ret = 0;
+ if (i915_seqno_passed(ring->get_seqno(ring, true), seqno))
+ return 0;
+
mtx_enter(&dev_priv->irq_lock);
if (!i915_seqno_passed(ring->get_seqno(ring, true), seqno)) {
ring->irq_get(ring);