diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2010-02-11 22:53:20 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-09-08 10:23:39 +0100 |
commit | 4fc6ee764620eb3a9364e736d03605d4b233ea61 (patch) | |
tree | 8ebc140e05d280530dc1a52379b635e4930da9df /drivers/gpu | |
parent | ba3d8d749b01548b918519a49024341d8dc9e71c (diff) |
drm/i915: drop i915_add_request right in front of i915_wait_request
... take advantage of the new implicit request issuing of
i915_wait_request.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 9f13aaa7820e..ce66f90716c7 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -2043,7 +2043,6 @@ i915_gpu_idle(struct drm_device *dev) { drm_i915_private_t *dev_priv = dev->dev_private; bool lists_empty; - uint32_t seqno1, seqno2; int ret; spin_lock(&dev_priv->mm.active_list_lock); @@ -2058,18 +2057,17 @@ 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); - seqno1 = i915_add_request(dev, NULL, &dev_priv->render_ring); - if (seqno1 == 0) - return -ENOMEM; - ret = i915_wait_request(dev, seqno1, &dev_priv->render_ring); + + ret = i915_wait_request(dev, + i915_gem_next_request_seqno(dev, &dev_priv->render_ring), + &dev_priv->render_ring); if (ret) return ret; if (HAS_BSD(dev)) { - seqno2 = i915_add_request(dev, NULL, &dev_priv->bsd_ring); - if (seqno2 == 0) - return -ENOMEM; - ret = i915_wait_request(dev, seqno2, &dev_priv->bsd_ring); + ret = i915_wait_request(dev, + i915_gem_next_request_seqno(dev, &dev_priv->bsd_ring), + &dev_priv->bsd_ring); if (ret) return ret; } |