drm/amdgpu: Use drm_dev_unplug in PCI .remove
Subsystems (2)
PATCH 1/1 drm/amdgpu: Use drm_dev_unplug in PCI .remove
This at least allows to fail any subsequent IOCTLs with -ENODEV after the device is gone.
Still this operation is not supported yet in graphic mode and will lead at least to page faults and other issues.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +2 -2
@@ -978,8 +978,8 @@ amdgpu_pci_remove(struct pci_dev *pdev) {struct drm_device *dev =pci_get_drvdata (pdev); -drm_dev_unregister (dev); -drm_dev_put (dev); +DRM_INFO ("Device removal is currently not supported outside of fbcon\n" ); +drm_dev_unplug (dev);pci_disable_device (pdev);pci_set_drvdata (pdev,NULL ); }
Signature · 6 lines
2.7.4 _______________________________________________ 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): 1535731995-3343-1-git-send-email-andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org
Am 31.08.2018 um 18:13 schrieb Andrey Grodzovsky:
Quoted 6 lines
This at least allows to fail any subsequent IOCTLs with
-ENODEVafter the device is gone.
Still this operation is not supported yet in graphic mode and will lead at least to page faults and other issues.Signed-off-by Andrey Grodzovsky <[email protected]>
Well it is a start, Reviewed-by: Christian König <[email protected]>.
Quoted 9 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +0
-0
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c amdgpu_pci_remove(struct pci_dev *pdev) · line 985
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +2
-2@@ -978,8 +978,8 @@ amdgpu_pci_remove(struct pci_dev *pdev) {struct drm_device *dev =pci_get_drvdata (pdev); -drm_dev_unregister (dev); -drm_dev_put (dev); +DRM_INFO ("Device removal is currently not supported outside of fbcon\n" ); +drm_dev_unplug (dev);pci_disable_device (pdev);pci_set_drvdata (pdev,NULL ); }
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx