public inbox for virtualization@lists.linux-foundation.org
 help / color / mirror / Atom feed
* [PATCH] drm/virtio: implement virtio_gpu_shutdown
@ 2025-05-07  8:28 Gerd Hoffmann
  2025-05-10  9:59 ` Maxime Ripard
  2025-05-26 15:48 ` Dmitry Osipenko
  0 siblings, 2 replies; 6+ messages in thread
From: Gerd Hoffmann @ 2025-05-07  8:28 UTC (permalink / raw)
  To: dri-devel
  Cc: Gerd Hoffmann, Michael S. Tsirkin, Eric Auger, David Airlie,
	Gurchetan Singh, Chia-I Wu, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, Simona Vetter, open list:VIRTIO GPU DRIVER,
	open list

Calling drm_dev_unplug() is the drm way to say the device
is gone and can not be accessed any more.

Cc: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Tested-by: Eric Auger <eric.auger@redhat.com>
---
 drivers/gpu/drm/virtio/virtgpu_drv.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.c b/drivers/gpu/drm/virtio/virtgpu_drv.c
index e32e680c7197..71c6ccad4b99 100644
--- a/drivers/gpu/drm/virtio/virtgpu_drv.c
+++ b/drivers/gpu/drm/virtio/virtgpu_drv.c
@@ -130,10 +130,10 @@ static void virtio_gpu_remove(struct virtio_device *vdev)
 
 static void virtio_gpu_shutdown(struct virtio_device *vdev)
 {
-	/*
-	 * drm does its own synchronization on shutdown.
-	 * Do nothing here, opt out of device reset.
-	 */
+	struct drm_device *dev = vdev->priv;
+
+	/* stop talking to the device */
+	drm_dev_unplug(dev);
 }
 
 static void virtio_gpu_config_changed(struct virtio_device *vdev)
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-05-26 15:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-07  8:28 [PATCH] drm/virtio: implement virtio_gpu_shutdown Gerd Hoffmann
2025-05-10  9:59 ` Maxime Ripard
2025-05-13 10:18   ` Gerd Hoffmann
2025-05-18 21:53     ` Michael S. Tsirkin
2025-05-19  8:43       ` Maxime Ripard
2025-05-26 15:48 ` Dmitry Osipenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox