From patchwork Wed Jul 27 02:37:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yunfei Dong X-Patchwork-Id: 593943 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 52A24C19F2B for ; Wed, 27 Jul 2022 02:37:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240193AbiG0Chf (ORCPT ); Tue, 26 Jul 2022 22:37:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240158AbiG0Chd (ORCPT ); Tue, 26 Jul 2022 22:37:33 -0400 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4050111460; Tue, 26 Jul 2022 19:37:32 -0700 (PDT) X-UUID: eed7daed4f9e4dc1b4afeb3f790439a7-20220727 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.8, REQID:4fd3cb69-e14e-4d34-898a-35a391d29f10, OB:0, LO B:0,IP:0,URL:0,TC:0,Content:-5,EDM:0,RT:0,SF:95,FILE:0,RULE:Release_Ham,AC TION:release,TS:90 X-CID-INFO: VERSION:1.1.8, REQID:4fd3cb69-e14e-4d34-898a-35a391d29f10, OB:0, LOB: 0,IP:0,URL:0,TC:0,Content:-5,EDM:0,RT:0,SF:95,FILE:0,RULE:Spam_GS981B3D,AC TION:quarantine,TS:90 X-CID-META: VersionHash:0f94e32, CLOUDID:02f009d4-912a-458b-a623-74f605a77e93, C OID:fb381db0fa02,Recheck:0,SF:28|17|19|48,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,QS:nil,BEC:nil,COL:0 X-UUID: eed7daed4f9e4dc1b4afeb3f790439a7-20220727 Received: from mtkcas11.mediatek.inc [(172.21.101.40)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1983226994; Wed, 27 Jul 2022 10:37:26 +0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.15; Wed, 27 Jul 2022 10:37:24 +0800 Received: from localhost.localdomain (10.17.3.154) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 27 Jul 2022 10:37:23 +0800 From: Yunfei Dong To: Yunfei Dong , Chen-Yu Tsai , Nicolas Dufresne , Hans Verkuil , AngeloGioacchino Del Regno , Benjamin Gaignard , Tiffany Lin , Andrew-CT Chen CC: Mauro Carvalho Chehab , Rob Herring , Matthias Brugger , George Sun , Xiaoyong Lu , "Hsin-Yi Wang" , Fritz Koenig , "Daniel Vetter" , Irui Wang , Steve Cho , , , , , , Subject: [PATCH v2, 2/3] media: mediatek: vcodec: add decoder compatible to support mt8188 Date: Wed, 27 Jul 2022 10:37:20 +0800 Message-ID: <20220727023721.31945-2-yunfei.dong@mediatek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220727023721.31945-1-yunfei.dong@mediatek.com> References: <20220727023721.31945-1-yunfei.dong@mediatek.com> MIME-Version: 1.0 X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 1: add mt8188's compatible name: mediatek,mt8188-vcodec-dec. 2: mt8188 is lat single core architecture, using mtk_lat_sig_core_pdata to initialize private data. 3: Getting mt8188's chip name according to decoder compatible name. Signed-off-by: Yunfei Dong Reviewed-by: AngeloGioacchino Del Regno --- compared with v1: merge patch 2/4 and 3/4 into one. --- drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c | 2 ++ drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c index 7d194a476713..641f533c417f 100644 --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec.c @@ -227,6 +227,8 @@ static int mtk_vcodec_dec_get_chip_name(void *priv) return 8195; else if (of_device_is_compatible(dev->of_node, "mediatek,mt8186-vcodec-dec")) return 8186; + else if (of_device_is_compatible(dev->of_node, "mediatek,mt8188-vcodec-dec")) + return 8188; else return 8173; } diff --git a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.c b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.c index e0b6ae9d6caa..174a6eec2f54 100644 --- a/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.c +++ b/drivers/media/platform/mediatek/vcodec/mtk_vcodec_dec_drv.c @@ -478,6 +478,10 @@ static const struct of_device_id mtk_vcodec_match[] = { .compatible = "mediatek,mt8195-vcodec-dec", .data = &mtk_lat_sig_core_pdata, }, + { + .compatible = "mediatek,mt8188-vcodec-dec", + .data = &mtk_lat_sig_core_pdata, + }, {}, };