Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5ed16782 authored by Ben Widawsky's avatar Ben Widawsky Committed by Daniel Vetter
Browse files

drm/i915: Move the gtt mm takedown to cleanup



Our VM code already has a cleanup function, and this is a nice place to
put the drm_mm_takedown. This should have no functional impact, it just
leaves the unload function a bit cleaer, and is more logical IMO

Signed-off-by: default avatarBen Widawsky <ben@bwidawsk.net>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 5ce09725
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -1777,7 +1777,6 @@ int i915_driver_unload(struct drm_device *dev)

	list_del(&dev_priv->gtt.base.global_link);
	WARN_ON(!list_empty(&dev_priv->vm_list));
	drm_mm_takedown(&dev_priv->gtt.base.mm);

	drm_vblank_cleanup(dev);

+2 −0
Original line number Diff line number Diff line
@@ -1411,6 +1411,8 @@ static void gen6_gmch_remove(struct i915_address_space *vm)
{

	struct i915_gtt *gtt = container_of(vm, struct i915_gtt, base);

	drm_mm_takedown(&vm->mm);
	iounmap(gtt->gsm);
	teardown_scratch_page(vm->dev);
}