[PATCH] drm/amdgpu: restrict hotplug error message

Deng, Emily Emily.Deng at amd.com
Wed Sep 25 09:25:13 UTC 2019


Reviewed-by: Emily Deng <Emily.Deng at amd.com>

>-----Original Message-----
>From: Christian König <ckoenig.leichtzumerken at gmail.com>
>Sent: Thursday, September 19, 2019 9:17 PM
>To: 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



More information about the amd-gfx mailing list