mirror of
https://github.com/openbsd/src.git
synced 2026-04-15 17:54:36 +00:00
drm/amdgpu: Fix wait after reset sequence in S4
From Lijo Lazar 1e130cf9cd172c684ff471d9cd8bccf06db64d88 in linux-6.18.y/6.18.22 daf470b8882b6f7f53cbfe9ec2b93a1b21528cdc in mainline linux
This commit is contained in:
@@ -2688,8 +2688,12 @@ static int amdgpu_pmops_freeze(struct device *dev)
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
if (amdgpu_acpi_should_gpu_reset(adev))
|
||||
return amdgpu_asic_reset(adev);
|
||||
if (amdgpu_acpi_should_gpu_reset(adev)) {
|
||||
amdgpu_device_lock_reset_domain(adev->reset_domain);
|
||||
r = amdgpu_asic_reset(adev);
|
||||
amdgpu_device_unlock_reset_domain(adev->reset_domain);
|
||||
return r;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -170,7 +170,8 @@ static int psp_v11_0_wait_for_bootloader(struct psp_context *psp)
|
||||
int retry_loop;
|
||||
|
||||
/* For a reset done at the end of S3, only wait for TOS to be unloaded */
|
||||
if (adev->in_s3 && !(adev->flags & AMD_IS_APU) && amdgpu_in_reset(adev))
|
||||
if ((adev->in_s4 || adev->in_s3) && !(adev->flags & AMD_IS_APU) &&
|
||||
amdgpu_in_reset(adev))
|
||||
return psp_v11_wait_for_tos_unload(psp);
|
||||
|
||||
for (retry_loop = 0; retry_loop < 20; retry_loop++) {
|
||||
|
||||
Reference in New Issue
Block a user