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

drm/amdgpu: allow more APUs to do mode2 reset when go to S4

Skip mode2 reset only for IMU enabled APUs when do S4.

This patch is to fix the regression issue
https://gitlab.freedesktop.org/drm/amd/-/issues/2483
It is generated by commit b589626674de ("drm/amdgpu: skip ASIC reset
for APUs when go to S4").

Fixes: b589626674de ("drm/amdgpu: skip ASIC reset for APUs when go to S4")
Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2483
Tested-by: Yuan Perry <Perry.Yuan@amd.com>
Signed-off-by: Tim Huang <tim.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Tim Huang and committed by
Alex Deucher
980d5bae 55bf1496

+6 -1
+6 -1
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
··· 981 981 */ 982 982 bool amdgpu_acpi_should_gpu_reset(struct amdgpu_device *adev) 983 983 { 984 - if (adev->flags & AMD_IS_APU) 984 + if ((adev->flags & AMD_IS_APU) && 985 + adev->gfx.imu.funcs) /* Not need to do mode2 reset for IMU enabled APUs */ 986 + return false; 987 + 988 + if ((adev->flags & AMD_IS_APU) && 989 + amdgpu_acpi_is_s3_active(adev)) 985 990 return false; 986 991 987 992 if (amdgpu_sriov_vf(adev))