From patchwork Thu Oct 19 05:55:55 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: 15589 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2010:b0:403:3b70:6f57 with SMTP id fe16csp180529vqb; Wed, 18 Oct 2023 22:57:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHJU4PbRsUcnmh5uiAt6HTzSReyo5tEFqTnm8pJmaPdvcKDfkTeq5Is2S+bQxjVuG4UaiPz X-Received: by 2002:aa7:9687:0:b0:6be:30f1:45f8 with SMTP id f7-20020aa79687000000b006be30f145f8mr1051782pfk.20.1697695052840; Wed, 18 Oct 2023 22:57:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697695052; cv=none; d=google.com; s=arc-20160816; b=qqnUPtFoMHLDfKdEJnBXEvxV/5L6te1m3/0v/rX+VmAHjRBTErBli2ePTtwduVz2F6 l9qQkUXYVqRjj80k8tV7GHEywNmR9icQwekmXewCHnkTdjDJLwD3OpHnpeB6FO3RWVNd g6jARCOTGimtC4gQgUdWMGHLh5bTBve4Jm7mk7nqZtd0tVgB7Acn4W3II3cofyY22pqD RHKfPGKAO0ejtxVUzkrX/4wksLNwUzswx26rfLmD8P85eZXuiLASfSPaFNmcgZFQedLt OwJoiabCzaViNUgWwZA1+9QTuWaSubeTycTWkpCFPBj4jFurlD3omCGHQPF9aS6Lfh+j IfiA== 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=hvEopTbQPgbeMG690XRwL0NDv7LUQkNAzw+G6eKIaHA=; fh=fv4tbCKTXdNtjEvV4h1+g1nnsRjdLHbhnCNyWnoFRfI=; b=aHs5Zsau/DaeCEVtfW55ewqDzA+q+7OkQob6eAWP3lWn6u7Rh0qW7iu4QsgYeEkxA/ w8XJY7FfKcsBD8JXhpu5+3sZrd8ciifjACJWZA+Vk8Vhw7wEUNxL79g2iW+jr8JgVYmX eiVVJQLYC5vgHfgpXqnwqdo4DpHZbs9yzY4LTh+tikH9JCvUnmsV+iGFe091zEBlIghR ycs4/lcOt0LpyPgFxezmnP7+7YvZAoRDErWQ7PwMFjl2tBLvTwLmxZj1+VcHx5YgnWfr dPBS+qdufovTpeje+pAt6+OZ/Mtze5bD0NBNO01zJRJAPGEc6itI1W6H2boFa/h5NLa1 r0gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b="OBvr/vie"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id o4-20020a056a0015c400b006bebc50b5c0si2892738pfu.46.2023.10.18.22.57.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 22:57:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b="OBvr/vie"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id C00238218E44; Wed, 18 Oct 2023 22:57:31 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235283AbjJSF5V (ORCPT + 24 others); Thu, 19 Oct 2023 01:57:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232730AbjJSF4h (ORCPT ); Thu, 19 Oct 2023 01:56:37 -0400 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D15D12F; Wed, 18 Oct 2023 22:56:34 -0700 (PDT) X-UUID: 3a70d73a6e4411ee8051498923ad61e6-20231019 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=hvEopTbQPgbeMG690XRwL0NDv7LUQkNAzw+G6eKIaHA=; b=OBvr/vieTI6/d/TFd/ezO0bFn3tFSS183a6am98qqt3Jmt9pz8OiOVIFGh/uxMWSbOB9wBU+/903JFK2g5DeprIpL1w6Hy8h8AG9nag4LsdEYj6AlBaAO88eJXgA1ppUW3KQiVaD6mRieFhkuiHsHkoOobOinxGpRSUGwaF2eGU=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.32,REQID:439dc539-0540-4758-a7d2-af1c437a6c02,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:5f78ec9,CLOUDID:aaa44dc4-1e57-4345-9d31-31ad9818b39f,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,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_SNR X-UUID: 3a70d73a6e4411ee8051498923ad61e6-20231019 Received: from mtkmbs13n2.mediatek.inc [(172.21.101.108)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 528609320; Thu, 19 Oct 2023 13:56:21 +0800 Received: from mtkmbs11n1.mediatek.inc (172.21.101.185) by mtkmbs13n2.mediatek.inc (172.21.101.108) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Thu, 19 Oct 2023 13:56:20 +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.1118.26 via Frontend Transport; Thu, 19 Oct 2023 13:56:20 +0800 From: Hsiao Chien Sung To: AngeloGioacchino Del Regno , CK Hu , Krzysztof Kozlowski , Matthias Brugger , Rob Herring CC: Chun-Kuang Hu , Philipp Zabel , David Airlie , Daniel Vetter , Fei Shao , Sean Paul , Johnson Wang , "Nancy . Lin" , Moudy Ho , Hsiao Chien Sung , "Jason-JH . Lin" , Nathan Lu , , , , , Subject: [PATCH v10 00/24] Add display driver for MT8188 VDOSYS1 Date: Thu, 19 Oct 2023 13:55:55 +0800 Message-ID: <20231019055619.19358-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=-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 (snail.vger.email [0.0.0.0]); Wed, 18 Oct 2023 22:57:31 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780162288092274463 X-GMAIL-MSGID: 1780162288092274463 This series is based on mediatek-drm-next. Changes in v10: - Remove "Reviewed-by" tags of 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 the redundant driver data for DPI 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 in "drm/mediatek: Add Padding to OVL adaptor" because of the modifications. 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 (24): 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: Remove ineffectual power management codes 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 | 28 +- 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, 893 insertions(+), 146 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