diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2016-09-22 14:40:29 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-09-28 16:16:27 -0400 |
commit | 00ea8cba5ef7b783f11cb1a0b900b7c18d2ce0b6 (patch) | |
tree | 677db97cbfd4ec03f5e5285760e4cd8dfd5bf432 | |
parent | ec2f05f034688468ddf42e79755b66bd6dd8281e (diff) |
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.c | 10 |
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 13ab49fdb759..28c6ea8a8b5a 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) | |||
481 | static void | 481 | static void |
482 | amdgpu_pci_shutdown(struct pci_dev *pdev) | 482 | amdgpu_pci_shutdown(struct pci_dev *pdev) |
483 | { | 483 | { |
484 | struct drm_device *dev = pci_get_drvdata(pdev); | ||
485 | struct amdgpu_device *adev = dev->dev_private; | ||
486 | |||
487 | /* if we are running in a VM, make sure the device | 484 | /* if we are running in a VM, make sure the device |
488 | * torn down properly on reboot/shutdown | 485 | * torn down properly on reboot/shutdown. |
486 | * unfortunately we can't detect certain | ||
487 | * hypervisors so just do this all the time. | ||
489 | */ | 488 | */ |
490 | if (amdgpu_passthrough(adev)) | 489 | amdgpu_pci_remove(pdev); |
491 | amdgpu_pci_remove(pdev); | ||
492 | } | 490 | } |
493 | 491 | ||
494 | static int amdgpu_pmops_suspend(struct device *dev) | 492 | static int amdgpu_pmops_suspend(struct device *dev) |