mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Frank Li <Frank.li@oss.nxp.com>
To: Ming Qian <ming.qian@oss.nxp.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
	Hans Verkuil <hverkuil@kernel.org>,
	Nicolas Dufresne <nicolas.dufresne@collabora.com>,
	Zhou Peng <eagle.zhou@nxp.com>, Frank Li <Frank.Li@nxp.com>,
	linux-imx@nxp.com, imx@lists.linux.dev,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] media: amphion: Enable non-coherent allocation for raw frame buffers
Date: Mon, 23 Nov 2026 15:54:12 -0500	[thread overview]
Message-ID: <awSn9NyulPPPIIT8@lizhi-Precision-Tower-5810> (raw)
In-Reply-To: <20261119-amphion-non-coherent-v1-1-c3154395e448@oss.nxp.com>

On Thu, Nov 19, 2026 at 04:27:14PM +0900, Ming Qian wrote:
> Allow applications to allocate raw frame buffers with
> V4L2_MEMORY_FLAG_NON_COHERENT for efficient CPU access. The required
> cache synchronization is handled by videobuf2 in its prepare() and
> finish() methods.
>
> Set allow_cache_hints only for the encoder OUTPUT and decoder CAPTURE
> queues. Leave it disabled for compressed bitstream queues, as the
> driver may access their payloads through the CPU.

"V4L2_MEMORY_FLAG_NON_COHERENT for efficient CPU access", but here
"Leave it disabled for compressed bitstream queues, as the
 driver may access their payloads through the CPU"

Look like description is contradiction

Frank

>
> Signed-off-by: Ming Qian <ming.qian@oss.nxp.com>
> ---
>  drivers/media/platform/amphion/vpu_v4l2.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/media/platform/amphion/vpu_v4l2.c b/drivers/media/platform/amphion/vpu_v4l2.c
> index 7cccc994fc50..c8d52f0af879 100644
> --- a/drivers/media/platform/amphion/vpu_v4l2.c
> +++ b/drivers/media/platform/amphion/vpu_v4l2.c
> @@ -664,6 +664,8 @@ static int vpu_m2m_queue_init(void *priv, struct vb2_queue *src_vq, struct vb2_q
>  	src_vq->mem_ops = &vb2_dma_contig_memops;
>  	if (inst->type == VPU_CORE_TYPE_DEC && inst->use_stream_buffer)
>  		src_vq->mem_ops = &vb2_vmalloc_memops;
> +	if (inst->type == VPU_CORE_TYPE_ENC)
> +		src_vq->allow_cache_hints = 1;
>  	src_vq->drv_priv = inst;
>  	src_vq->buf_struct_size = sizeof(struct vpu_vb2_buffer);
>  	src_vq->dev = inst->vpu->dev;
> @@ -680,6 +682,8 @@ static int vpu_m2m_queue_init(void *priv, struct vb2_queue *src_vq, struct vb2_q
>  	dst_vq->mem_ops = &vb2_dma_contig_memops;
>  	if (inst->type == VPU_CORE_TYPE_ENC && inst->use_stream_buffer)
>  		dst_vq->mem_ops = &vb2_vmalloc_memops;
> +	if (inst->type == VPU_CORE_TYPE_DEC)
> +		dst_vq->allow_cache_hints = 1;
>  	dst_vq->drv_priv = inst;
>  	dst_vq->buf_struct_size = sizeof(struct vpu_vb2_buffer);
>  	dst_vq->dev = inst->vpu->dev;
>
> ---
> base-commit: 7969a6f407cf55b5254c824c87875452655ef11e
> change-id: 20261119-amphion-non-coherent-f61009334dff
>

      reply	other threads:[~2026-11-23 20:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19  7:27 Ming Qian
2026-11-23 20:54 ` Frank Li [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=awSn9NyulPPPIIT8@lizhi-Precision-Tower-5810 \
    --to=frank.li@oss.nxp.com \
    --cc=Frank.Li@nxp.com \
    --cc=eagle.zhou@nxp.com \
    --cc=hverkuil@kernel.org \
    --cc=imx@lists.linux.dev \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=ming.qian@oss.nxp.com \
    --cc=nicolas.dufresne@collabora.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®