Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp142935rdb; Wed, 18 Oct 2023 22:57:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IELFNw7e9eXvxIVdGR56H6CTY+rq7kFm5y964tkel2cC6VCNdn2+kfn+hUhAncBTxMki6UW X-Received: by 2002:a05:6871:a012:b0:1b7:3fd5:87cd with SMTP id vp18-20020a056871a01200b001b73fd587cdmr2253308oab.48.1697695049432; Wed, 18 Oct 2023 22:57:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697695049; cv=none; d=google.com; s=arc-20160816; b=tsB/CHsfU9q51yFOOe/O4XaDxWO3imYg+OZ2JUGjxgJ5k92xrX2qr4qPHMAEpZei/o KEJzOQsKfi2RbOEAd+Tyo9VEPCf8TBMc51x78fgHcmMZtwXG9iDBb0XdlCRyoaWpJHM0 Bo1mSJT2gz1RzuuVGBFAbilHcAKfnjgbXZD2dox4UP4q+JbUfW9bBuy1WeYBWJT4o8oc NrwbGO4f+67RtOoPW9kKpXI+NsoF1IyzkRr13Cx1hdDm6Y6Z7nz0ZjpRS+q9l8HdiqQ+ D1NislctTUCPcUktVAMEPA/GoV7A9H1fMBaL/Ia3bzITOePUyHukRCN+2OC6Gclgu5I+ mGdg== 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 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id b14-20020a63714e000000b00578bb707e6esi3479102pgn.806.2023.10.18.22.57.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 22:57:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; 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 2620:137:e000::3:7 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 5EAC6821823C; Wed, 18 Oct 2023 22:57:28 -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 S235266AbjJSF5T (ORCPT + 99 others); Thu, 19 Oct 2023 01:57:19 -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 Content-Type: text/plain 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:28 -0700 (PDT) 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