* [PATCH] drm/i915: Do not unlock upon error in i915_gem_idle()
@ 2013-09-13 22:57 Chris Wilson
2013-09-20 22:40 ` Daniel Vetter
0 siblings, 1 reply; 2+ messages in thread
From: Chris Wilson @ 2013-09-13 22:57 UTC (permalink / raw)
To: intel-gfx; +Cc: Daniel Vetter
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>
---
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 cd71b71..81407a6 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -4415,16 +4415,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.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/i915: Do not unlock upon error in i915_gem_idle()
2013-09-13 22:57 [PATCH] drm/i915: Do not unlock upon error in i915_gem_idle() Chris Wilson
@ 2013-09-20 22:40 ` Daniel Vetter
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Vetter @ 2013-09-20 22:40 UTC (permalink / raw)
To: Chris Wilson; +Cc: Daniel Vetter, intel-gfx
On Fri, Sep 13, 2013 at 11:57:04PM +0100, Chris Wilson wrote:
> 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>
Queued for -next, thanks for the patch.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-09-20 22:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-13 22:57 [PATCH] drm/i915: Do not unlock upon error in i915_gem_idle() Chris Wilson
2013-09-20 22:40 ` Daniel Vetter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox