diff options
-rw-r--r-- | drivers/media/platform/s5p-mfc/s5p_mfc.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c index 8e44a59d8ec2..9fe4d90f54a8 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c | |||
@@ -843,6 +843,13 @@ static int s5p_mfc_open(struct file *file) | |||
843 | ret = -ENOENT; | 843 | ret = -ENOENT; |
844 | goto err_queue_init; | 844 | goto err_queue_init; |
845 | } | 845 | } |
846 | /* One way to indicate end-of-stream for MFC is to set the | ||
847 | * bytesused == 0. However by default videobuf2 handles bytesused | ||
848 | * equal to 0 as a special case and changes its value to the size | ||
849 | * of the buffer. Set the allow_zero_bytesused flag so that videobuf2 | ||
850 | * will keep the value of bytesused intact. | ||
851 | */ | ||
852 | q->allow_zero_bytesused = 1; | ||
846 | q->mem_ops = &vb2_dma_contig_memops; | 853 | q->mem_ops = &vb2_dma_contig_memops; |
847 | q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY; | 854 | q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY; |
848 | ret = vb2_queue_init(q); | 855 | ret = vb2_queue_init(q); |