OSDN Git Service

drm/amdgpu: restrict hotplug error message
authorChristian König <ckoenig.leichtzumerken@gmail.com>
Thu, 19 Sep 2019 13:16:49 +0000 (15:16 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 3 Oct 2019 14:11:03 +0000 (09:11 -0500)
We should print the error only when we are hotplugged and crash
basically all userspace applications.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Emily Deng <Emily.Deng@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c

index 68192e4..9f2f54e 100644 (file)
@@ -1066,7 +1066,10 @@ amdgpu_pci_remove(struct pci_dev *pdev)
 {
        struct drm_device *dev = pci_get_drvdata(pdev);
 
-       DRM_ERROR("Device removal is currently not supported outside of fbcon\n");
+#ifdef MODULE
+       if (THIS_MODULE->state != MODULE_STATE_GOING)
+#endif
+               DRM_ERROR("Hotplug removal is not supported\n");
        drm_dev_unplug(dev);
        drm_dev_put(dev);
        pci_disable_device(pdev);