drm/amdgpu: don't use BACO for reset in S3
authorjsg <jsg@openbsd.org>
Thu, 14 Apr 2022 08:55:23 +0000 (08:55 +0000)
committerjsg <jsg@openbsd.org>
Thu, 14 Apr 2022 08:55:23 +0000 (08:55 +0000)
From Alex Deucher
b536cf3eb6f949f8bedae7b26713e7ffec13b89b in linux 5.15.y/5.15.34
ebc002e3ee78409c42156e62e4e27ad1d09c5a75 in mainline linux

sys/dev/pci/drm/amd/pm/amdgpu_dpm.c

index e81b8f0..6179431 100644 (file)
@@ -1047,6 +1047,17 @@ bool amdgpu_dpm_is_baco_supported(struct amdgpu_device *adev)
 
        if (!pp_funcs || !pp_funcs->get_asic_baco_capability)
                return false;
+       /* Don't use baco for reset in S3.
+        * This is a workaround for some platforms
+        * where entering BACO during suspend
+        * seems to cause reboots or hangs.
+        * This might be related to the fact that BACO controls
+        * power to the whole GPU including devices like audio and USB.
+        * Powering down/up everything may adversely affect these other
+        * devices.  Needs more investigation.
+        */
+       if (adev->in_s3)
+               return false;
 
        if (pp_funcs->get_asic_baco_capability(pp_handle, &baco_cap))
                return false;