]> git.baikalelectronics.ru Git - kernel.git/commit
drm/virtio: fix ring free check
authorGerd Hoffmann <kraxel@redhat.com>
Fri, 7 Feb 2020 06:46:53 +0000 (07:46 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Fri, 7 Feb 2020 08:33:55 +0000 (09:33 +0100)
commite7266221824ea01ba51f8725e6d0fc84f68674c9
tree72df0e1c229dd3645a53542467343b99afb49b29
parent4c82cb11fa24c3d4be1f9cae9907641b0a031c40
drm/virtio: fix ring free check

If the virtio device supports indirect ring descriptors we need only one
ring entry for the whole command.  Take that into account when checking
whenever the virtqueue has enough free entries for our command.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20200207064653.14403-1-kraxel@redhat.com
drivers/gpu/drm/virtio/virtgpu_debugfs.c
drivers/gpu/drm/virtio/virtgpu_drv.h
drivers/gpu/drm/virtio/virtgpu_kms.c
drivers/gpu/drm/virtio/virtgpu_vq.c