* [PATCH] media: venus: support VB2_USERPTR IO mode
@ 2018-10-11 6:46 Alexandre Courbot
2018-10-11 6:50 ` Alexandre Courbot
0 siblings, 1 reply; 4+ messages in thread
From: Alexandre Courbot @ 2018-10-11 6:46 UTC (permalink / raw)
To: Stanimir Varbanov, Mauro Carvalho Chehab
Cc: linux-media, linux-arm-msm, linux-kernel, Alexandre Courbot
The venus codec can work just fine with USERPTR buffers. Enable this
possibility.
Signed-off-by: Alexandre Courbot <acourbot@chromium.org>
---
drivers/media/platform/qcom/venus/vdec.c | 4 ++--
drivers/media/platform/qcom/venus/venc.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c
index 33320c5025313f..dfc2260e8d213a 100644
--- a/drivers/media/platform/qcom/venus/vdec.c
+++ b/drivers/media/platform/qcom/venus/vdec.c
@@ -984,7 +984,7 @@ static int m2m_queue_init(void *priv, struct vb2_queue *src_vq,
int ret;
src_vq->type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
- src_vq->io_modes = VB2_MMAP | VB2_DMABUF;
+ src_vq->io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF;
src_vq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY;
src_vq->ops = &vdec_vb2_ops;
src_vq->mem_ops = &vb2_dma_sg_memops;
@@ -999,7 +999,7 @@ static int m2m_queue_init(void *priv, struct vb2_queue *src_vq,
return ret;
dst_vq->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
- dst_vq->io_modes = VB2_MMAP | VB2_DMABUF;
+ dst_vq->io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF;
dst_vq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY;
dst_vq->ops = &vdec_vb2_ops;
dst_vq->mem_ops = &vb2_dma_sg_memops;
diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c
index d2805b5e28a1b2..71ca59a24991be 100644
--- a/drivers/media/platform/qcom/venus/venc.c
+++ b/drivers/media/platform/qcom/venus/venc.c
@@ -1073,7 +1073,7 @@ static int m2m_queue_init(void *priv, struct vb2_queue *src_vq,
int ret;
src_vq->type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
- src_vq->io_modes = VB2_MMAP | VB2_DMABUF;
+ src_vq->io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF;
src_vq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY;
src_vq->ops = &venc_vb2_ops;
src_vq->mem_ops = &vb2_dma_sg_memops;
@@ -1090,7 +1090,7 @@ static int m2m_queue_init(void *priv, struct vb2_queue *src_vq,
return ret;
dst_vq->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
- dst_vq->io_modes = VB2_MMAP | VB2_DMABUF;
+ dst_vq->io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF;
dst_vq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY;
dst_vq->ops = &venc_vb2_ops;
dst_vq->mem_ops = &vb2_dma_sg_memops;
--
2.19.0.605.g01d371f741-goog
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] media: venus: support VB2_USERPTR IO mode
2018-10-11 6:46 [PATCH] media: venus: support VB2_USERPTR IO mode Alexandre Courbot
@ 2018-10-11 6:50 ` Alexandre Courbot
2018-10-11 8:26 ` Stanimir Varbanov
0 siblings, 1 reply; 4+ messages in thread
From: Alexandre Courbot @ 2018-10-11 6:50 UTC (permalink / raw)
To: Stanimir Varbanov, Mauro Carvalho Chehab
Cc: Linux Media Mailing List, linux-arm-msm, LKML
Please ignore this patch - I did not notice that a similar one has
been sent before. >_<
On Thu, Oct 11, 2018 at 3:46 PM Alexandre Courbot <acourbot@chromium.org> wrote:
>
> The venus codec can work just fine with USERPTR buffers. Enable this
> possibility.
>
> Signed-off-by: Alexandre Courbot <acourbot@chromium.org>
> ---
> drivers/media/platform/qcom/venus/vdec.c | 4 ++--
> drivers/media/platform/qcom/venus/venc.c | 4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c
> index 33320c5025313f..dfc2260e8d213a 100644
> --- a/drivers/media/platform/qcom/venus/vdec.c
> +++ b/drivers/media/platform/qcom/venus/vdec.c
> @@ -984,7 +984,7 @@ static int m2m_queue_init(void *priv, struct vb2_queue *src_vq,
> int ret;
>
> src_vq->type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
> - src_vq->io_modes = VB2_MMAP | VB2_DMABUF;
> + src_vq->io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF;
> src_vq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY;
> src_vq->ops = &vdec_vb2_ops;
> src_vq->mem_ops = &vb2_dma_sg_memops;
> @@ -999,7 +999,7 @@ static int m2m_queue_init(void *priv, struct vb2_queue *src_vq,
> return ret;
>
> dst_vq->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
> - dst_vq->io_modes = VB2_MMAP | VB2_DMABUF;
> + dst_vq->io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF;
> dst_vq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY;
> dst_vq->ops = &vdec_vb2_ops;
> dst_vq->mem_ops = &vb2_dma_sg_memops;
> diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c
> index d2805b5e28a1b2..71ca59a24991be 100644
> --- a/drivers/media/platform/qcom/venus/venc.c
> +++ b/drivers/media/platform/qcom/venus/venc.c
> @@ -1073,7 +1073,7 @@ static int m2m_queue_init(void *priv, struct vb2_queue *src_vq,
> int ret;
>
> src_vq->type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
> - src_vq->io_modes = VB2_MMAP | VB2_DMABUF;
> + src_vq->io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF;
> src_vq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY;
> src_vq->ops = &venc_vb2_ops;
> src_vq->mem_ops = &vb2_dma_sg_memops;
> @@ -1090,7 +1090,7 @@ static int m2m_queue_init(void *priv, struct vb2_queue *src_vq,
> return ret;
>
> dst_vq->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
> - dst_vq->io_modes = VB2_MMAP | VB2_DMABUF;
> + dst_vq->io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF;
> dst_vq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY;
> dst_vq->ops = &venc_vb2_ops;
> dst_vq->mem_ops = &vb2_dma_sg_memops;
> --
> 2.19.0.605.g01d371f741-goog
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] media: venus: support VB2_USERPTR IO mode
2018-10-11 6:50 ` Alexandre Courbot
@ 2018-10-11 8:26 ` Stanimir Varbanov
2018-10-11 8:35 ` Alexandre Courbot
0 siblings, 1 reply; 4+ messages in thread
From: Stanimir Varbanov @ 2018-10-11 8:26 UTC (permalink / raw)
To: Alexandre Courbot, Stanimir Varbanov, Mauro Carvalho Chehab
Cc: Linux Media Mailing List, linux-arm-msm, LKML
Hi Alex,
On 10/11/2018 09:50 AM, Alexandre Courbot wrote:
> Please ignore this patch - I did not notice that a similar one has
> been sent before.
The difference is that you made it for decoder as well. Do you need
userptr for decoder?
--
regards,
Stan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] media: venus: support VB2_USERPTR IO mode
2018-10-11 8:26 ` Stanimir Varbanov
@ 2018-10-11 8:35 ` Alexandre Courbot
0 siblings, 0 replies; 4+ messages in thread
From: Alexandre Courbot @ 2018-10-11 8:35 UTC (permalink / raw)
To: Stanimir Varbanov
Cc: Mauro Carvalho Chehab, Linux Media Mailing List, linux-arm-msm, LKML
On Thu, Oct 11, 2018 at 5:26 PM Stanimir Varbanov
<stanimir.varbanov@linaro.org> wrote:
>
> Hi Alex,
>
> On 10/11/2018 09:50 AM, Alexandre Courbot wrote:
> > Please ignore this patch - I did not notice that a similar one has
> > been sent before.
>
> The difference is that you made it for decoder as well. Do you need
> userptr for decoder?
Not at the moment, so this part has not been tested. Better to take
Malathi's patch.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-10-11 8:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-11 6:46 [PATCH] media: venus: support VB2_USERPTR IO mode Alexandre Courbot
2018-10-11 6:50 ` Alexandre Courbot
2018-10-11 8:26 ` Stanimir Varbanov
2018-10-11 8:35 ` Alexandre Courbot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.