Commit 4fc6ee76 authored by Daniel Vetter's avatar Daniel Vetter Committed by Chris Wilson

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: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
parent ba3d8d74
...@@ -2043,7 +2043,6 @@ i915_gpu_idle(struct drm_device *dev) ...@@ -2043,7 +2043,6 @@ i915_gpu_idle(struct drm_device *dev)
{ {
drm_i915_private_t *dev_priv = dev->dev_private; drm_i915_private_t *dev_priv = dev->dev_private;
bool lists_empty; bool lists_empty;
uint32_t seqno1, seqno2;
int ret; int ret;
spin_lock(&dev_priv->mm.active_list_lock); spin_lock(&dev_priv->mm.active_list_lock);
...@@ -2058,18 +2057,17 @@ i915_gpu_idle(struct drm_device *dev) ...@@ -2058,18 +2057,17 @@ i915_gpu_idle(struct drm_device *dev)
/* Flush everything onto the inactive list. */ /* Flush everything onto the inactive list. */
i915_gem_flush(dev, I915_GEM_GPU_DOMAINS, I915_GEM_GPU_DOMAINS); 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) ret = i915_wait_request(dev,
return -ENOMEM; i915_gem_next_request_seqno(dev, &dev_priv->render_ring),
ret = i915_wait_request(dev, seqno1, &dev_priv->render_ring); &dev_priv->render_ring);
if (ret) if (ret)
return ret; return ret;
if (HAS_BSD(dev)) { if (HAS_BSD(dev)) {
seqno2 = i915_add_request(dev, NULL, &dev_priv->bsd_ring); ret = i915_wait_request(dev,
if (seqno2 == 0) i915_gem_next_request_seqno(dev, &dev_priv->bsd_ring),
return -ENOMEM; &dev_priv->bsd_ring);
ret = i915_wait_request(dev, seqno2, &dev_priv->bsd_ring);
if (ret) if (ret)
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment