Skip to content

Commit

Permalink
drm/i915: Do not unlock upon error in i915_gem_idle()
Browse files Browse the repository at this point in the history
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 db1b76c
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>
  • Loading branch information
Chris Wilson authored and Daniel Vetter committed Oct 1, 2013
1 parent b205ca5 commit f740334
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -4232,16 +4232,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. */
Expand Down

0 comments on commit f740334

Please sign in to comment.