From 90faafb575fb0d38cae7806c2136810580c0d785 Mon Sep 17 00:00:00 2001 From: jsg Date: Fri, 7 Apr 2023 03:58:43 +0000 Subject: [PATCH] drm/amdgpu: allow more APUs to do mode2 reset when go to S4 From Tim Huang febacc33298f8d72d5bfd4d23a556cc21b5cd6c2 in linux-6.1.y/6.1.23 2fec9dc8e0acc3dfb56d1389151bcf405f087b10 in mainline linux --- sys/dev/pci/drm/amd/amdgpu/amdgpu_acpi.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_acpi.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_acpi.c index 2253d5daeee..31fc24dee53 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_acpi.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_acpi.c @@ -983,7 +983,12 @@ extern struct cfdriver amdgpu_cd; */ 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; if (amdgpu_sriov_vf(adev)) -- 2.20.1