skip GPU reset on everything, not just APUs
authorjsg <jsg@openbsd.org>
Wed, 28 Aug 2024 01:59:27 +0000 (01:59 +0000)
committerjsg <jsg@openbsd.org>
Wed, 28 Aug 2024 01:59:27 +0000 (01:59 +0000)
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

index ddf9850..8e326af 100644 (file)
@@ -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