Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Low] drm/virtio: redundant double virtio_reset_device() in virtio_gpu_init() --
commit 4d07ab1dc65a97542b38fd22d37c228f75391c94 Author: Yuho Choi <[email protected]> drm/virtio: Reset device before deleting virtqueues on init failure This commit adds a virtio_reset_device() call in the err_vbufs error path of virtio_gpu_init() so the device is reset before deleting virtqueues when virtio_gpu_alloc_vbufs() or virtio_gpu_modeset_init() fails. > diff --git a/drivers/gpu/drm/virtio/virtgpu_kms.c > b/drivers/gpu/drm/virtio/virtgpu_kms.c > index 1d4d3bf46a202..c729545e41f52 100644 > --- a/drivers/gpu/drm/virtio/virtgpu_kms.c > +++ b/drivers/gpu/drm/virtio/virtgpu_kms.c > @@ -326,6 +326,7 @@ int virtio_gpu_init(struct virtio_device *vdev, struct > drm_device *dev) > err_scanouts: > virtio_gpu_free_vbufs(vgdev); > err_vbufs: > + virtio_reset_device(vgdev->vdev); > vgdev->vdev->config->del_vqs(vgdev->vdev); > err_vqs: > dev->dev_private = NULL; [Severity: Low] Does the err_reset_device unwind path now call virtio_reset_device() twice? When waiting for display info times out, virtio_gpu_init() jumps to err_reset_device, calls virtio_reset_device(), and falls through into err_vbufs to reset the device again before del_vqs(). The second call repeats the transport reset and virtio_synchronize_cbs() unnecessarily. Skipping the second virtio_reset_device() on the err_reset_device path by jumping directly to del_vqs() after virtio_gpu_free_vbufs() would avoid the redundant reset. -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=1
