From nobody Sat Feb 7 07:24:28 2026 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C53832E541E; Tue, 27 Jan 2026 02:43:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=60.244.123.138 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769481796; cv=none; b=h/vUwzHXXLvNoWbKnWetbEYOXjfcSfXkLPWm928XTjCtUkUGN5tvpNYW7/InOyBgptHi+++3a8B1CJ5Q/hJylwjUkR/Q1f9WQUG0hrnxatA7qUouQHSesXdQAG8S9MsWu9XJLWLkdjh9KgQHF6TMfK7kD2pgy4br6emMAU2Okqo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769481796; c=relaxed/simple; bh=Ky5NIAMnmJS24R0vDAPCSOcxi8qH5qYEooiraIgg8Hc=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=XFH3BsZEni+o/K/xgFxH89nMY8AuEEqa119YygzW+A8SZKR/NI1GNv40PztBpeA56ob/BzxKn94FypYyYew3RPEVAP+ZAjPneepwZdPr+1RAGgJX2hzTCI7PG8uTRqD6lNvV555j0Qg0uekFZEkgDPNxUwJCc4cSlfm2RsCmHX8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com; spf=pass smtp.mailfrom=mediatek.com; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b=NJ1fNpV6; arc=none smtp.client-ip=60.244.123.138 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=mediatek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mediatek.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="NJ1fNpV6" X-UUID: eb8af464fb2911f085319dbc3099e8fb-20260127 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=3Z0CM5CbxISYl9PX8P+e3NKO7GZfKsMVPlcub8EwIz4=; b=NJ1fNpV60kHEajCwxtU7B/bg9BYcu8LvzMHPGG390GLjfEtUV5i00BbNzNDMQLlrvn+0GwuqGaGqZn54YP7WY3GnIZLVdgltYwXkzDMWfrTVMSh0+Y6m4+QgcwArLFXmohzDUtiUxK2QLdNA0mit9GfYnlCZJk2BeQnL5zmps2o=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.3.11,REQID:f9a5e5a9-55d2-47be-9030-8873dbd41c35,IP:0,U RL:0,TC:0,Content:-25,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTIO N:release,TS:-25 X-CID-META: VersionHash:89c9d04,CLOUDID:060d985a-a957-4259-bcca-d3af718d7034,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:81|82|102|836|888|898,TC:-5,Content: 0|15|50,EDM:-3,IP:nil,URL:0,File:130,RT:0,Bulk:nil,QS:nil,BEC:-1,COL:0,OSI :0,OSA:0,AV:0,LES:1,SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0,ARC:0 X-CID-BVR: 2,SSN|SDN X-CID-BAS: 2,SSN|SDN,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR X-CID-RHF: D41D8CD98F00B204E9800998ECF8427E X-UUID: eb8af464fb2911f085319dbc3099e8fb-20260127 Received: from mtkmbs09n1.mediatek.inc [(172.21.101.35)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1712572725; Tue, 27 Jan 2026 10:43:11 +0800 Received: from mtkmbs13n2.mediatek.inc (172.21.101.108) by MTKMBS14N1.mediatek.inc (172.21.101.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.29; Tue, 27 Jan 2026 10:43:09 +0800 Received: from mhfsdcap04.gcn.mediatek.inc (10.17.3.154) by mtkmbs13n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.2562.29 via Frontend Transport; Tue, 27 Jan 2026 10:43:08 +0800 From: Kyrie Wu To: Tiffany Lin , Andrew-CT Chen , Yunfei Dong , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Kyrie Wu , Hans Verkuil , Nicolas Dufresne , Nathan Hebert , Arnd Bergmann , Irui Wang , George Sun , , , , , CC: Neil Armstrong , Andrzej Pietrasiewicz , Yilong Zhou Subject: [PATCH v7 07/10] media: mediatek: vcodec: Fix vp9 4096x2176 fail for profile2 Date: Tue, 27 Jan 2026 10:42:44 +0800 Message-ID: <20260127024248.18406-8-kyrie.wu@mediatek.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20260127024248.18406-1-kyrie.wu@mediatek.com> References: <20260127024248.18406-1-kyrie.wu@mediatek.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-MTK: N Content-Type: text/plain; charset="utf-8" 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 decod= ing") Signed-off-by: Kyrie Wu Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Nicolas Dufresne --- .../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_r= eq_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 v= dec_vp9_slice_instance *inst return -EINVAL; } tiles->size[i][j] =3D 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++ =3D (size << 3) + ((offset << 3) & 0x7f); - *tb++ =3D pa & ~0xf; + *tb =3D pa & GENMASK(31, 4); + if (IS_ENABLED(CONFIG_ARCH_DMA_ADDR_T_64BIT)) + *tb |=3D (pa >> 32) & GENMASK(3, 0); + tb++; *tb++ =3D (pa << 3) & 0x7f; mi_row =3D (tiles->mi_rows[i] - 1) & 0x1ff; mi_col =3D (tiles->mi_cols[j] - 1) & 0x3f; --=20 2.45.2