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

Commit 3d8620cc authored by Jesse Barnes's avatar Jesse Barnes Committed by Eric Anholt
Browse files

drm/i915: cleanup mode setting before unmapping registers



We'll turn off outputs etc at unload time, so don't unmap the registers
before doing it.

Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: default avatarEric Anholt <eric@anholt.net>
parent ee5382ae
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -1758,6 +1758,8 @@ int i915_driver_unload(struct drm_device *dev)
	}
	}


	if (drm_core_check_feature(dev, DRIVER_MODESET)) {
	if (drm_core_check_feature(dev, DRIVER_MODESET)) {
		intel_modeset_cleanup(dev);

		/*
		/*
		 * free the memory space allocated for the child device
		 * free the memory space allocated for the child device
		 * config parsed from VBT
		 * config parsed from VBT
@@ -1781,8 +1783,6 @@ int i915_driver_unload(struct drm_device *dev)
	intel_opregion_free(dev, 0);
	intel_opregion_free(dev, 0);


	if (drm_core_check_feature(dev, DRIVER_MODESET)) {
	if (drm_core_check_feature(dev, DRIVER_MODESET)) {
		intel_modeset_cleanup(dev);

		i915_gem_free_all_phys_object(dev);
		i915_gem_free_all_phys_object(dev);


		mutex_lock(&dev->struct_mutex);
		mutex_lock(&dev->struct_mutex);