Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 00ea8cba authored by Alex Deucher's avatar Alex Deucher
Browse files

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: default avatarAlex Deucher <alexander.deucher@amd.com>
parent ec2f05f0
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -481,13 +481,11 @@ 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);
}