From nobody Thu Oct 2 17:03:35 2025 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) (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 EF99B2F7460; Mon, 15 Sep 2025 09:20:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.61.82.184 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757928023; cv=none; b=cnH4CnFyqkUoFhJV5igpisu4WSfz6inirtrDeA8rsJ8lcWxevp5e3YDPFqo+ULOwEwjDyLokhsmteex8Jk40xy6HPhmqBAw5sA3nWzezrW2qk2ItnQagCOsOe4Jn2pZn1Kv5NwtOI1BzeHA00DodPm6pM1VbIXFRJDXgXaeMzs0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757928023; c=relaxed/simple; bh=ER5OgJNsGnKGwvjUoJ/cSH39tayonXEZJLqUcprtikY=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=tQ59BX4621frylfacRDowFOvenRiSP3YpZzBpn+zWyxtYu1u4XXlID7FNRWp/Q2AW7rU9qjVHxCRRp/5+rZ2UiQdx+LmuPv3dhgelxBNRr35G53kMyx5gwpJGS1/uJ1kiGUYCPPt6TVBcyq/Qxn4Vzns7bWGphk+OFLTSx4rQ0M= 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=YE7c/G1y; arc=none smtp.client-ip=210.61.82.184 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="YE7c/G1y" X-UUID: 30ddc60a921511f0b33aeb1e7f16c2b6-20250915 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=Q1VALCkX+Q4sYnGWxIe+ZAghMVa7gU7Vt2OwSX6cEms=; b=YE7c/G1yl69cwoIXUJdlz24tUblZG70gWMnGdnizlkVIwSQZh7K76FspXxe2HrRaFV5MwXvJOIF+unSXc/eVEwV5jz5a+fRe+IwtyyjSi2B8ZnJ25tuPDbvvflq7dehS+bnflCGHEBWUJly3TCh6jIfKXnauyMys73tt7FAwGAo=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.3.4,REQID:e5c0065f-5201-4a8e-b21d-43ce0e729361,IP:0,UR L:0,TC:0,Content:-25,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:-25 X-CID-META: VersionHash:1ca6b93,CLOUDID:40fa54a9-24df-464e-9c88-e53ab7cf7153,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:81|82|102,TC:-5,Content:0|15|50,EDM: -3,IP:nil,URL:0,File:nil,RT:nil,Bulk:nil,QS:nil,BEC:nil,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: 30ddc60a921511f0b33aeb1e7f16c2b6-20250915 Received: from mtkmbs14n1.mediatek.inc [(172.21.101.75)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 729407216; Mon, 15 Sep 2025 17:20:16 +0800 Received: from mtkmbs13n2.mediatek.inc (172.21.101.108) by MTKMBS09N1.mediatek.inc (172.21.101.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.39; Mon, 15 Sep 2025 17:20:14 +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.1258.39 via Frontend Transport; Mon, 15 Sep 2025 17:20:13 +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 , Christophe JAILLET , Sebastian Fricke , Nathan Hebert , Arnd Bergmann , Irui Wang , George Sun , , , , , CC: Neil Armstrong , Andrzej Pietrasiewicz Subject: [PATCH v3 5/8] media: mediatek: vcodec: fix vp9 4096x2176 fail for profile2 Date: Mon, 15 Sep 2025 17:19:55 +0800 Message-ID: <20250915091958.31509-6-kyrie.wu@mediatek.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20250915091958.31509-1-kyrie.wu@mediatek.com> References: <20250915091958.31509-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 addr of vp9 decoder tile number, which use dram mode to set tile information, may reach to 36bits for 4096x2176. It needs to get the highest 4bit of tile buffer address to set tile buffer address. Fixes: 5d418351ca8f1 ("media: mediatek: vcodec: support stateless VP9 decod= ing") Signed-off-by: Kyrie Wu Reviewed-by: AngeloGioacchino Del Regno --- .../mediatek/vcodec/decoder/vdec/vdec_vp9_req_lat_if.c | 5 ++++- 1 file changed, 4 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 04197164fb82..416d8c0c04ce 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 @@ -1140,7 +1140,10 @@ static int vdec_vp9_slice_setup_tile_buffer(struct v= dec_vp9_slice_instance *inst tiles->size[i][j] =3D size; if (tiles->mi_rows[i]) { *tb++ =3D (size << 3) + ((offset << 3) & 0x7f); - *tb++ =3D pa & ~0xf; + *tb =3D pa & ~0xf; + if (IS_ENABLED(CONFIG_ARCH_DMA_ADDR_T_64BIT)) + *tb |=3D (pa >> 32) & 0xf; + 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