mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nicolas Dufresne <nicolas.dufresne@collabora.com>
To: Benjamin Gaignard <benjamin.gaignard@collabora.com>,
	 p.zabel@pengutronix.de, mchehab@kernel.org
Cc: linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org,
	 linux-kernel@vger.kernel.org, kernel@collabora.com
Subject: Re: [PATCH v1 3/7] media: verisilicon: h264: Use alloc/free helpers for auxiliary buffers
Date: Thu, 19 Nov 2026 16:59:42 -0500	[thread overview]
Message-ID: <6b658f38d7b7a8a1bfe9e57818ee6ee3b5471aad.camel@collabora.com> (raw)
In-Reply-To: <20260916125443.78602-4-benjamin.gaignard@collabora.com>

[-- Attachment #1: Type: text/plain, Size: 1705 bytes --]

Le mercredi 16 septembre 2026 à 14:54 +0200, Benjamin Gaignard a écrit :
> Simplify and clean up the code by using the helpers.
> 
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>

Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>

> ---
>  drivers/media/platform/verisilicon/hantro_h264.c | 9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/media/platform/verisilicon/hantro_h264.c b/drivers/media/platform/verisilicon/hantro_h264.c
> index 2414782f1eb6..68dde1cd1ac2 100644
> --- a/drivers/media/platform/verisilicon/hantro_h264.c
> +++ b/drivers/media/platform/verisilicon/hantro_h264.c
> @@ -494,26 +494,21 @@ int hantro_h264_dec_prepare_run(struct hantro_ctx *ctx)
>  
>  void hantro_h264_dec_exit(struct hantro_ctx *ctx)
>  {
> -	struct hantro_dev *vpu = ctx->dev;
>  	struct hantro_h264_dec_hw_ctx *h264_dec = &ctx->h264_dec;
>  	struct hantro_aux_buf *priv = &h264_dec->priv;
>  
> -	dma_free_coherent(vpu->dev, priv->size, priv->cpu, priv->dma);
> +	hantro_free_aux_buf(ctx, priv);
>  }
>  
>  int hantro_h264_dec_init(struct hantro_ctx *ctx)
>  {
> -	struct hantro_dev *vpu = ctx->dev;
>  	struct hantro_h264_dec_hw_ctx *h264_dec = &ctx->h264_dec;
>  	struct hantro_aux_buf *priv = &h264_dec->priv;
>  	struct hantro_h264_dec_priv_tbl *tbl;
>  
> -	priv->cpu = dma_alloc_coherent(vpu->dev, sizeof(*tbl), &priv->dma,
> -				       GFP_KERNEL);
> -	if (!priv->cpu)
> +	if (hantro_allocate_aux_buf(ctx, priv, sizeof(*tbl)))
>  		return -ENOMEM;
>  
> -	priv->size = sizeof(*tbl);
>  	tbl = priv->cpu;
>  	memcpy(tbl->cabac_table, h264_cabac_table, sizeof(tbl->cabac_table));
>  

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2026-11-19 21:59 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-16 12:54 [PATCH v1 0/7] media: verisilicon: simplify auxiliary buffers allocation Benjamin Gaignard
2026-09-16 12:54 ` [PATCH v1 1/7] media: verisilicon: Add helpers to allocate and free auxiliary buffers Benjamin Gaignard
2026-11-19 21:58   ` Nicolas Dufresne
2026-09-16 12:54 ` [PATCH v1 2/7] media: verisilicon: AV1: Use alloc/free helpers for " Benjamin Gaignard
2026-11-19 21:59   ` Nicolas Dufresne
2026-09-16 12:54 ` [PATCH v1 3/7] media: verisilicon: h264: " Benjamin Gaignard
2026-11-19 21:59   ` Nicolas Dufresne [this message]
2026-09-16 12:54 ` [PATCH v1 4/7] media: verisilicon: hevc: " Benjamin Gaignard
2026-11-19 22:00   ` Nicolas Dufresne
2026-09-16 12:54 ` [PATCH v1 5/7] media: verisilicon: vp8: " Benjamin Gaignard
2026-11-19 22:00   ` Nicolas Dufresne
2026-09-16 12:54 ` [PATCH v1 6/7] media: verisilicon: vp9: " Benjamin Gaignard
2026-11-19 22:01   ` Nicolas Dufresne
2026-09-16 12:54 ` [PATCH v1 7/7] media: verisilicon: mpeg4: " Benjamin Gaignard
2026-11-19 22:01   ` Nicolas Dufresne

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=6b658f38d7b7a8a1bfe9e57818ee6ee3b5471aad.camel@collabora.com \
    --to=nicolas.dufresne@collabora.com \
    --cc=benjamin.gaignard@collabora.com \
    --cc=kernel@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=mchehab@kernel.org \
    --cc=p.zabel@pengutronix.de \
    /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®