Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu: Fix wait after reset sequence in S4

For a mode-1 reset done at the end of S4 on PSPv11 dGPUs, only check if
TOS is unloaded.

Fixes: 32f73741d6ee ("drm/amdgpu: Wait for bootloader after PSPv11 reset")
Closes: https://gitlab.freedesktop.org/drm/amd/-/work_items/4853
Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Lijo Lazar and committed by
Alex Deucher
2fb4883b 054695c0

+8 -3
+6 -2
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
··· 2683 2683 if (r) 2684 2684 return r; 2685 2685 2686 - if (amdgpu_acpi_should_gpu_reset(adev)) 2687 - return amdgpu_asic_reset(adev); 2686 + if (amdgpu_acpi_should_gpu_reset(adev)) { 2687 + amdgpu_device_lock_reset_domain(adev->reset_domain); 2688 + r = amdgpu_asic_reset(adev); 2689 + amdgpu_device_unlock_reset_domain(adev->reset_domain); 2690 + return r; 2691 + } 2688 2692 return 0; 2689 2693 } 2690 2694
+2 -1
drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
··· 170 170 int retry_loop; 171 171 172 172 /* For a reset done at the end of S3, only wait for TOS to be unloaded */ 173 - if (adev->in_s3 && !(adev->flags & AMD_IS_APU) && amdgpu_in_reset(adev)) 173 + if ((adev->in_s4 || adev->in_s3) && !(adev->flags & AMD_IS_APU) && 174 + amdgpu_in_reset(adev)) 174 175 return psp_v11_wait_for_tos_unload(psp); 175 176 176 177 for (retry_loop = 0; retry_loop < 20; retry_loop++) {