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

Nicolas Dufresne nicolas.dufresne at collabora.com
Wed Apr 29 11:11:41 PDT 2026


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-rockchip/attachments/20260429/fc989d13/attachment.sig>


More information about the Linux-rockchip mailing list