projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
412cb87
)
[media] media: v4l2-mem2mem: return for polling if a buffer is available
author
Seung-Woo Kim
<
[email protected]
>
Tue, 21 May 2013 02:47:30 +0000
(23:47 -0300)
committer
Mauro Carvalho Chehab
<
[email protected]
>
Mon, 3 Jun 2013 18:30:47 +0000
(15:30 -0300)
The v4l2_m2m_poll() does not need to wait if there is already a buffer in
done_list of source and destination queues, but current v4l2_m2m_poll() always
waits. So done_list of each queue is checked before calling poll_wait().
Signed-off-by: Seung-Woo Kim <
[email protected]
>
Acked-by: Marek Szyprowski <
[email protected]
>
Signed-off-by: Kamil Debski <
[email protected]
>
Signed-off-by: Mauro Carvalho Chehab <
[email protected]
>
drivers/media/v4l2-core/v4l2-mem2mem.c
patch
|
blob
|
history
diff --git
a/drivers/media/v4l2-core/v4l2-mem2mem.c
b/drivers/media/v4l2-core/v4l2-mem2mem.c
index 66f599fcb8298f70cb18545460b8c8b0df807119..9ac39b5d5830ba684a6d0cd55f37151d90710969 100644
(file)
--- a/
drivers/media/v4l2-core/v4l2-mem2mem.c
+++ b/
drivers/media/v4l2-core/v4l2-mem2mem.c
@@
-486,8
+486,10
@@
unsigned int v4l2_m2m_poll(struct file *file, struct v4l2_m2m_ctx *m2m_ctx,
if (m2m_ctx->m2m_dev->m2m_ops->unlock)
m2m_ctx->m2m_dev->m2m_ops->unlock(m2m_ctx->priv);
- poll_wait(file, &src_q->done_wq, wait);
- poll_wait(file, &dst_q->done_wq, wait);
+ if (list_empty(&src_q->done_list))
+ poll_wait(file, &src_q->done_wq, wait);
+ if (list_empty(&dst_q->done_list))
+ poll_wait(file, &dst_q->done_wq, wait);
if (m2m_ctx->m2m_dev->m2m_ops->lock)
m2m_ctx->m2m_dev->m2m_ops->lock(m2m_ctx->priv);