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 b589626674 ("drm/amdgpu: skip ASIC reset
for APUs when go to S4").

Fixes: b589626674 ("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>
Cc: stable@vger.kernel.org # 6.1.x
This commit is contained in:
Tim Huang 2023-03-30 10:33:02 +08:00 committed by Alex Deucher
parent 68dc1846c3
commit 2fec9dc8e0

View File

@ -981,7 +981,12 @@ static bool amdgpu_atcs_pci_probe_handle(struct pci_dev *pdev)
*/ */
bool amdgpu_acpi_should_gpu_reset(struct amdgpu_device *adev) bool amdgpu_acpi_should_gpu_reset(struct amdgpu_device *adev)
{ {
if (adev->flags & AMD_IS_APU) if ((adev->flags & AMD_IS_APU) &&
adev->gfx.imu.funcs) /* Not need to do mode2 reset for IMU enabled APUs */
return false;
if ((adev->flags & AMD_IS_APU) &&
amdgpu_acpi_is_s3_active(adev))
return false; return false;
if (amdgpu_sriov_vf(adev)) if (amdgpu_sriov_vf(adev))