Skip to content

Commit

Permalink
drm/i915: Prefer to check for idleness in worker rather than sync-flush
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Chris Wilson authored and Daniel Vetter committed Apr 10, 2015
1 parent 74cdb33 commit 423795c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -2411,7 +2411,6 @@ int __i915_add_request(struct intel_engine_cs *ring,

i915_queue_hangcheck(ring->dev);

cancel_delayed_work_sync(&dev_priv->mm.idle_work);
queue_delayed_work(dev_priv->wq,
&dev_priv->mm.retire_work,
round_jiffies_up_relative(HZ));
Expand Down Expand Up @@ -2797,6 +2796,12 @@ i915_gem_idle_work_handler(struct work_struct *work)
struct drm_i915_private *dev_priv =
container_of(work, typeof(*dev_priv), mm.idle_work.work);
struct drm_device *dev = dev_priv->dev;
struct intel_engine_cs *ring;
int i;

for_each_ring(ring, dev_priv, i)
if (!list_empty(&ring->request_list))
return;

intel_mark_idle(dev);

Expand Down

0 comments on commit 423795c

Please sign in to comment.