summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2019-10-08 05:28:10 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2019-10-08 05:28:10 +0000
commit69e15a4c20cd0485bf0fa6aff0555fa43646b8c8 (patch)
treef0d23c9732e1f352f80434dcff46021fe9ca11b9
parent5dfe0a20ca90d794eaa8e5649ad2af4cbe4ef16a (diff)
drm/radeon: Fix EEH during kexec
From KyleMahlkuch 6e03bca91f8e99a2039659812efb113cae566459 in linux 4.19.y/4.19.78 6f7fe9a93e6c09bf988c5059403f5f88e17e21e6 in mainline linux
-rw-r--r--sys/dev/pci/drm/radeon/radeon_drv.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/dev/pci/drm/radeon/radeon_drv.c b/sys/dev/pci/drm/radeon/radeon_drv.c
index d6cd19d4a4d..938579063b4 100644
--- a/sys/dev/pci/drm/radeon/radeon_drv.c
+++ b/sys/dev/pci/drm/radeon/radeon_drv.c
@@ -377,11 +377,19 @@ radeon_pci_remove(struct pci_dev *pdev)
static void
radeon_pci_shutdown(struct pci_dev *pdev)
{
+ struct drm_device *ddev = pci_get_drvdata(pdev);
+
/* if we are running in a VM, make sure the device
* torn down properly on reboot/shutdown
*/
if (radeon_device_is_virtual())
radeon_pci_remove(pdev);
+
+ /* Some adapters need to be suspended before a
+ * shutdown occurs in order to prevent an error
+ * during kexec.
+ */
+ radeon_suspend_kms(ddev, true, true, false);
}
static int radeon_pmops_suspend(struct device *dev)