[PATCH v3 1/5] media: verisilicon: Size the VP8 segment map for the largest frame
Nicolas Dufresne
nicolas.dufresne at collabora.com
Mon Nov 30 14:39:43 PST 2026
Le lundi 30 novembre 2026 à 21:53 +0000, Arun Iyengar via B4 Relay a écrit :
> From: Arun Iyengar <aiyengar1990 at gmail.com>
>
> The segment map is sized at STREAMON, but the CAPTURE format can grow
> while streaming and overrun it. Size it for the largest frame, as VP9
> does.
Its shouldn't really grow while streaming, I wonder if some VP9 feature didn't
leak into VP8 and if we shouldn't simply protect VP8 against that, instead of
supported something that will break anyway, and just use more memory for no good
reason.
Nicolas
>
> Fixes: bbd267daf4fc ("media: verisilicon: vp9: Allow to change resolution while streaming")
> Cc: stable at vger.kernel.org
> Reviewed-by: Benjamin Gaignard <benjamin.gaignard at collabora.com>
> Signed-off-by: Arun Iyengar <aiyengar1990 at gmail.com>
> ---
> drivers/media/platform/verisilicon/hantro_vp8.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/platform/verisilicon/hantro_vp8.c b/drivers/media/platform/verisilicon/hantro_vp8.c
> index 65648c017e76..19a89722bf05 100644
> --- a/drivers/media/platform/verisilicon/hantro_vp8.c
> +++ b/drivers/media/platform/verisilicon/hantro_vp8.c
> @@ -150,8 +150,8 @@ int hantro_vp8_dec_init(struct hantro_ctx *ctx)
> int ret;
>
> /* segment map table size calculation */
> - mb_width = DIV_ROUND_UP(ctx->dst_fmt.width, 16);
> - mb_height = DIV_ROUND_UP(ctx->dst_fmt.height, 16);
> + mb_width = DIV_ROUND_UP(ctx->vpu_src_fmt->frmsize.max_width, 16);
> + mb_height = DIV_ROUND_UP(ctx->vpu_src_fmt->frmsize.max_height, 16);
> segment_map_size = round_up(DIV_ROUND_UP(mb_width * mb_height, 4), 64);
>
> /*
-------------- 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/20261130/3ad51657/attachment-0001.sig>
More information about the Linux-rockchip
mailing list