]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/radeon: Fix EEH during kexec
authorKyleMahlkuch <kmahlkuc@linux.vnet.ibm.com>
Wed, 31 Jul 2019 22:10:14 +0000 (17:10 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 2 Aug 2019 15:30:15 +0000 (10:30 -0500)
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>
drivers/gpu/drm/radeon/radeon_drv.c

index b2bb74d5bffbe33d1094e81e81b195c36ca4b06c..66ff84ec665bfd4f393364acfbe46f3cc3b66022 100644 (file)
@@ -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)