[PATCH] drm/virtio: fix ring free check

Gerd Hoffmann kraxel at redhat.com
Fri Feb 7 06:46:30 UTC 2020


  Hi,

> > +       indirect = virtio_has_feature(vgdev->vdev, VIRTIO_RING_F_INDIRECT_DESC);
> > +       vqcnt = indirect ? 1 : elemcnt;
> Is the feature dynamic and require the lock held?  If not, the result
> can be cached and the fixup can happen before grabbing the lock

Not dynamic, so yes, caching makes sense.

cheers,
  Gerd



More information about the dri-devel mailing list