From: Chris Wilson Date: Fri, 13 May 2016 10:57:20 +0000 (+0100) Subject: drm/i915: Complete pending resets before get-reset-stats ioctl X-Git-Tag: MMI-PSA29.97-13-9~7427^2~45^2~81 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bdb04614d8461c781801afe074b1a1c766135c30;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git drm/i915: Complete pending resets before get-reset-stats ioctl The get-reset-stats ioctls wasn't waiting for a pending reset before reporting its statistics, and so was ignoring a hang generated by the context that should have been reported against said context. Signed-off-by: Chris Wilson Tested-by: Mika Kuoppala Reviewed-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/1463137042-9669-2-git-send-email-chris@chris-wilson.co.uk --- diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c index f3c76ca6b411..2aedd188473d 100644 --- a/drivers/gpu/drm/i915/i915_gem_context.c +++ b/drivers/gpu/drm/i915/i915_gem_context.c @@ -1056,7 +1056,7 @@ int i915_gem_context_reset_stats_ioctl(struct drm_device *dev, if (args->ctx_id == DEFAULT_CONTEXT_HANDLE && !capable(CAP_SYS_ADMIN)) return -EPERM; - ret = mutex_lock_interruptible(&dev->struct_mutex); + ret = i915_mutex_lock_interruptible(dev); if (ret) return ret;