aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Cline <[email protected]>2020-11-25 15:26:46 -0500
committerKarol Herbst <[email protected]>2021-11-04 12:29:07 +0100
commitaff2299e0d81b26304ccc6a1ec0170e437f38efc (patch)
tree04ebf891ec8cc62dd02177d6799d6454e186d14f
parent6bb8c2d51811eb5e6504f49efe3b089d026009d2 (diff)
drm/nouveau: use drm_dev_unplug() during device removal
Nouveau does not currently support hot-unplugging, but it still makes sense to switch from drm_dev_unregister() to drm_dev_unplug(). drm_dev_unplug() calls drm_dev_unregister() after marking the device as unplugged, but only after any device critical sections are finished. Since nouveau isn't using drm_dev_enter() and drm_dev_exit(), there are no critical sections so this is nearly functionally equivalent. However, the DRM layer does check to see if the device is unplugged, and if it is returns appropriate error codes. In the future nouveau can add critical sections in order to truly support hot-unplugging. Cc: [email protected] # 5.4+ Signed-off-by: Jeremy Cline <[email protected]> Reviewed-by: Lyude Paul <[email protected]> Reviewed-by: Ben Skeggs <[email protected]> Tested-by: Karol Herbst <[email protected]> Signed-off-by: Karol Herbst <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Link: https://gitlab.freedesktop.org/drm/nouveau/-/merge_requests/14
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_drm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
index 6109cd9e3399..96490cc855cc 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -796,7 +796,7 @@ nouveau_drm_device_remove(struct drm_device *dev)
struct nvkm_client *client;
struct nvkm_device *device;
- drm_dev_unregister(dev);
+ drm_dev_unplug(dev);
client = nvxx_client(&drm->client.base);
device = nvkm_device_find(client->device);