[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <28c64a39-1deb-4e0e-a395-2b243019ae70@collabora.com>
Date: Mon, 26 May 2025 18:48:13 +0300
From: Dmitry Osipenko <dmitry.osipenko@...labora.com>
To: Gerd Hoffmann <kraxel@...hat.com>, dri-devel@...ts.freedesktop.org
Cc: "Michael S. Tsirkin" <mst@...hat.com>, Eric Auger
<eric.auger@...hat.com>, David Airlie <airlied@...hat.com>,
Gurchetan Singh <gurchetansingh@...omium.org>, Chia-I Wu
<olvaffe@...il.com>, Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>,
Simona Vetter <simona@...ll.ch>,
"open list:VIRTIO GPU DRIVER" <virtualization@...ts.linux.dev>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drm/virtio: implement virtio_gpu_shutdown
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@...hat.com>
> Signed-off-by: Gerd Hoffmann <kraxel@...hat.com>
> Reviewed-by: Eric Auger <eric.auger@...hat.com>
> Tested-by: Eric Auger <eric.auger@...hat.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
Powered by blists - more mailing lists