|
@@ -771,6 +771,12 @@ int vb2_queue_init(struct vb2_queue *q)
|
|
|
q->is_output = V4L2_TYPE_IS_OUTPUT(q->type);
|
|
|
q->copy_timestamp = (q->timestamp_flags & V4L2_BUF_FLAG_TIMESTAMP_MASK)
|
|
|
== V4L2_BUF_FLAG_TIMESTAMP_COPY;
|
|
|
+ /*
|
|
|
+ * For compatibility with vb1: if QBUF hasn't been called yet, then
|
|
|
+ * return POLLERR as well. This only affects capture queues, output
|
|
|
+ * queues will always initialize waiting_for_buffers to false.
|
|
|
+ */
|
|
|
+ q->quirk_poll_must_check_waiting_for_buffers = true;
|
|
|
|
|
|
return vb2_core_queue_init(q);
|
|
|
}
|
|
@@ -824,14 +830,6 @@ unsigned int vb2_poll(struct vb2_queue *q, struct file *file, poll_table *wait)
|
|
|
poll_wait(file, &fh->wait, wait);
|
|
|
}
|
|
|
|
|
|
- /*
|
|
|
- * For compatibility with vb1: if QBUF hasn't been called yet, then
|
|
|
- * return POLLERR as well. This only affects capture queues, output
|
|
|
- * queues will always initialize waiting_for_buffers to false.
|
|
|
- */
|
|
|
- if (q->waiting_for_buffers && (req_events & (POLLIN | POLLRDNORM)))
|
|
|
- return POLLERR;
|
|
|
-
|
|
|
return res | vb2_core_poll(q, file, wait);
|
|
|
}
|
|
|
EXPORT_SYMBOL_GPL(vb2_poll);
|