[lkml]   [2019]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] drm/virtio: kick vq outside of the vq lock
> @@ -291,11 +291,9 @@ static int virtio_gpu_queue_ctrl_buffer_locked(struct virtio_gpu_device *vgdev,
> trace_virtio_gpu_cmd_queue(vq,
> (struct virtio_gpu_ctrl_hdr *)vbuf->buf);
> - virtqueue_kick(vq);
> + ret = virtqueue_kick_prepare(vq);
> }
> - if (!ret)
> - ret = vq->num_free;

Hmm. Change looks unrelated.

On a closer look it seems this is basically dead code.
virtio_gpu_queue_ctrl_buffer_locked is called by
virtio_gpu_queue_ctrl_buffer and virtio_gpu_queue_fenced_ctrl_buffer.
The call sites for these two functions all ignore the return value.

So it is a valid change, but it should go to a separate patch. And
while being at it virtio_gpu_queue_ctrl_buffer and
virtio_gpu_queue_fenced_ctrl_buffer can be changed to return void.

Otherwise the patch looks fine. Nice analysis btw.


 \ /
  Last update: 2019-08-02 10:03    [W:0.030 / U:0.684 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site