From 7e947d16cbcf0800f0b930bd036adb4b1cecd8ef Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Fri, 28 Jul 2017 10:22:10 -0400 Subject: [PATCH] drm/amdgpu: reset the GPU on shutdown Necessary to properly reset the SMU when using the GPU again after the driver has unloaded. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 2d7b8de..e0cdb6c 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -1957,6 +1957,11 @@ int amdgpu_device_shutdown(struct amdgpu_device *adev) if (adev->asic_type >= CHIP_BONAIRE) amdgpu_atombios_scratch_force_asic_init(adev); + /* reset the GPU */ + r = amdgpu_asic_reset(adev); + if (r) + DRM_ERROR("amdgpu asic reset failed\n"); + return 0; } -- 2.5.5