From: Pawel Osciak Date: Wed, 16 Sep 2015 12:23:29 +0000 (+0900) Subject: CHROMIUM: rk3288-vpu: Set use_dma_bidirectional=1 for decoder CAPTURE queue X-Git-Tag: firefly_0821_release~2300 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f46a1068ae6f3bc2239f49c7cd08ad2a17d7eee9;p=firefly-linux-kernel-4.4.55.git CHROMIUM: rk3288-vpu: Set use_dma_bidirectional=1 for decoder CAPTURE queue This allows us to read out from decoded buffers to use them for reference for decoding other frames. Signed-off-by: Pawel Osciak BUG=chrome-os-partner:45346 TEST=video playback Reviewed-on: https://chromium-review.googlesource.com/300727 Commit-Ready: Pawel Osciak Tested-by: Pawel Osciak Reviewed-by: Tomasz Figa Reviewed-by: Owen Lin Change-Id: I454916b0862e541d1362413b29bfd3e51c8e3e6d Signed-off-by: Jeffy Chen Signed-off-by: Yakir Yang --- diff --git a/drivers/media/platform/rk3288-vpu/rk3288_vpu.c b/drivers/media/platform/rk3288-vpu/rk3288_vpu.c index b5269e36e0a1..779513e2e267 100644 --- a/drivers/media/platform/rk3288-vpu/rk3288_vpu.c +++ b/drivers/media/platform/rk3288-vpu/rk3288_vpu.c @@ -391,10 +391,12 @@ static int rk3288_vpu_open(struct file *filp) 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;