Commit 98c6e6a7 authored by Andrey Grodzovsky's avatar Andrey Grodzovsky

drm/amdgpu: Verify DMA opearations from device are done

In case device remove is just simualted by sysfs then verify
device doesn't keep doing DMA to the released memory after
pci_remove is done.
Signed-off-by: default avatarAndrey Grodzovsky <andrey.grodzovsky@amd.com>
Acked-by: default avatarChristian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210512142648.666476-16-andrey.grodzovsky@amd.com
parent 984f8261
...@@ -1314,7 +1314,13 @@ amdgpu_pci_remove(struct pci_dev *pdev) ...@@ -1314,7 +1314,13 @@ amdgpu_pci_remove(struct pci_dev *pdev)
drm_dev_unplug(dev); drm_dev_unplug(dev);
amdgpu_driver_unload_kms(dev); amdgpu_driver_unload_kms(dev);
/*
* Flush any in flight DMA operations from device.
* Clear the Bus Master Enable bit and then wait on the PCIe Device
* StatusTransactions Pending bit.
*/
pci_disable_device(pdev); pci_disable_device(pdev);
pci_wait_for_pending_transaction(pdev);
} }
static void static void
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment