From 9d9f60c46368cbcbbd8e7fd9f25c1a1c4423bcd5 Mon Sep 17 00:00:00 2001 From: jsg Date: Thu, 14 Apr 2022 08:55:23 +0000 Subject: [PATCH] drm/amdgpu: don't use BACO for reset in S3 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 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/dev/pci/drm/amd/pm/amdgpu_dpm.c b/sys/dev/pci/drm/amd/pm/amdgpu_dpm.c index e81b8f0fac5..6179431fef2 100644 --- a/sys/dev/pci/drm/amd/pm/amdgpu_dpm.c +++ b/sys/dev/pci/drm/amd/pm/amdgpu_dpm.c @@ -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; -- 2.20.1