diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2014-02-18 02:36:50 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2014-02-18 02:36:50 +0000 |
commit | 39c0db437e4553db599b6a2c277c2669eca6a86e (patch) | |
tree | 22cc91ba4df531bc36c929b4a9fef16a94192847 /sys/dev | |
parent | 2fb628342a7f4be3da6380a6ef47dc028c51992c (diff) |
drm/i915: Hold mutex across i915_gem_release
From Chris Wilson
e20ebbe3f08a1258fe54bcf6e6bcd75bb9b1ecc0 in ubuntu 3.8
0d1430a3f4b7cfd8779b78740a4182321f3ca7f3 in mainline linux
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/drm/i915/i915_dma.c | 4 | ||||
-rw-r--r-- | sys/dev/pci/drm/i915/i915_gem_context.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/pci/drm/i915/i915_dma.c b/sys/dev/pci/drm/i915/i915_dma.c index 57072b58acd..3a21fe91b44 100644 --- a/sys/dev/pci/drm/i915/i915_dma.c +++ b/sys/dev/pci/drm/i915/i915_dma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i915_dma.c,v 1.15 2014/01/21 08:57:22 kettenis Exp $ */ +/* $OpenBSD: i915_dma.c,v 1.16 2014/02/18 02:36:49 jsg Exp $ */ /* i915_dma.c -- DMA support for the I915 -*- linux-c -*- */ /* @@ -407,7 +407,9 @@ i915_driver_close(struct drm_device *dev, struct drm_file *file) { struct drm_i915_file_private *file_priv = file->driver_priv; + DRM_LOCK(); i915_gem_context_close(dev, file); i915_gem_release(dev, file); + DRM_UNLOCK(); kfree(file_priv); } diff --git a/sys/dev/pci/drm/i915/i915_gem_context.c b/sys/dev/pci/drm/i915/i915_gem_context.c index 9c757c81955..a23553c39ab 100644 --- a/sys/dev/pci/drm/i915/i915_gem_context.c +++ b/sys/dev/pci/drm/i915/i915_gem_context.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i915_gem_context.c,v 1.7 2014/01/21 08:57:22 kettenis Exp $ */ +/* $OpenBSD: i915_gem_context.c,v 1.8 2014/02/18 02:36:49 jsg Exp $ */ /* * Copyright © 2011-2012 Intel Corporation * @@ -321,7 +321,6 @@ void i915_gem_context_close(struct drm_device *dev, struct drm_file *file) struct drm_i915_file_private *file_priv = file->driver_priv; struct i915_ctx_handle *han, *nxt; - DRM_LOCK(); for (han = SPLAY_MIN(i915_ctx_tree, &file_priv->ctx_tree); han != NULL; han = nxt) { nxt = SPLAY_NEXT(i915_ctx_tree, &file_priv->ctx_tree, han); @@ -329,7 +328,6 @@ void i915_gem_context_close(struct drm_device *dev, struct drm_file *file) SPLAY_REMOVE(i915_ctx_tree, &file_priv->ctx_tree, han); free(han, M_DRM); } - DRM_UNLOCK(); } static struct i915_hw_context * |