From: Andrey Grodzovsky Date: Thu, 30 Aug 2018 15:24:17 +0000 (-0400) Subject: drm/amdgpu: Use drm_dev_unplug in PCI .remove X-Git-Tag: v5.4-rc1~2273^2~27^2~157 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=88b35d83a79c19e0d817f500f9306fe3eef43057;p=platform%2Fkernel%2Flinux-rpi.git 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. Signed-off-by: Andrey Grodzovsky Reviewed-by: Christian König Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index d7d9a9d..a96ceff 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c @@ -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_ERROR("Device removal is currently not supported outside of fbcon\n"); + drm_dev_unplug(dev); pci_disable_device(pdev); pci_set_drvdata(pdev, NULL); }