diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-10-04 16:33:04 +0200 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-10-04 17:11:54 +0200 |
commit | 7b4f3990a22fbe800945f12001bc30db374d0af5 (patch) | |
tree | 2e894f736ba0c4c05b481e7db8d8a122c70a9850 /drivers/gpu/drm/i915/intel_fb.c | |
parent | drm/i915: mark display port DPMS state as 'ON' when enabling output (diff) | |
download | linux-7b4f3990a22fbe800945f12001bc30db374d0af5.tar.xz linux-7b4f3990a22fbe800945f12001bc30db374d0af5.zip |
drm/i915: Avoid circular locking from intel_fbdev_fini()
lockdep spots that the fb_info->lock takes the dev->struct_mutex during
init (due to the device probing) and so we can not hold
dev->struct_mutex when unregistering the framebuffer. Simply reverse the
order of initialisation during cleanup and so do the intel_fbdev_fini()
before the intel_modeset_cleanup.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_fb.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_fb.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/intel_fb.c b/drivers/gpu/drm/i915/intel_fb.c index 7af4accafb7f..7dc50acd65d7 100644 --- a/drivers/gpu/drm/i915/intel_fb.c +++ b/drivers/gpu/drm/i915/intel_fb.c @@ -206,8 +206,8 @@ static struct drm_fb_helper_funcs intel_fb_helper_funcs = { .fb_probe = intel_fb_find_or_create_single, }; -static int intel_fbdev_destroy(struct drm_device *dev, - struct intel_fbdev *ifbdev) +static void intel_fbdev_destroy(struct drm_device *dev, + struct intel_fbdev *ifbdev) { struct fb_info *info; struct intel_framebuffer *ifb = &ifbdev->ifb; @@ -225,9 +225,7 @@ static int intel_fbdev_destroy(struct drm_device *dev, drm_framebuffer_cleanup(&ifb->base); if (ifb->obj) - drm_gem_object_unreference(ifb->obj); - - return 0; + drm_gem_object_unreference_unlocked(ifb->obj); } int intel_fbdev_init(struct drm_device *dev) |