From d65446bc5546f3bb3ce00bf4930fc41866e15d59 Mon Sep 17 00:00:00 2001 From: jsg Date: Fri, 31 Mar 2023 02:04:27 +0000 Subject: [PATCH] drm/amdgpu: skip ASIC reset for APUs when go to S4 From Tim Huang 9f7e1dd835ec834fb147a7725419497f0b0d83a7 in linux-6.1.y/6.1.22 b589626674de94d977e81c99bf7905872b991197 in mainline linux --- sys/dev/pci/drm/amd/amdgpu/amdgpu_drv.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_drv.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_drv.c index 3a56d2851c2..a35f16c07d4 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_drv.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_drv.c @@ -2454,7 +2454,10 @@ static int amdgpu_pmops_freeze(struct device *dev) adev->in_s4 = false; if (r) return r; - return amdgpu_asic_reset(adev); + + if (amdgpu_acpi_should_gpu_reset(adev)) + return amdgpu_asic_reset(adev); + return 0; } static int amdgpu_pmops_thaw(struct device *dev) -- 2.20.1