Skip to contentSkip to conversation

drm/amdgpu: restrict hotplug error message

PATCH In review Christian König 3 participants 3 messages Sep 19, 2019 – Sep 25, 2019 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: restrict hotplug error message

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

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +4 -1
index 6978d17a406b..5cb808cb8108 100644
@@ -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);
Signature · 6 lines
2.14.1

_______________________________________________
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): 20190919131649.8406-1-christian.koenig-5C7GfCeVMHo@public.gmane.org

#2 lore raw

________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Christian König <[email protected]>
Sent: Thursday, September 19, 2019 9:16 AM
To: [email protected] <[email protected]>
Cc: Deng, Emily <[email protected]>; Zhang, Jack (Jian) <[email protected]>
Subject: [PATCH] drm/amdgpu: restrict hotplug error message

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

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +4 -1
index 6978d17a406b..5cb808cb8108 100644
@@ -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 [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reviewed-by Emily Deng
#3 lore raw
In reply to a message not in the archive
Quoted 33 lines

-----Original Message-----
From: Christian König <[email protected]>
Sent: Thursday, September 19, 2019 9:17 PM
To: [email protected]
Cc: Deng, Emily <[email protected]>; Zhang, Jack (Jian) <[email protected]>
Subject: [PATCH] drm/amdgpu: restrict hotplug error message

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

---
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 5 ++++-

1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +3 -2
index 6978d17a406b..5cb808cb8108 100644
@@ -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);
--
Quoted 1 line

2.14.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx