Skip to content

Commit

Permalink
drm/i915/overlay: Destroy reg_bo on shutdown.
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Chris Wilson committed Sep 8, 2010
1 parent a293012 commit 62cf4e6
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions drivers/gpu/drm/i915/intel_overlay.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 62cf4e6

Please sign in to comment.