From patchwork Thu May 26 10:21:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jason-JH.Lin" X-Patchwork-Id: 12862186 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1AE42C433F5 for ; Thu, 26 May 2022 10:31:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=2DSaQGxyeQij4Zvhdl33Szy3EPdAwB6b7BemnjRoBpQ=; b=NLAhm8o8yjuW6H Q1h6532ShQHmFv0H2wgWWnxeWniIl2am/LGLUgUVbp/negf17h7Vtpp4MYlk9fUO+KN8DYrxoyQsh pWpaEC3pXFYZpzgsUQWE6w0F/s+RmKmK1nLtkiuRQNaVeBTpq/Glnu8TvW5aRFSIS6RqWtY3HScSY oOMctQcPAi5IAjQkdTGOa23VuiPk8hoHmb+zbnq4X3+mPvCruXN3HfhzBVe4Pn6XJ2QN1Kw6vAJdR eaAJ/hyfHXsH5KZd+0P/OTWrJo0/7wxDwminVdPU5PqE8ATMECTxS6Gc2r95yfVMgks0n/BBAoB1z L78nxe8jBUxldPsFzZrA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nuAmI-00EPVA-ES; Thu, 26 May 2022 10:31:38 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nuAmF-00EPTi-IA; Thu, 26 May 2022 10:31:37 +0000 X-UUID: dda8f72b71ef48e3816d426381028f07-20220526 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.5,REQID:1315683a-65b5-4439-9985-4f3293125d88,OB:0,LO B:0,IP:0,URL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,RULE:Release_Ham,ACTI ON:release,TS:0 X-CID-META: VersionHash:2a19b09,CLOUDID:b0f39447-4fb1-496b-8f1d-39e733fed1ea,C OID:IGNORED,Recheck:0,SF:nil,TC:nil,Content:0,EDM:-3,IP:nil,URL:1,File:nil ,QS:0,BEC:nil X-UUID: dda8f72b71ef48e3816d426381028f07-20220526 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1403674500; Thu, 26 May 2022 03:31:30 -0700 Received: from mtkmbs10n2.mediatek.inc (172.21.101.183) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 26 May 2022 03:21:28 -0700 Received: from mtkmbs11n1.mediatek.inc (172.21.101.186) 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; Thu, 26 May 2022 18:21:27 +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.3 via Frontend Transport; Thu, 26 May 2022 18:21:27 +0800 From: Jason-JH.Lin To: Matthias Brugger , Chun-Kuang Hu , AngeloGioacchino Del Regno CC: CK Hu , Rex-BC Chen , "Nancy Lin" , Singo Chang , , , , , , , Jason-JH.Lin Subject: [PATCH v22 0/5] Add Mediatek Soc DRM (vdosys0) support for mt8195 Date: Thu, 26 May 2022 18:21:21 +0800 Message-ID: <20220526102126.19756-1-jason-jh.lin@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220526_033135_632886_90DCC5BC X-CRM114-Status: GOOD ( 21.32 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Chnage in v22: - fix build fail in mtk_drm_drv.c:190 Change in v21: - rebase on next-20220525 Change in v20: - split binding patch to another series 'MediaTek MT8195 display binding': https://patchwork.ozlabs.org/project/devicetree-bindings/list/?series=295669 - fix io_start type from u32 to resource_size_t - fix some commit message for DITHER enum Change in v19: - fix checking condition for the return vaule of platform resource - drm/mediatek fix build waning for [-Wunused-const-variable] Change in v18: - change get driver data by io_start and wrap mmsys driver data into mmsys match data structure to support identifying multi mmsys driver data with the same compatible name - change DDP_COMPONENT_DITHER to DDP_CONPONENT_DITHER0 Change in v17: - change compatible name from 2 vdosys to 1 mmsys - add get driver data by clk name function to get corresponding driver data for mt8195 vdosys0 - add all routing table setting for mt8195 vdosys0 - remove useless mutex define Change in v16: - rebase on linu-next tag: 'next-20220303' - rebase on series: 'Fix MediaTek display dt-bindings issues' Change in v15: - remove mt8195-mmsys.h comment for mux settings - define the mask macro to replace using value as mask to fix zero mask problem - add EOF setting comment for MUTEX sof register Change in v14: - rebase on mediatek-drm-next-5.17 - rebase on "Add mmsys and mutex support for MDP" series - rebase on "media: mediatek: support mdp3 on mt8183 platform" series Change in v13: - remove dts patch - rebase on kernel-5.16-rc1 - rebase on mediatek-drm-next Change in v12: - add clock-names property to merge yaml - using BIT(nr) macro to define the settings of mmsys routing table - fix clk_get and clk_prepare_enable error handling issue Change in v11: - rebase on kernel-5.15-rc1 - change mbox label to gce0 for dts node of vdosys0 - change ovl compatibale to mt8192 to set smi_id_en=true in driver data - move common module from display folder to common folder, such as AAL, COCLOR, CCORR and MUTEX Change in v10: - rebase on "drm/mediatek: add support for mediatek SOC MT8192" series - rebase on "soc: mediatek: mmsys: add mt8192 mmsys support" series - fix some typo and "mediatek" start with capital in every dt-bindings - move mutex yaml from dfisplay folder to soc folder - separate merge additional propoerties to an individual dt-bindings patch Change in v9: - separate power and gce properties of mmsys into another dt-binding patch - rebase on "Separate aal module" series - keep mtk_ddp_clk_enable/disable in the same place - change mtk_dsc_start config register to mtk_drm_ddp_write_mask - remove the 0 setting of merge fifo config function - add CCORR driver data for mt8195 Change in v8: - add DP_INTF0 mux into mmsys routing table - add DP_INTF0 mutex mod and enum into add/remove comp function - remove bypass DSC enum in mtk_ddp_comp_init Change in v7: - add dt=binding of mmsys and disp path into this series - separate th modidfication of alphabetic order, remove unused define and rename the define of register offset to individual patch - add comment for MERGE ultra and preultra setting Change in v6: - adjust alphabetic order for mediatek-drm - move the patch that add mt8195 support for mediatek-drm as the lastest patch - add MERGE define for const varriable Change in v5: - add power-domain property into vdosys0 and vdosys1 dts node. - add MT8195 prifix and remove unused VDO1 define in mt8195-mmsys.h Change in v4: - extract dt-binding patches to another patch series - squash DSC module into mtk_drm_ddp_comp.c - add coment and simplify MERGE config function Change in v3: - change mmsys and display dt-bindings document from txt to yaml - add MERGE additional description in display dt-bindings document - fix mboxes-cells number of vdosys0 node in dts - drop mutex eof convert define - remove pm_runtime apis in DSC and MERGE - change DSC and MERGE enum to alphabetic order Change in v2: - add DSC yaml file - add mt8195 drm driver porting parts in to one patch - remove useless define, variable, structure member and function - simplify DSC and MERGE file and switch threre order jason-jh.lin (5): drm/mediatek: add DSC support for mediatek-drm drm/mediatek: add MERGE support for mediatek-drm drm/mediatek: add mediatek-drm of vdosys0 support for mt8195 drm/mediatek: add suffix 0 to DDP_COMPONENT_DITHER for mt8195 vdosys0 soc: mediatek: remove DDP_DOMPONENT_DITHER from enum drivers/gpu/drm/mediatek/Makefile | 1 + drivers/gpu/drm/mediatek/mtk_disp_drv.h | 8 + drivers/gpu/drm/mediatek/mtk_disp_merge.c | 246 ++++++++++++++++++++ drivers/gpu/drm/mediatek/mtk_disp_rdma.c | 6 + drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 65 +++++- drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h | 2 + drivers/gpu/drm/mediatek/mtk_drm_drv.c | 162 +++++++++++-- drivers/gpu/drm/mediatek/mtk_drm_drv.h | 7 + include/linux/soc/mediatek/mtk-mmsys.h | 3 +- 9 files changed, 483 insertions(+), 17 deletions(-) create mode 100644 drivers/gpu/drm/mediatek/mtk_disp_merge.c