From 1dc2c084530fbe3d7141b91e104abf2b9a4ee207 Mon Sep 17 00:00:00 2001 From: jsg Date: Wed, 28 Aug 2024 01:59:27 +0000 Subject: [PATCH] skip GPU reset on everything, not just APUs Fixes S3 suspend/resume on jrick's VEGA10 after the amdgpu_pmops_suspend_noirq() call was added to amdgpu_activate(). To be revisted after more of the reset functions are unstubbed. --- sys/dev/pci/drm/amd/amdgpu/amdgpu_acpi.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_acpi.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_acpi.c index ddf9850f629..8e326af9c96 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_acpi.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_acpi.c @@ -1384,6 +1384,12 @@ bool amdgpu_acpi_should_gpu_reset(struct amdgpu_device *adev) if (amdgpu_sriov_vf(adev)) return false; +#ifdef __OpenBSD__ + /* XXX VEGA10 S3 fails if reset is done */ + if (pm_suspend_target_state == PM_SUSPEND_MEM) + return false; +#endif + #if IS_ENABLED(CONFIG_SUSPEND) return pm_suspend_target_state != PM_SUSPEND_TO_IDLE; #else -- 2.20.1