From nobody Thu Oct 2 15:35:39 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 2999D2F60B3; Mon, 15 Sep 2025 09:20:15 +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=1757928019; cv=none; b=hSq/xHanQfnJFVeesSwKQSucr2qBh7v+5WNyy4+D0MePir6S0SMA1anU5EzvUzPqX5I6wactAZeDKpxJecqmyoFP0i+PF3wptks337nMPUl2cct66Ecfm+PpgePKMWdScFIV8gZh1UxWFKOx3xIN0LwAJZmwF9pvado3e+RcQ5k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757928019; c=relaxed/simple; bh=/ruw21K+ycADjlJgIT83spQW433jzUDSOorY17ezzrk=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=NTemHjqiyu+TUaD7pI6DxgY0CdhPnQzqHa+GhkDMNsRou3XA3gpZ5/3j05kMnd8ntq8Rdr+9gZMElzO1x44SA1jKmtqJbLgHYQZL2WGZRhc/NsiUFJ5oppggjIRVygeJSABpdQKPnk5Vn7Hka/P1bWTxfzOB+BY/JQYU0+N8WD0= 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=rBV+/Jiz; 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="rBV+/Jiz" X-UUID: 2d587d5e921511f0b33aeb1e7f16c2b6-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=sKkAJIfy8uNGi3cVsV9uqX9o7sp9y2Rz6rsxYh4d4Nw=; b=rBV+/JizON81uWPxJ2IPn5C68RkSnxpODhDss28S1uOv6Me03lBu1lpOKW0XZ957Ke789CLEmyJguCpMTZk7KQapTw3quj4nbSJBW8hUwR24ngWMJkBfrlxiQgMWMdAhsIgmKkIzx26fQMxMqUYzhm8PII11kHpn1YnYYENpBzQ=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.3.4,REQID:d2e324ae-1015-40b8-9399-a6e840646e20,IP:0,UR L:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION:r elease,TS:0 X-CID-META: VersionHash:1ca6b93,CLOUDID:dff954a9-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: 2d587d5e921511f0b33aeb1e7f16c2b6-20250915 Received: from mtkmbs09n1.mediatek.inc [(172.21.101.35)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 2102906054; Mon, 15 Sep 2025 17:20:10 +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:08 +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:07 +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 1/8] dt-bindings: media: mediatek: decoder: Add MT8189 mediatek,vcodec-decoder Date: Mon, 15 Sep 2025 17:19:51 +0800 Message-ID: <20250915091958.31509-2-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" Add compatible for video decoder on MT8189 platform. Compared with former ICs, the MT8189 decoder use iommu to instead of smmu, and use scp architecture, the frequency is only 406MHZ, and cannot reach more than 700MHZ. At the same time, the decoder supports the vp9 decoding protocol for the first time in single IC. Signed-off-by: Kyrie Wu Acked-by: Rob Herring (Arm) --- .../bindings/media/mediatek,vcodec-subdev-decoder.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/media/mediatek,vcodec-subdev= -decoder.yaml b/Documentation/devicetree/bindings/media/mediatek,vcodec-sub= dev-decoder.yaml index 74e1d88d3056..248a9f6af5a6 100644 --- a/Documentation/devicetree/bindings/media/mediatek,vcodec-subdev-decode= r.yaml +++ b/Documentation/devicetree/bindings/media/mediatek,vcodec-subdev-decode= r.yaml @@ -75,6 +75,7 @@ properties: - mediatek,mt8192-vcodec-dec - mediatek,mt8186-vcodec-dec - mediatek,mt8188-vcodec-dec + - mediatek,mt8189-vcodec-dec - mediatek,mt8195-vcodec-dec - mediatek,mt8196-vcodec-dec =20 --=20 2.45.2 From nobody Thu Oct 2 15:35:39 2025 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 846372F5327; Mon, 15 Sep 2025 09:20: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=1757928016; cv=none; b=uvfEZSiE56MXuo5SA6PPco2DZS4aCTu3u32Gjr3eXz0MeTqk+aMBf1U37buksa2teAlhbYoNF4tjaXrr6NAVbRn+4WR+YPqSVQ9hzSYUQzQXu1nVOeGcz1xI/ZPS7DTPQpA5RwRHmUQ97dzbpjasbo49roVHYik84qhwURcWAQs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757928016; c=relaxed/simple; bh=7lbNuLHxpd0olZA4QXnQ0hIQNCpG4e1XDctxzVQ3bZQ=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=t+IVW8Nx5gvMzaP7RqjcRSytKWT+vXt6gwvRK4I15c/dFjBxNaeea7O+fG7hKp55EQacrMPpvd70HfrWYSdB/36p0CL6zgUYldyEQpVH+N4nkGQK8Q0KeY+KT+Sb4tAtaBddQpin3eDF2pRDrOXD0+rO9aWofNZYsAl/h3WXA9k= 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=kuEMWtzI; 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="kuEMWtzI" X-UUID: 2e3abf34921511f0bd5779446731db89-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=GOLgmMpYR2ryZv6rUHWgYW+TGfr3B2tAoli1w7hdIug=; b=kuEMWtzIe6gK8Hjh9/3EMx+RU3aq+mmuqACOBoEa+JXbBJ+M00WB1qp3+85rsjf2wJ7TEkgA+7zrh1Af6FKz7vJRfYsAjYD6BDlesw4T7NrBuI80AXnzaVMm40aAgZ0v14sw8u39vgGibg3ErVJIJDqazkMIFA+Wk1KgSf4rWOM=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.3.4,REQID:fcfff513-879c-408a-b582-fad48f14264e,IP:0,UR L:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION:r elease,TS:0 X-CID-META: VersionHash:1ca6b93,CLOUDID:910c916c-8443-424b-b119-dc42e68239b0,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: 2e3abf34921511f0bd5779446731db89-20250915 Received: from mtkmbs10n2.mediatek.inc [(172.21.101.183)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 586112977; Mon, 15 Sep 2025 17:20:11 +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: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.1258.39 via Frontend Transport; Mon, 15 Sep 2025 17:20: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 , Christophe JAILLET , Sebastian Fricke , Nathan Hebert , Arnd Bergmann , Irui Wang , George Sun , , , , , CC: Neil Armstrong , Andrzej Pietrasiewicz Subject: [PATCH v3 2/8] media: mediatek: vcodec: add decoder compatible to support MT8189 Date: Mon, 15 Sep 2025 17:19:52 +0800 Message-ID: <20250915091958.31509-3-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" MT8189 is pure single core architecture. Support its compatible and use `mtk_vdec_single_core_pdata` to initialize platform data. Signed-off-by: Kyrie Wu Reviewed-by: AngeloGioacchino Del Regno --- .../platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.c | 6 ++++++ .../platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.h | 1 + 2 files changed, 7 insertions(+) diff --git a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_= drv.c b/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.c index fabf969bc8a9..e7b6b108f4fb 100644 --- a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.c +++ b/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.c @@ -348,6 +348,8 @@ static void mtk_vcodec_dec_get_chip_name(struct mtk_vco= dec_dec_dev *vdec_dev) vdec_dev->chip_name =3D MTK_VDEC_MT8188; else if (of_device_is_compatible(dev->of_node, "mediatek,mt8196-vcodec-de= c")) vdec_dev->chip_name =3D MTK_VDEC_MT8196; + else if (of_device_is_compatible(dev->of_node, "mediatek,mt8189-vcodec-de= c")) + vdec_dev->chip_name =3D MTK_VDEC_MT8189; else vdec_dev->chip_name =3D MTK_VDEC_INVAL; } @@ -575,6 +577,10 @@ static const struct of_device_id mtk_vcodec_match[] = =3D { .compatible =3D "mediatek,mt8196-vcodec-dec", .data =3D &mtk_lat_sig_core_pdata, }, + { + .compatible =3D "mediatek,mt8189-vcodec-dec", + .data =3D &mtk_vdec_single_core_pdata, + }, {}, }; =20 diff --git a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_= drv.h b/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.h index 6bdde600a167..856d12aa84d8 100644 --- a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.h +++ b/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.h @@ -25,6 +25,7 @@ enum mtk_vcodec_dec_chip_name { MTK_VDEC_MT8183 =3D 8183, MTK_VDEC_MT8186 =3D 8186, MTK_VDEC_MT8188 =3D 8188, + MTK_VDEC_MT8189 =3D 8189, MTK_VDEC_MT8192 =3D 8192, MTK_VDEC_MT8195 =3D 8195, MTK_VDEC_MT8196 =3D 8196, --=20 2.45.2 From nobody Thu Oct 2 15:35:39 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 1A69D2F60D5; Mon, 15 Sep 2025 09:20:17 +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=1757928020; cv=none; b=TJOl3W1HjEr92CiEI0GWPt2JlvVoKMjNLF4O7fTPQWnn8iV8k/sstnGLEnUlwfh/Wov54yo1i3NgdlD8Wn3/mkR0stY18xl2zsTjEBqJeOkHZzACJhblb+kZIltjgLMLm4LpcViAgoUuuyF8F30WpqUenwcgaIuVwDk+KZtWhgU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757928020; c=relaxed/simple; bh=2bnrgwRKdjaPcjaJEXPls0O2e277Ocjv4J5uEwhq73c=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=XknWeNPsw8iF0y5i03BGltRqgDK2VQrNcdgmpge/1gRhBgDmxXqAQSANhQw9T1qS9MQWX/Mm6i2qa+pPrvPDaArr0HbXPDHJ77NWZKbXr6b+lHiqjuzLpQHN2ezmBzJTLUSNwWpMROfo4Z6ufuiEFOVqyXx+Rl+JbiiHuPHn6p8= 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=szpTZV1/; 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="szpTZV1/" X-UUID: 2f17502a921511f0b33aeb1e7f16c2b6-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=9oVQwU5NDu3BgEkTUgexl0WgqqUemcYc9fF1BGBAWZo=; b=szpTZV1/JY89M5VANCSDGFyKxjc97xnP4lIxFmY2IGlr4KP7uPygZdOcp3S3Ze6E3SwFcnX6IMK4IZpUpzcL6STeXuTzVTKK23ONcbJc/Ezcgnf3DOpQPA30VhqBOW5xSzDDL/NnxPRE3fOoWJg/ooA37MAT02UuN+shlMc8lFs=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.3.4,REQID:33764175-1cec-4928-8c73-923e747c482a,IP:0,UR L:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION:r elease,TS:0 X-CID-META: VersionHash:1ca6b93,CLOUDID:89ac4ff8-ebfe-43c9-88c9-80cb93f22ca4,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: 2f17502a921511f0b33aeb1e7f16c2b6-20250915 Received: from mtkmbs11n1.mediatek.inc [(172.21.101.185)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1020044008; Mon, 15 Sep 2025 17:20:13 +0800 Received: from mtkmbs13n2.mediatek.inc (172.21.101.108) by mtkmbs11n1.mediatek.inc (172.21.101.185) 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:11 +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:10 +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 3/8] media: mediatek: vcodec: add profile and level supporting for MT8189 Date: Mon, 15 Sep 2025 17:19:53 +0800 Message-ID: <20250915091958.31509-4-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" add profile and level supporting for H264 and vp9 of MT8189 Signed-off-by: Kyrie Wu Reviewed-by: AngeloGioacchino Del Regno --- .../mediatek/vcodec/decoder/mtk_vcodec_dec_stateless.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_= stateless.c b/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec= _stateless.c index c1cef78471a9..0a9bdc5316f9 100644 --- a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_statele= ss.c +++ b/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_statele= ss.c @@ -552,6 +552,7 @@ static void mtk_vcodec_dec_fill_h264_level(struct v4l2_= ctrl_config *cfg, switch (ctx->dev->chip_name) { case MTK_VDEC_MT8192: case MTK_VDEC_MT8188: + case MTK_VDEC_MT8189: cfg->max =3D V4L2_MPEG_VIDEO_H264_LEVEL_5_2; break; case MTK_VDEC_MT8195: @@ -573,6 +574,7 @@ static void mtk_vcodec_dec_fill_h264_profile(struct v4l= 2_ctrl_config *cfg, { switch (ctx->dev->chip_name) { case MTK_VDEC_MT8188: + case MTK_VDEC_MT8189: case MTK_VDEC_MT8195: case MTK_VDEC_MT8196: cfg->max =3D V4L2_MPEG_VIDEO_H264_PROFILE_HIGH_10; @@ -623,6 +625,7 @@ static void mtk_vcodec_dec_fill_vp9_level(struct v4l2_c= trl_config *cfg, case MTK_VDEC_MT8188: cfg->max =3D V4L2_MPEG_VIDEO_VP9_LEVEL_5_1; break; + case MTK_VDEC_MT8189: case MTK_VDEC_MT8195: case MTK_VDEC_MT8196: cfg->max =3D V4L2_MPEG_VIDEO_VP9_LEVEL_5_2; @@ -641,6 +644,7 @@ static void mtk_vcodec_dec_fill_vp9_profile(struct v4l2= _ctrl_config *cfg, { switch (ctx->dev->chip_name) { case MTK_VDEC_MT8188: + case MTK_VDEC_MT8189: case MTK_VDEC_MT8195: case MTK_VDEC_MT8196: cfg->max =3D V4L2_MPEG_VIDEO_VP9_PROFILE_2; --=20 2.45.2 From nobody Thu Oct 2 15:35:39 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 CDD442F656A; Mon, 15 Sep 2025 09:20:19 +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=1757928022; cv=none; b=D3poactvLSZFuK4ycFzD62OGb9V736XH1e1ZJZ3p/z2XL0HpUxrj3WLMZPIIoe0txarLJm/x3Ut6bSnB94aOj03Q3y/vWhVogRVLiR7uodEuETzRsYai/lAYxrIj2dsxuB0PYA8MM8Xu7xT0v9CrDlc3vc124UBtOt8Pb3P0jYg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757928022; c=relaxed/simple; bh=+uzwRkyAz/SYtdqX3U0WW+t/ysuHKI3qCbnBLiwZYds=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=RQFc5miRx2BJkzFfbT19h+zV9Vob1yZCNiWEosmbSwDrsotJ6DJPjfGdp/JAB5hHk+vNjhowkEEZfYMAbc8MO5+57PP0Q9uJZDNW5SB5bLOgqmOAnUNufSISoJVPiRXsAFT16HVqKAQ0vBdptBWTrCbHCg2FQ/0uut4/Y4L43fA= 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=bEv3+wUz; 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="bEv3+wUz" X-UUID: 3004997a921511f0b33aeb1e7f16c2b6-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=R/yxOD9SvhwV6h3QTG3RdIU0HppZxoSPrognPmbzYlQ=; b=bEv3+wUzIjyRLQpzYOWf7ojYb7KKSM3eOhV5NwqHHh5yJtvzJgipBg24dQpvjApheN2+eEZX1c9fzlxmdOmqKPfOBk6ajvKHwaV3YQBxsYYIFYULYRn4e/nnO9UeqTeIZLu4g2XZbGTo96K4O00rjVLyedIBqTL6KtJRKn0rUHE=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.3.4,REQID:c2888c66-32fd-43a5-b8d1-95989f0d9336,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:e30c916c-8443-424b-b119-dc42e68239b0,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: 3004997a921511f0b33aeb1e7f16c2b6-20250915 Received: from mtkmbs13n2.mediatek.inc [(172.21.101.108)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 439024692; Mon, 15 Sep 2025 17:20:14 +0800 Received: from mtkmbs13n2.mediatek.inc (172.21.101.108) by mtkmbs10n1.mediatek.inc (172.21.101.34) 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:12 +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:11 +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 4/8] media: mediatek: vcodec: Add core-only VP9 decoding support for MT8189 Date: Mon, 15 Sep 2025 17:19:54 +0800 Message-ID: <20250915091958.31509-5-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" Implemented core-only VP9 decoding functions for MT8189. Signed-off-by: Kyrie Wu --- .../vcodec/decoder/vdec/vdec_vp9_req_lat_if.c | 27 +++++++++++-------- 1 file changed, 16 insertions(+), 11 deletions(-) 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 fa0f406f7726..04197164fb82 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 @@ -23,6 +23,7 @@ =20 #define VP9_TILE_BUF_SIZE 4096 #define VP9_PROB_BUF_SIZE 2560 +#define VP9_PROB_BUF_4K_SIZE 3840 #define VP9_COUNTS_BUF_SIZE 16384 =20 #define HDR_FLAG(x) (!!((hdr)->flags & V4L2_VP9_FRAME_FLAG_##x)) @@ -616,7 +617,10 @@ static int vdec_vp9_slice_alloc_working_buffer(struct = vdec_vp9_slice_instance *i } =20 if (!instance->prob.va) { - instance->prob.size =3D VP9_PROB_BUF_SIZE; + instance->prob.size =3D ((ctx->dev->chip_name =3D=3D MTK_VDEC_MT8196) || + (ctx->dev->chip_name =3D=3D MTK_VDEC_MT8189)) ? + VP9_PROB_BUF_4K_SIZE : VP9_PROB_BUF_SIZE; + if (mtk_vcodec_mem_alloc(ctx, &instance->prob)) goto err; } @@ -696,21 +700,22 @@ static int vdec_vp9_slice_tile_offset(int idx, int mi= _num, int tile_log2) return min(offset, mi_num); } =20 -static -int vdec_vp9_slice_setup_single_from_src_to_dst(struct vdec_vp9_slice_inst= ance *instance) +static int vdec_vp9_slice_setup_single_from_src_to_dst(struct vdec_vp9_sli= ce_instance *instance, + struct mtk_vcodec_mem *bs, + struct vdec_fb *fb) { - struct vb2_v4l2_buffer *src; - struct vb2_v4l2_buffer *dst; + struct mtk_video_dec_buf *src_buf_info; + struct mtk_video_dec_buf *dst_buf_info; =20 - src =3D v4l2_m2m_next_src_buf(instance->ctx->m2m_ctx); - if (!src) + src_buf_info =3D container_of(bs, struct mtk_video_dec_buf, bs_buffer); + if (!src_buf_info) return -EINVAL; =20 - dst =3D v4l2_m2m_next_dst_buf(instance->ctx->m2m_ctx); - if (!dst) + dst_buf_info =3D container_of(fb, struct mtk_video_dec_buf, frame_buffer); + if (!dst_buf_info) return -EINVAL; =20 - v4l2_m2m_buf_copy_metadata(src, dst, true); + v4l2_m2m_buf_copy_metadata(&src_buf_info->m2m_buf.vb, &dst_buf_info->m2m_= buf.vb, true); =20 return 0; } @@ -1800,7 +1805,7 @@ static int vdec_vp9_slice_setup_single(struct vdec_vp= 9_slice_instance *instance, struct vdec_vp9_slice_vsi *vsi =3D &pfc->vsi; int ret; =20 - ret =3D vdec_vp9_slice_setup_single_from_src_to_dst(instance); + ret =3D vdec_vp9_slice_setup_single_from_src_to_dst(instance, bs, fb); if (ret) goto err; =20 --=20 2.45.2 From nobody Thu Oct 2 15:35:39 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 From nobody Thu Oct 2 15:35:39 2025 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 9AF252F83D2; Mon, 15 Sep 2025 09:20:23 +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=1757928026; cv=none; b=Pl8+h4DASkN31uIEbS4126ro7cTpwFVcVal0PVGnA/YZVhmq2JD6zcueG2Z5YTNtF2V0+l59U6GH2sTAfMx6AmlhNfr93qGUqKr522yRA7pZyLheLLWQYhlSVyeQj8e5HdWqGFcGxoxj0Yryv5mjzae37hhBJBcJF9gYdaq8Xk8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757928026; c=relaxed/simple; bh=4RuTLJ4kN29vOOAhud/05D8flqO1wart3rcavTtHi3o=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=sCNDCp8a+VZQUXmvafuLuLjNXcGCg1hkIf7fyJUEWde3k9na0wc2MLaUg8OFaDT/ojD6grmG90goDbZ2RGKgfQF3q1NS8RA4kmU3cdwxcyZCHDhtxeX7QvDX+WlMWU+jyh6ta2icj7aarvU/kOR+U8sJ5USu6SNlw31FwD/4xZ0= 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=pK4eszfy; 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="pK4eszfy" X-UUID: 31baeff8921511f0bd5779446731db89-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=zyqlLL4Vw80sOJJabkxhdoZsgUoyRPEHyY3K1K7eKf0=; b=pK4eszfy7vWPfATfbjT2epnUWCJbx0k3InTLMzPDbmjmv48yFVxoT8U5q7z8BHfnfbD+geeRuN8OR3xRgDceB3dAij1OMlOtyxtWO+IxeVOAHKEcVCLmTKCOpF4K05+tvtKkQ8+IcKcMXs/n9OrTl1Z+yFOtYl+yqjH8Pti/eDE=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.3.4,REQID:2641d8c8-46ab-4ea7-b0e2-27131a2da05b,IP:0,UR L:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION:r elease,TS:0 X-CID-META: VersionHash:1ca6b93,CLOUDID:4de1cc84-5317-4626-9d82-238d715c253f,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: 31baeff8921511f0bd5779446731db89-20250915 Received: from mtkmbs11n1.mediatek.inc [(172.21.101.185)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1113253732; Mon, 15 Sep 2025 17:20:17 +0800 Received: from mtkmbs13n2.mediatek.inc (172.21.101.108) by mtkmbs10n2.mediatek.inc (172.21.101.183) 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:16 +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:14 +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 6/8] media: mediatek: vcodec: fix media device node number Date: Mon, 15 Sep 2025 17:19:56 +0800 Message-ID: <20250915091958.31509-7-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" change media register device node number to a correct value Fixes: 41f03c673cb7b ("media: mediatek: vcodec: replace pr_* with dev_* for= v4l2 debug message") Signed-off-by: Kyrie Wu --- .../platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_= drv.c b/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.c index e7b6b108f4fb..bc0a66c26cda 100644 --- a/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.c +++ b/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.c @@ -517,7 +517,8 @@ static int mtk_vcodec_probe(struct platform_device *pde= v) goto err_media_reg; } =20 - dev_dbg(&pdev->dev, "media registered as /dev/media%d", vfd_dec->minor); + dev_dbg(&pdev->dev, "media registered as /dev/media%d", + dev->mdev_dec.devnode->minor); } =20 mtk_vcodec_dbgfs_init(dev, false); --=20 2.45.2 From nobody Thu Oct 2 15:35:39 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 7F2452F83C1; Mon, 15 Sep 2025 09:20:23 +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=1757928026; cv=none; b=Phy7ZU3CDqykxV4Jwvpk+gMWYQWPO8ln20NUwJsw2JTDExEaQPoFCaIIiSvD/vmV2VnQ1ANy6xIIbyb4c7sQ6uQu+jEuvkm/xgE+wYpBG79QeF0X3YMyiyW9WoaZRLwwRad+m9InmEMqBhYnq5Jx9EMU0JVnWE2mHTsnrckKscg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757928026; c=relaxed/simple; bh=ZAnlMrAvv23wX9O3BS28Qe2guZ8fJu2jzAqJdj5dTAw=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=VA84eRawXq7pCnBRUOFDBYrtImrbukH0pyPiUnqcPkBN8J9cYbtfo1oLA2pPdzvSDo5Amuqk9W3k3iuFUdCTrG0iMn/mck2jB3VbFdw5eQOc8CHI5F/Nmst5sKhMYg8P63LsvKcsB4Tw56ABLAdRArr+OTrEmPIMtC5RodmPiH4= 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=XckoJo46; 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="XckoJo46" X-UUID: 32a5a2c8921511f0b33aeb1e7f16c2b6-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=Rpqkf/DJ4LdwRIXe2uL48uYyREEtMq490icErlgfZN0=; b=XckoJo46jC4l1eDMD3B+snJXwZlx3c5tcC6rGEKqCxjGkIjCS405FGlv38OsPiaYBxv7qlCwC3cIEEo8lPORlY3MNBT3J+/auBaNYbk9TEAvSVA3fe+AWndeOlpeL7I6EzKyn3zO4qo7V/ffRKxnKh2cGcbZu6rJy211lKpg6ds=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.3.4,REQID:42f0ecb0-44ae-485a-a23c-50f75a9f75ee,IP:0,UR L:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION:r elease,TS:0 X-CID-META: VersionHash:1ca6b93,CLOUDID:6ae1cc84-5317-4626-9d82-238d715c253f,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: 32a5a2c8921511f0b33aeb1e7f16c2b6-20250915 Received: from mtkmbs13n2.mediatek.inc [(172.21.101.108)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 789407499; Mon, 15 Sep 2025 17:20:19 +0800 Received: from mtkmbs13n2.mediatek.inc (172.21.101.108) by mtkmbs11n2.mediatek.inc (172.21.101.187) 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:17 +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:15 +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 , Krzysztof Kozlowski Subject: [PATCH v3 7/8] dt-bindings: media: Add MT8189 mediatek,vcodec-encoder Date: Mon, 15 Sep 2025 17:19:57 +0800 Message-ID: <20250915091958.31509-8-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" Add MT8189 encoder compatible string to distinguish former ICs MTK's. Compared with MT8196, the maximum resolution of MT8189 encoder is only 4K, and the fps is only 30, which cannot reach the highest parameter of MT8196: level6.2, 8K@60fps. Compared with MT8188, the level can only support 5.1, which is less than 5.2 of MT8188. But the maximum bitrate is 100Mbps, which is twice that of MT8188. And MT8189 could support NBM mode. Signed-off-by: Kyrie Wu Acked-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno --- .../devicetree/bindings/media/mediatek,vcodec-encoder.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/media/mediatek,vcodec-encode= r.yaml b/Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.ya= ml index bb4dbf23ccc5..7f355470b63c 100644 --- a/Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml +++ b/Documentation/devicetree/bindings/media/mediatek,vcodec-encoder.yaml @@ -22,6 +22,7 @@ properties: - mediatek,mt8173-vcodec-enc - mediatek,mt8183-vcodec-enc - mediatek,mt8188-vcodec-enc + - mediatek,mt8189-vcodec-enc - mediatek,mt8192-vcodec-enc - mediatek,mt8195-vcodec-enc - mediatek,mt8196-vcodec-enc @@ -100,6 +101,7 @@ allOf: enum: - mediatek,mt8183-vcodec-enc - mediatek,mt8188-vcodec-enc + - mediatek,mt8189-vcodec-enc - mediatek,mt8192-vcodec-enc - mediatek,mt8195-vcodec-enc =20 --=20 2.45.2 From nobody Thu Oct 2 15:35:39 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 E59BE2F9C47; Mon, 15 Sep 2025 09:20:26 +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=1757928029; cv=none; b=a6QwUe8SpaRtzUOXJtGfnEqfl99dOyOn0qc+CzKpp+Yy+D2S2F6Tkd4Me9V7AHWkoq2X3a6tHBhmic6tB2IRmUaY9E5Fm6w1UVqGZQgiSY+b2pnPYW0hBUFNFAlAEG8gfino33ADVb22sT5ArZcdMQPs0X2KBRB0NrWACKB51pg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757928029; c=relaxed/simple; bh=BBV11Ho0tc+Utu8uS2EfLylS/m9H64nWp9VfpPNknAk=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Lmz6UUZaWQ0+UUlbabk3S9euAGYxd94/aooLUTgc/Fu/giSy8P9yQNjKjVUYEGlSgQvJ1s7XZuQcOT7vs3l8aqsbXcwFp4CIrkuBiv40/nTp/xcy5wZCktiOAlM/mS7BXfj9T0H109VJSmOzrcb3OlImS4xGe3LbxYB6H+VRJMQ= 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=u6mHfz4C; 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="u6mHfz4C" X-UUID: 3384eeec921511f0b33aeb1e7f16c2b6-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=LaNNoYa5Du7iCqkc2oPxcr71/D7vogeLUkEIi2fqLmY=; b=u6mHfz4Cf7JJtwYtnM5JBa21swJExdqPeFVwOrmnNt3C9bu5IgZLki5zJuEZbcuWHbdlwARlUSR6V/K/rKSe0EN4fcAFvxgnsSYsI2EUjQEuZ/yRx5c0vdpQrrCgg7Qk2+VLigEedtZNXYdK+x7s3635X3PRFpSQzzyDgNJSug4=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.3.4,REQID:0465c470-592b-4ce0-9052-50cef22c08c9,IP:0,UR L:0,TC:0,Content:-5,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:-5 X-CID-META: VersionHash:1ca6b93,CLOUDID:9ce1cc84-5317-4626-9d82-238d715c253f,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: 3384eeec921511f0b33aeb1e7f16c2b6-20250915 Received: from mtkmbs11n1.mediatek.inc [(172.21.101.185)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1321633581; Mon, 15 Sep 2025 17:20:20 +0800 Received: from mtkmbs13n2.mediatek.inc (172.21.101.108) by mtkmbs13n1.mediatek.inc (172.21.101.193) 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:18 +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:17 +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 8/8] media: mediatek: encoder: Add MT8189 encoder compatible data Date: Mon, 15 Sep 2025 17:19:58 +0800 Message-ID: <20250915091958.31509-9-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" add compatible data to support MT8189 encoding. Signed-off-by: Kyrie Wu Reviewed-by: AngeloGioacchino Del Regno --- .../mediatek/vcodec/encoder/mtk_vcodec_enc_drv.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc_= drv.c b/drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc_drv.c index c869c4245ebc..4f5c2d8d2855 100644 --- a/drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc_drv.c +++ b/drivers/media/platform/mediatek/vcodec/encoder/mtk_vcodec_enc_drv.c @@ -468,6 +468,19 @@ static const struct mtk_vcodec_enc_pdata mt8196_pdata = =3D { .set_dma_bit_mask =3D true, }; =20 +static const struct mtk_vcodec_enc_pdata mt8189_pdata =3D { + .venc_model_num =3D 8189, + .capture_formats =3D mtk_video_formats_capture_h264, + .num_capture_formats =3D ARRAY_SIZE(mtk_video_formats_capture_h264), + .output_formats =3D mtk_video_formats_output, + .num_output_formats =3D ARRAY_SIZE(mtk_video_formats_output), + .min_bitrate =3D 64, + .max_bitrate =3D 100000000, + .core_id =3D VENC_SYS, + .uses_common_fw_iface =3D true, + .set_dma_bit_mask =3D true, +}; + static const struct of_device_id mtk_vcodec_enc_match[] =3D { {.compatible =3D "mediatek,mt8173-vcodec-enc", .data =3D &mt8173_avc_pdata}, @@ -478,6 +491,7 @@ static const struct of_device_id mtk_vcodec_enc_match[]= =3D { {.compatible =3D "mediatek,mt8192-vcodec-enc", .data =3D &mt8192_pdata}, {.compatible =3D "mediatek,mt8195-vcodec-enc", .data =3D &mt8195_pdata}, {.compatible =3D "mediatek,mt8196-vcodec-enc", .data =3D &mt8196_pdata}, + {.compatible =3D "mediatek,mt8189-vcodec-enc", .data =3D &mt8189_pdata}, {}, }; MODULE_DEVICE_TABLE(of, mtk_vcodec_enc_match); --=20 2.45.2