[PATCH] drm/virtio: implement virtio_gpu_shutdown
Dmitry Osipenko
dmitry.osipenko at collabora.com
Mon May 26 15:48:13 UTC 2025
On 5/7/25 11:28, Gerd Hoffmann wrote:
> 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 at redhat.com>
> Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>
> Reviewed-by: Eric Auger <eric.auger at redhat.com>
> Tested-by: Eric Auger <eric.auger at 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)
Could you please describe whether this patch is fixing a specific
problem or it's a generic improvement for avoiding potential problems on
shutdown.
--
Best regards,
Dmitry
More information about the dri-devel
mailing list