[Intel-gfx] [PATCH 09/15] drm/i915: drop i915_add_request right in front of i915_wait_request
Daniel Vetter
daniel.vetter at ffwll.ch
Thu Mar 11 16:58:54 CET 2010
... take advantage of the new implicit request issuing of
i915_wait_request.
Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
---
drivers/gpu/drm/i915/i915_gem.c | 12 +++---------
1 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 3bdd759..4eeed4e 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2122,7 +2122,6 @@ i915_gpu_idle(struct drm_device *dev)
{
drm_i915_private_t *dev_priv = dev->dev_private;
bool lists_empty;
- uint32_t seqno;
spin_lock(&dev_priv->mm.active_list_lock);
lists_empty = list_empty(&dev_priv->mm.flushing_list) &&
@@ -2134,11 +2133,8 @@ i915_gpu_idle(struct drm_device *dev)
/* Flush everything onto the inactive list. */
i915_gem_flush(dev, I915_GEM_GPU_DOMAINS, I915_GEM_GPU_DOMAINS);
- seqno = i915_add_request(dev, NULL);
- if (seqno == 0)
- return -ENOMEM;
- return i915_wait_request(dev, seqno);
+ return i915_wait_request(dev, i915_gem_next_request_seqno(dev));
}
static int
@@ -2242,14 +2238,12 @@ i915_gem_evict_something(struct drm_device *dev, int min_size)
}
if (obj != NULL) {
- uint32_t seqno;
+ uint32_t seqno =
+ i915_gem_next_request_seqno(dev);
i915_gem_flush(dev,
obj->write_domain,
obj->write_domain);
- seqno = i915_add_request(dev, NULL);
- if (seqno == 0)
- return -ENOMEM;
ret = i915_wait_request(dev, seqno);
if (ret)
--
1.6.6.1
More information about the Intel-gfx
mailing list