* [PATCH] drm/amdgpu: Use drm_dev_unplug in PCI .remove
@ 2018-08-31 16:13 Andrey Grodzovsky
[not found] ` <1535731995-3343-1-git-send-email-andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Andrey Grodzovsky @ 2018-08-31 16:13 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Cc: alexdeucher-Re5JQEeQqe8AvxtiuMwx3w,
ckoenig.leichtzumerken-Re5JQEeQqe8AvxtiuMwx3w, Andrey Grodzovsky
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 <andrey.grodzovsky@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
index d7d9a9d..66d14d3 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_INFO("Device removal is currently not supported outside of fbcon\n");
+ drm_dev_unplug(dev);
pci_disable_device(pdev);
pci_set_drvdata(pdev, NULL);
}
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/amdgpu: Use drm_dev_unplug in PCI .remove
[not found] ` <1535731995-3343-1-git-send-email-andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org>
@ 2018-08-31 17:36 ` Christian König
0 siblings, 0 replies; 2+ messages in thread
From: Christian König @ 2018-08-31 17:36 UTC (permalink / raw)
To: Andrey Grodzovsky, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Cc: alexdeucher-Re5JQEeQqe8AvxtiuMwx3w
Am 31.08.2018 um 18:13 schrieb Andrey Grodzovsky:
> 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 <andrey.grodzovsky@amd.com>
Well it is a start, Reviewed-by: Christian König <christian.koenig@amd.com>.
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> index d7d9a9d..66d14d3 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_INFO("Device removal is currently not supported outside of fbcon\n");
> + drm_dev_unplug(dev);
> pci_disable_device(pdev);
> pci_set_drvdata(pdev, NULL);
> }
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-08-31 17:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-31 16:13 [PATCH] drm/amdgpu: Use drm_dev_unplug in PCI .remove Andrey Grodzovsky
[not found] ` <1535731995-3343-1-git-send-email-andrey.grodzovsky-5C7GfCeVMHo@public.gmane.org>
2018-08-31 17:36 ` Christian König
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.