[PATCH v7 07/10] media: mediatek: vcodec: Fix vp9 4096x2176 fail for profile2
Nicolas Dufresne
nicolas.dufresne at collabora.com
Thu Mar 19 11:09:48 PDT 2026
Le mardi 27 janvier 2026 à 10:42 +0800, Kyrie Wu a écrit :
> The DRAM address of the VP9 decoder tile info buffers may require
> as much as 36bits for 4096x2176 resolution. Fold the 4 most significant
> bits into the lower (padding) four bits of address.
>
> Fixes: 5d418351ca8f1 ("media: mediatek: vcodec: support stateless VP9 decoding")
> Signed-off-by: Kyrie Wu <kyrie.wu at mediatek.com>
> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>
> Reviewed-by: Nicolas Dufresne <nicolas.dufresne at collabora.com>
In v8, relocate this patch before the addition of the MT8189 pdata, since this
SoC depends on it.
Nicolas
> ---
> .../mediatek/vcodec/decoder/vdec/vdec_vp9_req_lat_if.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_vp9_req_lat_if.c b/drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_vp9_req_lat_if.c
> index e8ba99d31e74..a958e16eb380 100644
> --- a/drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_vp9_req_lat_if.c
> +++ b/drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_vp9_req_lat_if.c
> @@ -1133,9 +1133,17 @@ static int vdec_vp9_slice_setup_tile_buffer(struct vdec_vp9_slice_instance *inst
> return -EINVAL;
> }
> tiles->size[i][j] = size;
> + /*
> + * If the system supports 64-bit DMA addresses, the upper 4 bits
> + * of the address are also encoded into the buffer entry.
> + * The buffer pointer (tb) is incremented after each entry is written.
> + */
> if (tiles->mi_rows[i]) {
> *tb++ = (size << 3) + ((offset << 3) & 0x7f);
> - *tb++ = pa & ~0xf;
> + *tb = pa & GENMASK(31, 4);
> + if (IS_ENABLED(CONFIG_ARCH_DMA_ADDR_T_64BIT))
> + *tb |= (pa >> 32) & GENMASK(3, 0);
> + tb++;
> *tb++ = (pa << 3) & 0x7f;
> mi_row = (tiles->mi_rows[i] - 1) & 0x1ff;
> mi_col = (tiles->mi_cols[j] - 1) & 0x3f;
-------------- 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-mediatek/attachments/20260319/992b70ec/attachment.sig>
More information about the Linux-mediatek
mailing list