From patchwork Wed Feb 8 09:21:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?TW91ZHkgSG8gKOS9leWul+WOnyk=?= X-Patchwork-Id: 5115 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3352543wrn; Wed, 8 Feb 2023 01:25:23 -0800 (PST) X-Google-Smtp-Source: AK7set8OIXmlTR/BZmc6X1o3RYfVUi4xdyeGpARL0OzlWLvUJ09a992bnu8qy2fLp8if4sR/2gVs X-Received: by 2002:a05:6a21:6716:b0:bc:97d7:3cbb with SMTP id wh22-20020a056a21671600b000bc97d73cbbmr5136859pzb.15.1675848323333; Wed, 08 Feb 2023 01:25:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675848323; cv=none; d=google.com; s=arc-20160816; b=Nlh4ptQ0uA+CkuR4Y4m8oyJbvSEMsf0s894gNb22Z5J7mBhEcpxE5fRl8hScqIrfoh h2KjQHaGJOidpO7bqfi+nUa4u7/cLfDufViwJrklKJ2VB2+r6YwSte66cOVKz/FUIz7B 0YOz6DDUeodzCoxhG+iSv/QrpqwsISWIaxDLXX9SFssqHYTbVcF7Md3IrA5l+RjwuYlE w3cAKKxFkz8qeMu7LB96Qh9JjLjYtZ2/zGPtouvXMUlhDLfwgWVHTDpC3g+RlTJ4L3TD DXMLCkisK+bfnC4wnKNEfvloxCD8vZyWFBM+wuKLtRgthd0kn4WAZbL5V6RWk8oSJO4w gwJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=FYqXzbvZnEJ7V9EG4NvhVW6FTKkDUIDBVcNLiTOQlqc=; b=IHkjpRifFb87omkXIbU6NPt8VKtqHeKvKZy9sXvo+o7WZnsLiC/TK/hP2m+cpPrY03 0rxWhC68gnjsMuzMFPXLn2BM3VzXm9SYD+ShGz7vNgzM3Xua7CCyQjIy58SStHHDIZ9U cBBW2sKGefKDpUaUaWVd5cXQiG8tUYqaRAHxb049kh2Mh5b2oo4C60dc7p3UBDJdoznZ OefkeU3er4PmSXRdbS/F4BBwQ7GS0hKY+dvrAIJDz6a5Fpq+2Hp/fiOgU4IPqpG5St8P 3omBKXzllu8+ynkuNkMW85BE1IxtazGfECBwUkNiKNPG5p4SM+w4s+aC8PpwQYmRzZ4C HC9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=duN6O+Qo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k191-20020a6384c8000000b004fb358f497esi1050834pgd.436.2023.02.08.01.25.10; Wed, 08 Feb 2023 01:25:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=duN6O+Qo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231429AbjBHJYc (ORCPT + 99 others); Wed, 8 Feb 2023 04:24:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231133AbjBHJX6 (ORCPT ); Wed, 8 Feb 2023 04:23:58 -0500 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 306584617B; Wed, 8 Feb 2023 01:22:16 -0800 (PST) X-UUID: 10e767f4a79211ed945fc101203acc17-20230208 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=FYqXzbvZnEJ7V9EG4NvhVW6FTKkDUIDBVcNLiTOQlqc=; b=duN6O+QozSICLC1O6Tyd+50Dx5Ttn0G2pq0gQRmjWkqQ5wIlq56MLzsEq/D+syP4hbHdrFxqiQflQWo/0w4UrAcgH1wxwMtOA6ex0eYTHY1a4cq/GvzMAXIbY+lS/bF66G6hzYprezRpl3N5HxMch36zbldcF4TEOj5Yu7U0oXc=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.19,REQID:83fed0ea-ddaa-45d7-b5e6-e709888f37e6,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:885ddb2,CLOUDID:3d85458e-8530-4eff-9f77-222cf6e2895b,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:1,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0 X-CID-BVR: 0,NGT X-UUID: 10e767f4a79211ed945fc101203acc17-20230208 Received: from mtkmbs10n2.mediatek.inc [(172.21.101.183)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1291526433; Wed, 08 Feb 2023 17:22:10 +0800 Received: from mtkmbs11n1.mediatek.inc (172.21.101.185) 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.792.3; Wed, 8 Feb 2023 17:22:10 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Wed, 8 Feb 2023 17:22:10 +0800 From: Moudy Ho To: Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Matthias Brugger CC: , , , , , , Moudy Ho Subject: [PATCH v4 00/16] add support MDP3 on MT8195 platform Date: Wed, 8 Feb 2023 17:21:53 +0800 Message-ID: <20230208092209.19472-1-moudy.ho@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 X-MTK: N X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757254331384641780?= X-GMAIL-MSGID: =?utf-8?q?1757254331384641780?= Changes since v3: - Depend on : [1] https://patchwork.kernel.org/project/linux-media/list/?series=719841 - Suggested by Krzysztof, integrating all newly added bindings for the mt8195 MDP3 into the file "mediatek,mt8195-mdp3.yaml". - Revise MDP3 nodes with generic names. Changes since v2: - Depend on : [1] MMSYS/MUTEX: https://patchwork.kernel.org/project/linux-mediatek/list/?series=711592 [2] MDP3: https://patchwork.kernel.org/project/linux-mediatek/list/?series=711618 - Suggested by Rob to revise MDP3 bindings to pass dtbs check - Add parallel paths feature. - Add blended components settings. Changes since v1: - Depend on : [1] MDP3 : https://patchwork.kernel.org/project/linux-mediatek/list/?series=698872 [2] MMSYS/MUTEX: https://patchwork.kernel.org/project/linux-mediatek/list/?series=684959 - Fix compilation failure due to use of undeclared identifier in file "mtk-mdp3-cmdq.c" Hello, This patch is used to add support for MDP3 on the MT8195 platform that contains more picture quality components, and can arrange more pipelines through two sets of MMSYS and MUTEX respectively. Moudy Ho (16): dt-binding: mediatek: correct MDP3 node with generic names arm64: dts: mediatek: mt8183: correct MDP3 DMA-related nodes dt-binding: mediatek: add MediaTek mt8195 MDP3 components arm64: dts: mediatek: mt8195: add MDP3 nodes media: platform: mtk-mdp3: add support second sets of MMSYS media: platform: mtk-mdp3: add support second sets of MUTEX media: platform: mtk-mdp3: introduce more pipelines from MT8195 media: platform: mtk-mdp3: introduce more MDP3 components media: platform: mtk-mdp3: add checks for dummy components media: platform: mtk-mdp3: avoid multiple driver registrations media: platform: mtk-mdp3: extend GCE event waiting in RDMA and WROT media: platform: mtk-mdp3: add the blend of component in MUTEX MOD media: platform: mtk-mdp3: add mt8195 platform configuration media: platform: mtk-mdp3: add mt8195 shared memory configurations media: platform: mtk-mdp3: add mt8195 MDP3 component settings media: platform: mtk-mdp3: add support for parallel pipe to improve FPS .../bindings/media/mediatek,mdp3-rdma.yaml | 59 +- .../bindings/media/mediatek,mdp3-rsz.yaml | 5 +- .../bindings/media/mediatek,mdp3-wrot.yaml | 23 +- .../bindings/media/mediatek,mt8195-mdp3.yaml | 174 ++++ arch/arm64/boot/dts/mediatek/mt8183.dtsi | 6 +- arch/arm64/boot/dts/mediatek/mt8195.dtsi | 426 +++++++++ .../platform/mediatek/mdp3/mdp_cfg_data.c | 729 ++++++++++++++- .../platform/mediatek/mdp3/mdp_reg_aal.h | 25 + .../platform/mediatek/mdp3/mdp_reg_color.h | 31 + .../media/platform/mediatek/mdp3/mdp_reg_fg.h | 23 + .../platform/mediatek/mdp3/mdp_reg_hdr.h | 31 + .../platform/mediatek/mdp3/mdp_reg_merge.h | 25 + .../platform/mediatek/mdp3/mdp_reg_ovl.h | 25 + .../platform/mediatek/mdp3/mdp_reg_pad.h | 21 + .../platform/mediatek/mdp3/mdp_reg_rdma.h | 24 + .../platform/mediatek/mdp3/mdp_reg_rsz.h | 2 + .../platform/mediatek/mdp3/mdp_reg_tdshp.h | 34 + .../platform/mediatek/mdp3/mdp_reg_wrot.h | 8 + .../platform/mediatek/mdp3/mdp_sm_mt8195.h | 283 ++++++ .../platform/mediatek/mdp3/mtk-img-ipi.h | 4 + .../platform/mediatek/mdp3/mtk-mdp3-cfg.h | 2 + .../platform/mediatek/mdp3/mtk-mdp3-cmdq.c | 445 ++++++++-- .../platform/mediatek/mdp3/mtk-mdp3-cmdq.h | 1 + .../platform/mediatek/mdp3/mtk-mdp3-comp.c | 840 +++++++++++++++++- .../platform/mediatek/mdp3/mtk-mdp3-comp.h | 92 +- .../platform/mediatek/mdp3/mtk-mdp3-core.c | 98 +- .../platform/mediatek/mdp3/mtk-mdp3-core.h | 33 +- .../platform/mediatek/mdp3/mtk-mdp3-m2m.c | 15 + .../platform/mediatek/mdp3/mtk-mdp3-regs.c | 18 + .../platform/mediatek/mdp3/mtk-mdp3-regs.h | 1 + .../platform/mediatek/mdp3/mtk-mdp3-vpu.c | 3 +- 31 files changed, 3301 insertions(+), 205 deletions(-) create mode 100644 Documentation/devicetree/bindings/media/mediatek,mt8195-mdp3.yaml create mode 100644 drivers/media/platform/mediatek/mdp3/mdp_reg_aal.h create mode 100644 drivers/media/platform/mediatek/mdp3/mdp_reg_color.h create mode 100644 drivers/media/platform/mediatek/mdp3/mdp_reg_fg.h create mode 100644 drivers/media/platform/mediatek/mdp3/mdp_reg_hdr.h create mode 100644 drivers/media/platform/mediatek/mdp3/mdp_reg_merge.h create mode 100644 drivers/media/platform/mediatek/mdp3/mdp_reg_ovl.h create mode 100644 drivers/media/platform/mediatek/mdp3/mdp_reg_pad.h create mode 100644 drivers/media/platform/mediatek/mdp3/mdp_reg_tdshp.h create mode 100644 drivers/media/platform/mediatek/mdp3/mdp_sm_mt8195.h