From patchwork Fri Sep 22 07:41:32 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: 14402 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:172:b0:3f2:4152:657d with SMTP id h50csp5822601vqi; Fri, 22 Sep 2023 12:36:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGYsu16AK4XCG9uAINT/y6k4YH0yUEvYzC3GsiygKBlFc7x0x2szGEtny4IRC2nIkquuS9L X-Received: by 2002:a17:902:f7c2:b0:1c5:d91e:3a1 with SMTP id h2-20020a170902f7c200b001c5d91e03a1mr340210plw.28.1695411379571; Fri, 22 Sep 2023 12:36:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695411379; cv=none; d=google.com; s=arc-20160816; b=GYwA0QyHvvVeYmkyz4I8XujpkufRRKI5j0hX5+Dlc/p+2rFroI3Dv7xk3i3R8xrZ3d Y406h5wbQ3rekPUZcuMLazvrqQ89SXWwfpKsz7QKGWVc88E9qvxCJ9EXszwVsuBpN00G 9aPj2YC0Q4u9HBsOTS2Al+QTLL1ISpfcFKMFI+bRodegv/DGX6cv4PQPfxipC98mgoW3 4tI6J6FASulAHonjr5L7AOs6uEnYJNsg1FZmd6tGxy5CmcofRAw3AdeOz1dCkgMOZ+eN szAq+dDjwxuKG+KxcK/q+QlYIiLZ0urKhEDMA5XX4BqaQ2lTOO9mvwmS0zefs+RqrxvL 5vVA== 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=HGCnvwcd8cVtCc2Ygte0CSRexon0TASbfmdWfu3Bytc=; fh=+ZOB8U3AHf/a95SI+lDVAxTPwrdiNQnJ1PQGQReMfso=; b=c1oBvJcxSjBzNy8wI2Y7iwOhch9QBnt6fhze8IUGlU3ccQ9QkSBGODjZFqA7/s/8k/ fEQz5EbTy3xyYu5RLtrqwThxDRXmbEDL8+4Ev6v4/htaTcukBbgz6pW+HXPW65HKbTK6 /+Z78jjtLia4rnRAUI+AHP7PIKt4OJSd/VV+UIOGV8qbKP8XNe6+YV1/yy6KXQ7kL9h9 LUJdjYwBCOV2NO3pFQORZOkkfymC/vO0CoeTbLcE/82FZSQ1UuapagvpnyzHQmcRM0SA GRGoMlepFb+XysEA+uAQNNJRnydb8pLGEszp0CQeaR3uDnZ+FazIpMs2bXXbgzU3yiLC jTBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=DhISx0GC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id d12-20020a170902654c00b001bf88e777f9si4136429pln.33.2023.09.22.12.36.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 12:36:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=DhISx0GC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id DEBA4801C1B7; Fri, 22 Sep 2023 00:41:58 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231370AbjIVHl7 (ORCPT + 30 others); Fri, 22 Sep 2023 03:41:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229534AbjIVHl5 (ORCPT ); Fri, 22 Sep 2023 03:41:57 -0400 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F976CA; Fri, 22 Sep 2023 00:41:50 -0700 (PDT) X-UUID: 7bfb6668591b11ee8051498923ad61e6-20230922 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=HGCnvwcd8cVtCc2Ygte0CSRexon0TASbfmdWfu3Bytc=; b=DhISx0GCIsJ0WZIHoXGN9ZE+oVN+JcZdauwVP4tcnVAGiZO0aNP0L33c7hcn8uW3qwyFjIHgHQCri3g/IxST5IUvMIWoe5lGOfJj57y/65+ZZzeey0ApdC1bRMJJ46EeBv6CWMrWUSHkZ5DYmm6MqSPDAR4yO91tpFYvXh8t3TM=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.32,REQID:27dd69c0-6e9f-4e4e-b022-f74c7dd5b9a5,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:5f78ec9,CLOUDID:e1c700f0-9a6e-4c39-b73e-f2bc08ca3dc5,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,LES:1,SPR:NO, DKR:0,DKP:0,BRR:0,BRE:0 X-CID-BVR: 0,NGT X-CID-BAS: 0,NGT,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR,TF_CID_SPAM_ULS X-UUID: 7bfb6668591b11ee8051498923ad61e6-20230922 Received: from mtkmbs14n2.mediatek.inc [(172.21.101.76)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1732564576; Fri, 22 Sep 2023 15:41:47 +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.1118.26; Fri, 22 Sep 2023 15:41:46 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs13n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Fri, 22 Sep 2023 15:41:46 +0800 From: Moudy Ho To: Mauro Carvalho Chehab , Matthias Brugger , AngeloGioacchino Del Regno , Ping-Hsun Wu , daoyuan huang , Hans Verkuil CC: , , , , Moudy Ho Subject: [PATCH v6 00/13] add support MDP3 on MT8195 platform Date: Fri, 22 Sep 2023 15:41:32 +0800 Message-ID: <20230922074145.11977-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=-1.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED,RDNS_NONE, SPF_HELO_PASS,SPF_PASS,UNPARSEABLE_RELAY,URIBL_BLOCKED autolearn=no 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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Fri, 22 Sep 2023 00:41:58 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1777767682463992544 X-GMAIL-MSGID: 1777767682463992544 Changes since v5: - Rebase on v6.6-rc2. - Dependent dtsi files: https://patchwork.kernel.org/project/linux-mediatek/list/?series=786511 - Dependent bindings: https://patchwork.kernel.org/project/linux-mediatek/list/?series=786520 - Integrate MMSY/MUTEX structure in "mdp_probe". - Fix the build warnings that were detected by the linux-media build scripts tool. Changes since v4: - Rebase on v6.6-rc1 - Remove any unnecessary DTS settings. - Adjust the usage of MOD and clock in blending components. 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 (13): 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 support for blending multiple components 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 media: platform: mtk-mdp3: fix uninitialized variable in mdp_path_config() .../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 | 442 +++++++-- .../platform/mediatek/mdp3/mtk-mdp3-cmdq.h | 1 + .../platform/mediatek/mdp3/mtk-mdp3-comp.c | 895 +++++++++++++++++- .../platform/mediatek/mdp3/mtk-mdp3-comp.h | 93 +- .../platform/mediatek/mdp3/mtk-mdp3-core.c | 139 ++- .../platform/mediatek/mdp3/mtk-mdp3-core.h | 50 +- .../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 +- 25 files changed, 2745 insertions(+), 179 deletions(-) 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