提交 9b558434 编写于 作者: P Pawel Osciak 提交者: Mauro Carvalho Chehab

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: NPawel Osciak <p.osciak@samsung.com>
Reviewed-by: NKyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: NHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 fc7f8fd4
......@@ -1120,8 +1120,18 @@ unsigned int videobuf_poll_stream(struct file *file,
if (0 == rc) {
poll_wait(file, &buf->done, wait);
if (buf->state == VIDEOBUF_DONE ||
buf->state == VIDEOBUF_ERROR)
rc = POLLIN|POLLRDNORM;
buf->state == VIDEOBUF_ERROR) {
switch (q->type) {
case V4L2_BUF_TYPE_VIDEO_OUTPUT:
case V4L2_BUF_TYPE_VBI_OUTPUT:
case V4L2_BUF_TYPE_SLICED_VBI_OUTPUT:
rc = POLLOUT | POLLWRNORM;
break;
default:
rc = POLLIN | POLLRDNORM;
break;
}
}
}
mutex_unlock(&q->vb_lock);
return rc;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册