Skip to content

Commit 0c47844

Browse files
kraxeleauger
authored andcommitted
drm/virtio: implement virtio_gpu_shutdown
JIRA: https://issues.redhat.com/browse/RHEL-109504 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> Message-Id: <20250507082821.2710706-1-kraxel@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> (cherry picked from commit 2507789) Signed-off-by: Eric Auger <eric.auger@redhat.com>
1 parent 253fc23 commit 0c47844

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/gpu/drm/virtio/virtgpu_drv.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,10 @@ static void virtio_gpu_remove(struct virtio_device *vdev)
130130

131131
static void virtio_gpu_shutdown(struct virtio_device *vdev)
132132
{
133-
/*
134-
* drm does its own synchronization on shutdown.
135-
* Do nothing here, opt out of device reset.
136-
*/
133+
struct drm_device *dev = vdev->priv;
134+
135+
/* stop talking to the device */
136+
drm_dev_unplug(dev);
137137
}
138138

139139
static void virtio_gpu_config_changed(struct virtio_device *vdev)

0 commit comments

Comments
 (0)