summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyleMahlkuch <kmahlkuc@linux.vnet.ibm.com>2019-08-01 01:10:14 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-10-07 20:01:06 +0300
commit894c414129a8d9ef1b2de443015e4dde6085f64f (patch)
tree8d3dddba7aa58f40c83004bef31c5f8ff1f22972
parent58ed657ef16315c4801a6a8ca4880e8905c2b909 (diff)
downloadlinux-894c414129a8d9ef1b2de443015e4dde6085f64f.tar.xz
drm/radeon: Fix EEH during kexec
[ Upstream commit 6f7fe9a93e6c09bf988c5059403f5f88e17e21e6 ] 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. Signed-off-by: KyleMahlkuch <kmahlkuc@linux.vnet.ibm.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/gpu/drm/radeon/radeon_drv.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
index a6cbe11f79c6..15d7bebe1729 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.c
+++ b/drivers/gpu/drm/radeon/radeon_drv.c
@@ -349,11 +349,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)