drm/amdgpu: skip ASIC reset for APUs when go to S4
authorjsg <jsg@openbsd.org>
Fri, 31 Mar 2023 02:04:27 +0000 (02:04 +0000)
committerjsg <jsg@openbsd.org>
Fri, 31 Mar 2023 02:04:27 +0000 (02:04 +0000)
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

index 3a56d28..a35f16c 100644 (file)
@@ -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)