Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 412cb87d authored by Seung-Woo Kim's avatar Seung-Woo Kim Committed by Mauro Carvalho Chehab
Browse files

[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: default avatarSeung-Woo Kim <sw0312.kim@samsung.com>
Acked-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: default avatarKamil Debski <k.debski@samsung.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent e9d98ddc
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -2014,6 +2014,7 @@ unsigned int vb2_poll(struct vb2_queue *q, struct file *file, poll_table *wait)
	if (list_empty(&q->queued_list))
	if (list_empty(&q->queued_list))
		return res | POLLERR;
		return res | POLLERR;


	if (list_empty(&q->done_list))
		poll_wait(file, &q->done_wq, wait);
		poll_wait(file, &q->done_wq, wait);


	/*
	/*