summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_display.c
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2009-02-11 22:28:14 +0100
committerDave Airlie <airlied@redhat.com>2009-02-20 03:21:13 +0100
commit496818f08a78476abdb307e241911536221239fc (patch)
tree0d1fd0c3723ddcc5220d6ee8dff161e74f9d59d2 /drivers/gpu/drm/i915/intel_display.c
parentdrm: Use spread spectrum when the bios tells us it's ok. (diff)
downloadlinux-496818f08a78476abdb307e241911536221239fc.tar.xz
linux-496818f08a78476abdb307e241911536221239fc.zip
drm/i915: take struct mutex around fb unref
Need to do this in case the unref ends up doing a free. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r--drivers/gpu/drm/i915/intel_display.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 13f9b6667c94..4d2baf7b00be 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -1606,7 +1606,9 @@ intel_user_framebuffer_create(struct drm_device *dev,
ret = intel_framebuffer_create(dev, mode_cmd, &fb, obj);
if (ret) {
+ mutex_lock(&dev->struct_mutex);
drm_gem_object_unreference(obj);
+ mutex_unlock(&dev->struct_mutex);
return NULL;
}