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

Frank Li
2026-04-17T10:54:30Z

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,

...
> +++ 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