This allows us to read out from decoded buffers to use them for reference
for decoding other frames.
Signed-off-by: Pawel Osciak <posciak@chromium.org>
BUG=chrome-os-partner:45346
TEST=video playback
Reviewed-on: https://chromium-review.googlesource.com/300727
Commit-Ready: Pawel Osciak <posciak@chromium.org>
Tested-by: Pawel Osciak <posciak@chromium.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Owen Lin <owenlin@chromium.org>
Change-Id: I454916b0862e541d1362413b29bfd3e51c8e3e6d
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
q->lock = &dev->vpu_mutex;
q->buf_struct_size = sizeof(struct rk3288_vpu_buf);
- if (vdev == dev->vfd_enc)
+ if (vdev == dev->vfd_enc) {
q->ops = get_enc_queue_ops();
- else if (vdev == dev->vfd_dec)
+ } else if (vdev == dev->vfd_dec) {
q->ops = get_dec_queue_ops();
+ q->use_dma_bidirectional = 1;
+ }
q->mem_ops = &vb2_dma_contig_memops;
q->timestamp_type = V4L2_BUF_FLAG_TIMESTAMP_COPY;