blob: d6344e93a10f494e2803391792f5556e603118d4 [file] [log] [blame]
From e3a1b5324fe03f4a8e524f33a4294af712fa8a8d Mon Sep 17 00:00:00 2001
From: Chris Wilson <chris@chris-wilson.co.uk>
Date: Fri, 13 Sep 2013 23:57:04 +0100
Subject: drm/i915: Do not unlock upon error in i915_gem_idle()
We never took the lock ourselves and all callers expect the struct_mutex
to be locked upon return (be it success or error), thereore dropping the
lock along the error paths looks to be a vestigial error from
commit db1b76ca6a79c774074ae87bee7afc0825a478f5
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date: Tue Jul 9 16:51:37 2013 +0200
drm/i915: don't frob mm.suspended when not using ums
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit f740334775efd30631c556f7654b92dae66df494)
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
---
drivers/gpu/drm/i915/i915_gem.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 08bff16a0b72..845072412ea7 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -4225,16 +4225,13 @@ i915_gem_idle(struct drm_device *dev)
drm_i915_private_t *dev_priv = dev->dev_private;
int ret;
- if (dev_priv->ums.mm_suspended) {
- mutex_unlock(&dev->struct_mutex);
+ if (dev_priv->ums.mm_suspended)
return 0;
- }
ret = i915_gpu_idle(dev);
- if (ret) {
- mutex_unlock(&dev->struct_mutex);
+ if (ret)
return ret;
- }
+
i915_gem_retire_requests(dev);
/* Under UMS, be paranoid and evict. */
--
1.8.5.rc3