diff options
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 9 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_ringbuffer.h | 2 |
2 files changed, 4 insertions, 7 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 7c91bf2bbdfd..52f5c194c50f 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
@@ -1664,9 +1664,7 @@ i915_gem_next_request_seqno(struct drm_device *dev, | |||
1664 | struct intel_ring_buffer *ring) | 1664 | struct intel_ring_buffer *ring) |
1665 | { | 1665 | { |
1666 | drm_i915_private_t *dev_priv = dev->dev_private; | 1666 | drm_i915_private_t *dev_priv = dev->dev_private; |
1667 | 1667 | return ring->outstanding_lazy_request = dev_priv->next_seqno; | |
1668 | ring->outstanding_lazy_request = true; | ||
1669 | return dev_priv->next_seqno; | ||
1670 | } | 1668 | } |
1671 | 1669 | ||
1672 | static void | 1670 | static void |
@@ -2072,7 +2070,7 @@ i915_do_wait_request(struct drm_device *dev, uint32_t seqno, | |||
2072 | if (atomic_read(&dev_priv->mm.wedged)) | 2070 | if (atomic_read(&dev_priv->mm.wedged)) |
2073 | return -EAGAIN; | 2071 | return -EAGAIN; |
2074 | 2072 | ||
2075 | if (ring->outstanding_lazy_request) { | 2073 | if (seqno == ring->outstanding_lazy_request) { |
2076 | struct drm_i915_gem_request *request; | 2074 | struct drm_i915_gem_request *request; |
2077 | 2075 | ||
2078 | request = kzalloc(sizeof(*request), GFP_KERNEL); | 2076 | request = kzalloc(sizeof(*request), GFP_KERNEL); |
@@ -2087,7 +2085,6 @@ i915_do_wait_request(struct drm_device *dev, uint32_t seqno, | |||
2087 | 2085 | ||
2088 | seqno = request->seqno; | 2086 | seqno = request->seqno; |
2089 | } | 2087 | } |
2090 | BUG_ON(seqno == dev_priv->next_seqno); | ||
2091 | 2088 | ||
2092 | if (!i915_seqno_passed(ring->get_seqno(ring), seqno)) { | 2089 | if (!i915_seqno_passed(ring->get_seqno(ring), seqno)) { |
2093 | if (HAS_PCH_SPLIT(dev)) | 2090 | if (HAS_PCH_SPLIT(dev)) |
@@ -3973,7 +3970,7 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data, | |||
3973 | i915_retire_commands(dev, ring); | 3970 | i915_retire_commands(dev, ring); |
3974 | 3971 | ||
3975 | if (i915_add_request(dev, file, request, ring)) | 3972 | if (i915_add_request(dev, file, request, ring)) |
3976 | ring->outstanding_lazy_request = true; | 3973 | i915_gem_next_request_seqno(dev, ring); |
3977 | else | 3974 | else |
3978 | request = NULL; | 3975 | request = NULL; |
3979 | 3976 | ||
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h b/drivers/gpu/drm/i915/intel_ringbuffer.h index 68043f1a186e..d73145c790bd 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.h +++ b/drivers/gpu/drm/i915/intel_ringbuffer.h | |||
@@ -87,7 +87,7 @@ struct intel_ring_buffer { | |||
87 | /** | 87 | /** |
88 | * Do we have some not yet emitted requests outstanding? | 88 | * Do we have some not yet emitted requests outstanding? |
89 | */ | 89 | */ |
90 | bool outstanding_lazy_request; | 90 | u32 outstanding_lazy_request; |
91 | 91 | ||
92 | wait_queue_head_t irq_queue; | 92 | wait_queue_head_t irq_queue; |
93 | drm_local_map_t map; | 93 | drm_local_map_t map; |