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

Commit a951ed85 authored by Grazvydas Ignotas's avatar Grazvydas Ignotas Committed by Alex Deucher
Browse files

drm/amdgpu: disable CRTCs before teardown



Some code called by drm_crtc_force_disable_all() wants to wait for all
fences, so only do fence teardown after CRTCs are disabled.

Fixes: 84b89bdc ("drm/amdgpu: Turn off CRTCs on driver unload")
Cc: stable@vger.kernel.org # v4.8+
Signed-off-by: default avatarGrazvydas Ignotas <notasas@gmail.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 47a66e45
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1708,11 +1708,11 @@ void amdgpu_device_fini(struct amdgpu_device *adev)

	DRM_INFO("amdgpu: finishing device.\n");
	adev->shutdown = true;
	drm_crtc_force_disable_all(adev->ddev);
	/* evict vram memory */
	amdgpu_bo_evict_vram(adev);
	amdgpu_ib_pool_fini(adev);
	amdgpu_fence_driver_fini(adev);
	drm_crtc_force_disable_all(adev->ddev);
	amdgpu_fbdev_fini(adev);
	r = amdgpu_fini(adev);
	kfree(adev->ip_block_status);