lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6fe8418e5562eb2e219ea4b947852d22b9cdc481.camel@collabora.com>
Date: Fri, 28 Nov 2025 15:23:24 -0500
From: Nicolas Dufresne <nicolas.dufresne@...labora.com>
To: Yunfei Dong <yunfei.dong@...iatek.com>, Nícolas "F .
 R . A . Prado" <nfraprado@...labora.com>, Sebastian Fricke
 <sebastian.fricke@...labora.com>, Hans Verkuil	 <hverkuil-cisco@...all.nl>,
 AngeloGioacchino Del Regno	 <angelogioacchino.delregno@...labora.com>,
 Benjamin Gaignard	 <benjamin.gaignard@...labora.com>, Nathan Hebert
 <nhebert@...omium.org>,  Daniel Almeida <daniel.almeida@...labora.com>
Cc: Hsin-Yi Wang <hsinyi@...omium.org>, Fritz Koenig
 <frkoenig@...omium.org>,  Daniel Vetter <daniel@...ll.ch>, Steve Cho
 <stevecho@...omium.org>, linux-media@...r.kernel.org, 
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org, 
	linux-arm-kernel@...ts.infradead.org, linux-mediatek@...ts.infradead.org, 
	Project_Global_Chrome_Upstream_Group@...iatek.com
Subject: Re: [PATCH v2 13/14] media: mediatek: decoder: fill av1 buffer size
 with picinfo

Le vendredi 15 août 2025 à 16:52 +0800, Yunfei Dong a écrit :
> The buffer size of y and c plane has been calculated in vcp/scp,
> can fill each frame buffer size with picinfo directly.
> 
> Signed-off-by: Yunfei Dong <yunfei.dong@...iatek.com>

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

> ---
>  .../vcodec/decoder/vdec/vdec_av1_req_lat_if.c      | 14 ++++++++------
>  1 file changed, 8 insertions(+), 6 deletions(-)
> 
> diff --git
> a/drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_av1_req_lat_if.c
> b/drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_av1_req_lat_if.c
> index 2b2173062cb0..6070485e26c4 100644
> ---
> a/drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_av1_req_lat_if.c
> +++
> b/drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_av1_req_lat_if.c
> @@ -1799,18 +1799,19 @@ static int vdec_av1_slice_setup_core_buffer(struct
> vdec_av1_slice_instance *inst
>  {
>  	struct vb2_buffer *vb;
>  	struct vb2_queue *vq;
> -	int w, h, plane, size;
> +	int plane;
>  	int i;
>  
>  	plane = instance->ctx->q_data[MTK_Q_DATA_DST].fmt->num_planes;
> -	w = vsi->frame.uh.upscaled_width;
> -	h = vsi->frame.uh.frame_height;
> -	size = ALIGN(w, VCODEC_DEC_ALIGNED_64) * ALIGN(h,
> VCODEC_DEC_ALIGNED_64);
>  
>  	/* frame buffer */
>  	vsi->fb.y.dma_addr = fb->base_y.dma_addr;
> +
> +	vsi->fb.y.size = instance->ctx->picinfo.fb_sz[0];
> +	vsi->fb.c.size = instance->ctx->picinfo.fb_sz[1];
> +
>  	if (plane == 1)
> -		vsi->fb.c.dma_addr = fb->base_y.dma_addr + size;
> +		vsi->fb.c.dma_addr = fb->base_y.dma_addr + vsi->fb.y.size;
>  	else
>  		vsi->fb.c.dma_addr = fb->base_c.dma_addr;
>  
> @@ -1835,8 +1836,9 @@ static int vdec_av1_slice_setup_core_buffer(struct
> vdec_av1_slice_instance *inst
>  		}
>  
>  		vref->y.dma_addr = vb2_dma_contig_plane_dma_addr(vb, 0);
> +		vref->y.size = vsi->fb.y.size;
>  		if (plane == 1)
> -			vref->c.dma_addr = vref->y.dma_addr + size;
> +			vref->c.dma_addr = vref->y.dma_addr + vsi->fb.y.size;
>  		else
>  			vref->c.dma_addr = vb2_dma_contig_plane_dma_addr(vb,
> 1);
>  	}

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ