Skip to contentSkip to conversation

drm/amdgpu: always apply pci shutdown callbacks

PATCH New Alex Deucher 1 participant 2 messages Sep 22, 2016 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 drm/amdgpu: always apply pci shutdown callbacks

We can't properly detect all hypervisors and we
need this to properly tear down the hardware.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +4 -3
index e7ae6723..5b592af 100644
@@ -484,10 +484,11 @@ amdgpu_pci_shutdown(struct pci_dev *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)
Signature · 6 lines
2.5.5

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1474570055-28109-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org

#2 lore raw

PATCH 2/2 drm/radeon: always apply pci shutdown callbacks

We can't properly detect all hypervisors and we
need this to properly tear down the hardware.

---
 drivers/gpu/drm/radeon/radeon_drv.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/radeon/radeon_drv.c +4 -3
index 8f779e4..d406378 100644
@@ -364,10 +364,11 @@ static void
 radeon_pci_shutdown(struct pci_dev *pdev)
 {
 	/* 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 (radeon_device_is_virtual())
-		radeon_pci_remove(pdev);
+	radeon_pci_remove(pdev);
 }
 
 static int radeon_pmops_suspend(struct device *dev)
Signature · 6 lines
2.5.5

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx