Skip to content

Commit 2507789

Browse files
kraxelmstsirkin
authored andcommitted
drm/virtio: implement virtio_gpu_shutdown
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 <[email protected]> Signed-off-by: Gerd Hoffmann <[email protected]> Reviewed-by: Eric Auger <[email protected]> Tested-by: Eric Auger <[email protected]> Message-Id: <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]>
1 parent 89a216e commit 2507789

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)