summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2016-09-22 18:40:29 (GMT)
committerAlex Deucher <alexander.deucher@amd.com>2016-09-28 20:16:27 (GMT)
commit00ea8cba5ef7b783f11cb1a0b900b7c18d2ce0b6 (patch)
tree677db97cbfd4ec03f5e5285760e4cd8dfd5bf432
parentec2f05f034688468ddf42e79755b66bd6dd8281e (diff)
downloadlinux-00ea8cba5ef7b783f11cb1a0b900b7c18d2ce0b6.tar.xz
drm/amdgpu: always apply pci shutdown callbacks (v2)
We can't properly detect all hypervisors and we need this to properly tear down the hardware. v2: trivial warning fix Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
index 13ab49f..28c6ea8 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@ -481,14 +481,12 @@ amdgpu_pci_remove(struct pci_dev *pdev)
static void
amdgpu_pci_shutdown(struct pci_dev *pdev)
{
- struct drm_device *dev = pci_get_drvdata(pdev);
- struct amdgpu_device *adev = dev->dev_private;
-
/* if we are running in a VM, make sure the device
- * torn down properly on reboot/shutdown
+ * torn down properly on reboot/shutdown.
+ * unfortunately we can't detect certain
+ * hypervisors so just do this all the time.
*/
- if (amdgpu_passthrough(adev))
- amdgpu_pci_remove(pdev);
+ amdgpu_pci_remove(pdev);
}
static int amdgpu_pmops_suspend(struct device *dev)