From: Owen Lin Date: Tue, 15 Sep 2015 08:08:50 +0000 (+0800) Subject: CHROMIUM: rk3288-vpu: Add DMABUF to io_modes. X-Git-Tag: firefly_0821_release~2301 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=27c9ba1463807452fc86bb46eed0a7b02535288c;p=firefly-linux-kernel-4.4.55.git CHROMIUM: rk3288-vpu: Add DMABUF to io_modes. To support gralloc buffers. BUG=chrome-os-partner:45346 TEST=Play a video on minnie. Signed-off-by: Owen Lin Reviewed-on: https://chromium-review.googlesource.com/299613 Commit-Ready: Owen Lin Tested-by: Owen Lin Reviewed-by: Pawel Osciak Change-Id: I7ba9c7a0640fa822c43f2442ddbdc257609bc09a 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 dc92f2b9471e..b5269e36e0a1 100644 --- a/drivers/media/platform/rk3288-vpu/rk3288_vpu.c +++ b/drivers/media/platform/rk3288-vpu/rk3288_vpu.c @@ -387,7 +387,7 @@ static int rk3288_vpu_open(struct file *filp) q = &ctx->vq_dst; q->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; q->drv_priv = &ctx->fh; - q->io_modes = VB2_MMAP | VB2_USERPTR; + q->io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF; q->lock = &dev->vpu_mutex; q->buf_struct_size = sizeof(struct rk3288_vpu_buf); @@ -409,7 +409,7 @@ static int rk3288_vpu_open(struct file *filp) q = &ctx->vq_src; q->type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE; q->drv_priv = &ctx->fh; - q->io_modes = VB2_MMAP | VB2_USERPTR; + q->io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF; q->lock = &dev->vpu_mutex; q->buf_struct_size = sizeof(struct rk3288_vpu_buf);