[PATCH] drm/amdgpu: restrict hotplug error message

Deucher, Alexander Alexander.Deucher at amd.com
Thu Sep 19 13:33:12 UTC 2019


Acked-by: Alex Deucher <alexander.deucher at amd.com>
________________________________
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> on behalf of Christian König <ckoenig.leichtzumerken at gmail.com>
Sent: Thursday, September 19, 2019 9:16 AM
To: amd-gfx at lists.freedesktop.org <amd-gfx at lists.freedesktop.org>
Cc: Deng, Emily <Emily.Deng at amd.com>; Zhang, Jack (Jian) <Jack.Zhang1 at amd.com>
Subject: [PATCH] drm/amdgpu: restrict hotplug error message

We should print the error only when we are hotplugged and crash
basically all userspace applications.

Signed-off-by: Christian König <christian.koenig at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
index 6978d17a406b..5cb808cb8108 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@ -1098,7 +1098,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);
--
2.14.1

_______________________________________________
amd-gfx mailing list
amd-gfx at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20190919/3eeccae2/attachment-0001.html>


More information about the amd-gfx mailing list