Re: [PATCH v3 1/2] media: verisilicon: Simplify motion vectors and rfc buffers allocation

Nicolas Dufresne
2026-04-29T18:11:46Z

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

Hi Benjamin,

Le vendredi 17 avril 2026 à 06:54 -0400, Frank Li a écrit :
> On Wed, Apr 15, 2026 at 04:04:19PM +0200, Benjamin Gaignard wrote:
> > Until now we reserve the space needed for motion vectors and reference
> > frame compression at the end of the frame buffer.
> > Disentanglement mv and rfc from frame buffers by allocating
> > distinct buffers for each purpose.
> > That simplify the code by removing lot of offset computation.
>
> Can you try split to more small and straight forward patches, for example
>
> for example create patch just move hantro_h264_mv_size() to header file,

Marking this has Change Requested, as I completely agree with Frank that a split
of this giant will help proper review.

Nicolas

>
> ...
> > +++ b/drivers/media/platform/verisilicon/hantro_hevc.c
> > @@ -44,30 +44,49 @@ dma_addr_t hantro_hevc_get_ref_buf(struct hantro_ctx *ctx,
> >   int i;
> >
> >   /* Find the reference buffer in already known ones */
> > - for (i = 0;  i < NUM_REF_PICTURES; i++) {
> > + for (i = 0; i < NUM_REF_PICTURES; i++) {
> >   if (hevc_dec->ref_bufs_poc[i] == poc) {
> >   hevc_dec->ref_bufs_used |= 1 << i;
> >   return hevc_dec->ref_bufs[i].dma;
> >   }
> >   }
> > -
> >   return 0;
>
> Move this code style change to new patches.
>
> Frank

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