Skip to content

Commit

Permalink
drm/i915: Hold struct_mutex while unreffing pwrctx object
Browse files Browse the repository at this point in the history
This also extends the mutex to cover fbc disabling, which is safe.

Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
  • Loading branch information
Kristian Høgsberg authored and Eric Anholt committed Dec 1, 2009
1 parent 33db679 commit 69341a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -4584,8 +4584,6 @@ void intel_modeset_cleanup(struct drm_device *dev)
intel_increase_renderclock(dev, false);
del_timer_sync(&dev_priv->idle_timer);

mutex_unlock(&dev->struct_mutex);

if (dev_priv->display.disable_fbc)
dev_priv->display.disable_fbc(dev);

Expand All @@ -4594,6 +4592,8 @@ void intel_modeset_cleanup(struct drm_device *dev)
drm_gem_object_unreference(dev_priv->pwrctx);
}

mutex_unlock(&dev->struct_mutex);

drm_mode_config_cleanup(dev);
}

Expand Down

0 comments on commit 69341a5

Please sign in to comment.