aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_gem.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-09-29 07:26:37 -0400
committerChris Wilson <chris@chris-wilson.co.uk>2010-09-29 07:26:37 -0400
commit891b48cfc8659be486c70a03ad815f9a2485ee58 (patch)
treecbc823b8ae71b0776e70986a2283af02bc475c4c /drivers/gpu/drm/i915/i915_gem.c
parent3d2a812ae4676b74f2033cf09c855074d06f3872 (diff)
drm/i915: Avoid blocking the kworker thread on a stuck mutex
Just reschedule the retire requests again if the device is currently busy. The request list will be pruned along other paths so will never grow unbounded and so we can afford to miss the occasional pruning. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem.c')
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 9a8e6752e009..fe1424c6c3fa 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1901,7 +1901,12 @@ i915_gem_retire_work_handler(struct work_struct *work)
1901 mm.retire_work.work); 1901 mm.retire_work.work);
1902 dev = dev_priv->dev; 1902 dev = dev_priv->dev;
1903 1903
1904 mutex_lock(&dev->struct_mutex); 1904 /* Come back later if the device is busy... */
1905 if (!mutex_trylock(&dev->struct_mutex)) {
1906 queue_delayed_work(dev_priv->wq, &dev_priv->mm.retire_work, HZ);
1907 return;
1908 }
1909
1905 i915_gem_retire_requests(dev); 1910 i915_gem_retire_requests(dev);
1906 1911
1907 if (!dev_priv->mm.suspended && 1912 if (!dev_priv->mm.suspended &&