From: xinhui pan Date: Mon, 5 Aug 2019 06:53:49 +0000 (+0800) Subject: drm/amdgpu: Fix panic during gpu reset X-Git-Tag: v5.4-rc1~106^2~17^2~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=876923fb92a9e298625067284977917d4741ee2e;p=thirdparty%2Fkernel%2Flinux.git drm/amdgpu: Fix panic during gpu reset Clear the flag after hw suspend, otherwise it skips the corresponding hw resume. Signed-off-by: xinhui pan Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index f9fabbc4181fd..192f753407a9f 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -2257,6 +2257,7 @@ static int amdgpu_device_ip_suspend_phase2(struct amdgpu_device *adev) DRM_ERROR("suspend of IP block <%s> failed %d\n", adev->ip_blocks[i].version->funcs->name, r); } + adev->ip_blocks[i].status.hw = false; /* handle putting the SMC in the appropriate state */ if (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_SMC) { if (is_support_sw_smu(adev)) { @@ -2271,7 +2272,6 @@ static int amdgpu_device_ip_suspend_phase2(struct amdgpu_device *adev) adev->mp1_state, r); return r; } - adev->ip_blocks[i].status.hw = false; } } }