|
@@ -1555,8 +1555,6 @@ static long i915_perf_ioctl(struct file *file,
|
|
*/
|
|
*/
|
|
static void i915_perf_destroy_locked(struct i915_perf_stream *stream)
|
|
static void i915_perf_destroy_locked(struct i915_perf_stream *stream)
|
|
{
|
|
{
|
|
- struct drm_i915_private *dev_priv = stream->dev_priv;
|
|
|
|
-
|
|
|
|
if (stream->enabled)
|
|
if (stream->enabled)
|
|
i915_perf_disable_locked(stream);
|
|
i915_perf_disable_locked(stream);
|
|
|
|
|
|
@@ -1565,11 +1563,8 @@ static void i915_perf_destroy_locked(struct i915_perf_stream *stream)
|
|
|
|
|
|
list_del(&stream->link);
|
|
list_del(&stream->link);
|
|
|
|
|
|
- if (stream->ctx) {
|
|
|
|
- mutex_lock(&dev_priv->drm.struct_mutex);
|
|
|
|
- i915_gem_context_put(stream->ctx);
|
|
|
|
- mutex_unlock(&dev_priv->drm.struct_mutex);
|
|
|
|
- }
|
|
|
|
|
|
+ if (stream->ctx)
|
|
|
|
+ i915_gem_context_put_unlocked(stream->ctx);
|
|
|
|
|
|
kfree(stream);
|
|
kfree(stream);
|
|
}
|
|
}
|
|
@@ -1738,11 +1733,8 @@ err_open:
|
|
err_alloc:
|
|
err_alloc:
|
|
kfree(stream);
|
|
kfree(stream);
|
|
err_ctx:
|
|
err_ctx:
|
|
- if (specific_ctx) {
|
|
|
|
- mutex_lock(&dev_priv->drm.struct_mutex);
|
|
|
|
- i915_gem_context_put(specific_ctx);
|
|
|
|
- mutex_unlock(&dev_priv->drm.struct_mutex);
|
|
|
|
- }
|
|
|
|
|
|
+ if (specific_ctx)
|
|
|
|
+ i915_gem_context_put_unlocked(specific_ctx);
|
|
err:
|
|
err:
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|