提交 412cb87d 编写于 作者: S Seung-Woo Kim 提交者: Mauro Carvalho Chehab

[media] media: vb2: return for polling if a buffer is available

The vb2_poll() does not need to wait next vb_buffer_done() if there is already
a buffer in done_list of queue, but current vb2_poll() always waits.
So done_list is checked before calling poll_wait().
Signed-off-by: NSeung-Woo Kim <sw0312.kim@samsung.com>
Acked-by: NMarek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: NKamil Debski <k.debski@samsung.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 e9d98ddc
......@@ -2014,7 +2014,8 @@ unsigned int vb2_poll(struct vb2_queue *q, struct file *file, poll_table *wait)
if (list_empty(&q->queued_list))
return res | POLLERR;
poll_wait(file, &q->done_wq, wait);
if (list_empty(&q->done_list))
poll_wait(file, &q->done_wq, wait);
/*
* Take first buffer available for dequeuing.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册