aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/videobuf-core.c
diff options
context:
space:
mode:
authorPawel Osciak <p.osciak@samsung.com>2010-03-29 04:16:31 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-19 11:58:40 -0400
commit9b558434136138edc79710385aaf613cb4b30459 (patch)
tree0e59a10d120952275b971ee44e4a77fe53ca6e44 /drivers/media/video/videobuf-core.c
parentfc7f8fd42c2b934ac348995e0c530c917fc277d5 (diff)
V4L/DVB: videobuf: make poll() report proper flags for output video devices
According to the V4L2 specification, poll() should set POLLOUT | POLLWRNORM flags for output devices after the frame has been displayed. Signed-off-by: Pawel Osciak <p.osciak@samsung.com> Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com> Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/videobuf-core.c')
-rw-r--r--drivers/media/video/videobuf-core.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/media/video/videobuf-core.c b/drivers/media/video/videobuf-core.c
index f47cf1ca1239..7d3378437ded 100644
--- a/drivers/media/video/videobuf-core.c
+++ b/drivers/media/video/videobuf-core.c
@@ -1120,8 +1120,18 @@ unsigned int videobuf_poll_stream(struct file *file,
1120 if (0 == rc) { 1120 if (0 == rc) {
1121 poll_wait(file, &buf->done, wait); 1121 poll_wait(file, &buf->done, wait);
1122 if (buf->state == VIDEOBUF_DONE || 1122 if (buf->state == VIDEOBUF_DONE ||
1123 buf->state == VIDEOBUF_ERROR) 1123 buf->state == VIDEOBUF_ERROR) {
1124 rc = POLLIN|POLLRDNORM; 1124 switch (q->type) {
1125 case V4L2_BUF_TYPE_VIDEO_OUTPUT:
1126 case V4L2_BUF_TYPE_VBI_OUTPUT:
1127 case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT:
1128 rc = POLLOUT | POLLWRNORM;
1129 break;
1130 default:
1131 rc = POLLIN | POLLRDNORM;
1132 break;
1133 }
1134 }
1125 } 1135 }
1126 mutex_unlock(&q->vb_lock); 1136 mutex_unlock(&q->vb_lock);
1127 return rc; 1137 return rc;