From patchwork Thu Dec 14 05:58:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?U2hhd24gU3VuZyAo5a6L5a2d6KyZKQ==?= X-Patchwork-Id: 18033 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:3b04:b0:fb:cd0c:d3e with SMTP id c4csp8342380dys; Wed, 13 Dec 2023 22:00:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IHqlpbxe3XZv5Xa+G07gnXE2mTLQDlD5lF9utUgVRBMjimGD/yOSrEVV+5+++CocFa4K2/F X-Received: by 2002:a05:6a21:789d:b0:18c:e9e:e17c with SMTP id bf29-20020a056a21789d00b0018c0e9ee17cmr11964804pzc.25.1702533632465; Wed, 13 Dec 2023 22:00:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702533632; cv=none; d=google.com; s=arc-20160816; b=FcZp+bul0+2zZZOzgXDVB7wpEHXG1ya6onCP997nNRPPtsowLaQ6Xv5AV6f6fUKdki gI2twpRH83XZzKzqornhg4uZ7J2hqU9iqUSwa4zVfA2/6VE/T63NrCs6mOlA0ud/uDT0 X3NxLnOxXrB+efDaBx9mgtRwMtFsB1EJaNL2N87IZyS7B2Lk23hX8Q6IZ5hwqdWr28+x Ymyrwby9Qh0JAUEvt+Dhb9gqIvQVO8TUI0zBpQjEaVdDfS2vW304AblG/R2agFhtHuu/ fwKPbRP3h1VPCGp3+sH6+MKhqwL5GIw7V/3AoJ8nPjkt+lrtJBksRaJ9TRN1tUIQiVJD d0oQ== 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=EnSvj2tYZP4NI1G6ATpw31JLDKJW7cSSRiBu7nXACMM=; fh=3sxgsd2Uw0IiS0u77AMxpPqPOsrCjkgXK0HsUFuBxjc=; b=Mx0a1I5NACeSOXtJl1aD2P+s5Wz1GTkMj9mdPw2/R7idbDoXRReIdNwxhPKikixYyk 3jpRLSvLL0NsS7YN+MolSa3UmHC3LHWjKndTPEEwN6jhIdvPz7vdRvIVIuG/6wYltrfD W1plCszlnpKW0KZ4Ex68+t2PmauGDIr5y5Q7yWErCQuUIj3ZLGzHe/ycM6+F6BqCb1v7 DtizFkGJ6BMXKMw+pCphrfJWACF8TOs0dsk6z78fxlZJdlMTCV6owElih/GBAf4YRFfF 81wFKhcDWr1+f67nVgJ2onfuUIXGWEIwFrr236OyfmA9KeHzpgZvCdvRRT62lnoL0i+n 2e9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=gxgxSkFV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id lr9-20020a17090b4b8900b0028afd69f444si1206382pjb.169.2023.12.13.22.00.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 22:00:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=gxgxSkFV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (Postfix) with ESMTP id CCDCF807364E; Wed, 13 Dec 2023 22:00:25 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235533AbjLNGAI (ORCPT + 99 others); Thu, 14 Dec 2023 01:00:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235410AbjLNF7q (ORCPT ); Thu, 14 Dec 2023 00:59:46 -0500 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 920D1188; Wed, 13 Dec 2023 21:58:55 -0800 (PST) X-UUID: d9b4b0aa9a4511eea5db2bebc7c28f94-20231214 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=EnSvj2tYZP4NI1G6ATpw31JLDKJW7cSSRiBu7nXACMM=; b=gxgxSkFViOAvE73nLU7jo14ni4wASj4BO5NDacSKDkqqLHSodEsyWPfcRuwgKGxg32CUUvhY/oDMUu4GOKkuHGIMHMHIz2I91UzomfUOktXTLVrFQbHItn+A3SRijhw/uJ2BwCeibuIGlh82wCek5u/KKH4wKWH8uFjk9YgNX2I=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.35,REQID:9ae5fcbd-17f7-4770-842b-baf99f42421f,IP:0,U RL:25,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:25 X-CID-META: VersionHash:5d391d7,CLOUDID:895fc673-1bd3-4f48-b671-ada88705968c,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:11|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 X-CID-BAS: 0,_,0,_ X-CID-FACTOR: TF_CID_SPAM_ULN,TF_CID_SPAM_SNR X-UUID: d9b4b0aa9a4511eea5db2bebc7c28f94-20231214 Received: from mtkmbs14n2.mediatek.inc [(172.21.101.76)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1709734976; Thu, 14 Dec 2023 13:58:49 +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; Thu, 14 Dec 2023 13:58:48 +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; Thu, 14 Dec 2023 13:58:47 +0800 From: Hsiao Chien Sung To: AngeloGioacchino Del Regno , CK Hu CC: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chun-Kuang Hu , Philipp Zabel , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Matthias Brugger , Moudy Ho , Hsiao Chien Sung , Nathan Lu , "Nancy . Lin" , "Roy-CW . Yeh" , "Jason-JH . Lin" , xinlei lee , , , , , Subject: [PATCH v12 00/23] Add display driver for MT8188 VDOSYS1 Date: Thu, 14 Dec 2023 13:58:24 +0800 Message-ID: <20231214055847.4936-1-shawn.sung@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 X-MTK: N X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email 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 (lipwig.vger.email [0.0.0.0]); Wed, 13 Dec 2023 22:00:26 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785235905863293520 X-GMAIL-MSGID: 1785235905863293520 This series is based on mediatek-drm-next branch of kernel/git/chunkuang.hu/linux.git Changes in v12: - Rebase on mediatek-drm-next branch of kernel/git/chunkuang.hu/linux.git Changes in v11: - Change "mtk-padding" to "mtk-disp-padding" for consistency - Remove patch "drm/mediatek: Remove ineffectual power management codes for backward compatibility Changes in v10: - Remove "Reviewed-by" tags from the following commits: - drm/mediatek: Power on/off devices with function pointers - drm/mediatek: Manage component's clock with function pointers - Separate the commit into smaller ones - (new) drm/mediatek: Remove ineffectual power management codes Changes in v9: - Add a static inline function to power off the device - Change driver name to "mediatek-disp-padding" - Fix typo and kernel doc format error Changes in v8: - Power on/off the components with .power_on() and .power_off() - Remove mtk_padding_config() - Remove "Reviewed-by" tags from "drm/mediatek: Add Padding to OVL adaptor" Changes in v7: - Start/Stop the components in OVL Adaptor with function pointers - Refine Padding driver - Fix underrun when the layer is switching off Changes in v6: - Separate the commits into smaller ones - Add DPI input mode setting - Fix VDOSYS1 power-on issues Changes in v5: - Reuse .clk_enable/.clk_disable in struct mtk_ddp_comp_funcs in mtk_disp_ovl_adaptor.c - Adjust commits order Changes in v4: - Add new functions in mtk_disp_ovl_adaptor.c to enable/disable components and reuse them when clock enable/disable - Rename components in mtk_disp_ovl_adaptor.c and sort them in alphabetical order Changes in v3: - Define macro MMSYS_RST_NR in mtk-mmsys.h and update reset table - Fix typos (ETDHR -> ETHDR, VSNYC -> VSYNC) - Rebase dt-bindings on linux-next - Refine description of Padding - Squash reset bit map commits for VDO0 and VDO1 into one Changes in v2: - Remove redundant compatibles of MT8188 because it shares the same configuration with MT8195 - Separate dt-bindings by modules - Support reset bit mapping in mmsys driver Hsiao Chien Sung (23): dt-bindings: display: mediatek: ethdr: Add compatible for MT8188 dt-bindings: display: mediatek: mdp-rdma: Add compatible for MT8188 dt-bindings: display: mediatek: merge: Add compatible for MT8188 dt-bindings: display: mediatek: padding: Add MT8188 dt-bindings: arm: mediatek: Add compatible for MT8188 dt-bindings: reset: mt8188: Add VDOSYS reset control bits soc: mediatek: Support MT8188 VDOSYS1 in mtk-mmsys soc: mediatek: Support MT8188 VDOSYS1 Padding in mtk-mmsys soc: mediatek: Support reset bit mapping in mmsys driver soc: mediatek: Add MT8188 VDOSYS reset bit map drm/mediatek: Rename OVL_ADAPTOR_TYPE_RDMA drm/mediatek: Add component ID to component match structure drm/mediatek: Manage component's clock with function pointers drm/mediatek: Power on/off devices with function pointers drm/mediatek: Start/Stop components with function pointers drm/mediatek: Sort OVL adaptor components drm/mediatek: Refine device table of OVL adaptor drm/mediatek: Support MT8188 Padding in display driver drm/mediatek: Add Padding to OVL adaptor drm/mediatek: Return error if MDP RDMA failed to enable the clock drm/mediatek: Remove the redundant driver data for DPI drm/mediatek: Fix underrun in VDO1 when switches off the layer drm/mediatek: Support MT8188 VDOSYS1 in display driver .../bindings/arm/mediatek/mediatek,mmsys.yaml | 1 + .../display/mediatek/mediatek,ethdr.yaml | 6 +- .../display/mediatek/mediatek,mdp-rdma.yaml | 6 +- .../display/mediatek/mediatek,merge.yaml | 3 + .../display/mediatek/mediatek,padding.yaml | 81 ++++++ drivers/gpu/drm/mediatek/Makefile | 3 +- drivers/gpu/drm/mediatek/mtk_disp_drv.h | 8 + drivers/gpu/drm/mediatek/mtk_disp_merge.c | 2 +- .../gpu/drm/mediatek/mtk_disp_ovl_adaptor.c | 274 +++++++++++------- drivers/gpu/drm/mediatek/mtk_dpi.c | 16 +- drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 10 +- drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 2 + drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h | 20 ++ drivers/gpu/drm/mediatek/mtk_drm_drv.c | 5 +- drivers/gpu/drm/mediatek/mtk_drm_drv.h | 2 +- drivers/gpu/drm/mediatek/mtk_mdp_rdma.c | 19 +- drivers/gpu/drm/mediatek/mtk_padding.c | 160 ++++++++++ drivers/soc/mediatek/mt8188-mmsys.h | 210 ++++++++++++++ drivers/soc/mediatek/mtk-mmsys.c | 27 ++ drivers/soc/mediatek/mtk-mmsys.h | 32 ++ drivers/soc/mediatek/mtk-mutex.c | 51 ++++ include/dt-bindings/reset/mt8188-resets.h | 75 +++++ include/linux/soc/mediatek/mtk-mmsys.h | 8 + 23 files changed, 890 insertions(+), 131 deletions(-) create mode 100644 Documentation/devicetree/bindings/display/mediatek/mediatek,padding.yaml create mode 100644 drivers/gpu/drm/mediatek/mtk_padding.c --- 2.18.0