diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-08-12 10:50:36 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-09-08 10:23:45 +0100 |
commit | 62cf4e6fef35b4422e206b63b7f0ac90261d4ad9 (patch) | |
tree | 4e39d73ef0b940cd9128c690a7d8fbccf0e1173b /drivers/gpu/drm/i915/intel_overlay.c | |
parent | a29301288f1840bdf9c5456da9cd7c944436edd5 (diff) | |
download | linux-62cf4e6fef35b4422e206b63b7f0ac90261d4ad9.tar.gz linux-62cf4e6fef35b4422e206b63b7f0ac90261d4ad9.tar.bz2 linux-62cf4e6fef35b4422e206b63b7f0ac90261d4ad9.zip |
drm/i915/overlay: Destroy reg_bo on shutdown.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_overlay.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_overlay.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/gpu/drm/i915/intel_overlay.c b/drivers/gpu/drm/i915/intel_overlay.c index b0aea47cb445..3236cca0bb56 100644 --- a/drivers/gpu/drm/i915/intel_overlay.c +++ b/drivers/gpu/drm/i915/intel_overlay.c @@ -1461,14 +1461,16 @@ void intel_cleanup_overlay(struct drm_device *dev) { drm_i915_private_t *dev_priv = dev->dev_private; - if (dev_priv->overlay) { - /* The bo's should be free'd by the generic code already. - * Furthermore modesetting teardown happens beforehand so the - * hardware should be off already */ - BUG_ON(dev_priv->overlay->active); + if (!dev_priv->overlay) + return; - kfree(dev_priv->overlay); - } + /* The bo's should be free'd by the generic code already. + * Furthermore modesetting teardown happens beforehand so the + * hardware should be off already */ + BUG_ON(dev_priv->overlay->active); + + drm_gem_object_unreference_unlocked(&dev_priv->overlay->reg_bo->base); + kfree(dev_priv->overlay); } struct intel_overlay_error_state { |