summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Mahlkuch <kmahlkuc@linux.vnet.ibm.com>2019-10-25 23:40:50 +0300
committerAlex Deucher <alexander.deucher@amd.com>2019-10-28 18:19:17 +0300
commitd02f5aab06c84ed7d18a4d709c19e400faf361f6 (patch)
treef453bd5657f5affb342a2c9d531456df19ae1a64
parentb64919a2366ada6e96474148f0459ac12d8d813c (diff)
downloadlinux-d02f5aab06c84ed7d18a4d709c19e400faf361f6.tar.xz
drm/radeon: Fix EEH during kexec
During kexec some adapters hit an EEH since they are not properly shut down in the radeon_pci_shutdown() function. Adding radeon_suspend_kms() fixes this issue. Enabled only on PPC because this patch causes issues on some other boards. Signed-off-by: Kyle Mahlkuch <kmahlkuc@linux.vnet.ibm.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/radeon/radeon_drv.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
index 2bc56f829bf7..64acba4a2bba 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.c
+++ b/drivers/gpu/drm/radeon/radeon_drv.c
@@ -378,11 +378,25 @@ radeon_pci_remove(struct pci_dev *pdev)
static void
radeon_pci_shutdown(struct pci_dev *pdev)
{
+#ifdef CONFIG_PPC64
+ struct drm_device *ddev = pci_get_drvdata(pdev);
+#endif
+
/* 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);
+
+#ifdef CONFIG_PPC64
+ /* Some adapters need to be suspended before a
+ * shutdown occurs in order to prevent an error
+ * during kexec.
+ * Make this power specific becauase it breaks
+ * some non-power boards.
+ */
+ radeon_suspend_kms(ddev, true, true, false);
+#endif
}
static int radeon_pmops_suspend(struct device *dev)