Skip to content

Commit

Permalink
drm/amdgpu: always apply pci shutdown callbacks (v2)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alex Deucher committed Sep 28, 2016
1 parent ec2f05f commit 00ea8cb
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 00ea8cb

Please sign in to comment.