From patchwork Tue Oct 24 13:00:25 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: 13434377 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 1011EC25B48 for ; Tue, 24 Oct 2023 13:01:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C420C10E3A9; Tue, 24 Oct 2023 13:01:11 +0000 (UTC) Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by gabe.freedesktop.org (Postfix) with ESMTPS id AE6D210E399 for ; Tue, 24 Oct 2023 13:01:00 +0000 (UTC) X-UUID: 5d38bfb2726d11ee8051498923ad61e6-20231024 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=V/96WPswKcBGVW2RKfpfPf9twyY3/Kf4WZ0VWxugkAY=; b=EN3o8w03bZgpZqPckIesSncz7MPedW3dnlrlwuJOKO4kY+FRDXawCjqVRM1LD6CEuuH2Si4ujrouxBdi+O+HVZ456Emh6llQg8lyQxIp+2HpSmvCdYgS+RFXdTIPTnt+BFSBBuYUc1pv7UX1dfa6yKpSz6JnYWxFJ2IvrnUs1gg=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.32, REQID:2739b286-faca-4f1c-a8ac-3723c14f7152, 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:5f78ec9, CLOUDID:e2d9b6fb-4a48-46e2-b946-12f04f20af8c, 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_SNR,TF_CID_SPAM_ULN X-UUID: 5d38bfb2726d11ee8051498923ad61e6-20231024 Received: from mtkmbs10n1.mediatek.inc [(172.21.101.34)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 2077320560; Tue, 24 Oct 2023 21:00:53 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by MTKMBS14N1.mediatek.inc (172.21.101.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Tue, 24 Oct 2023 21:00:51 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Tue, 24 Oct 2023 21:00:51 +0800 From: Hsiao Chien Sung To: AngeloGioacchino Del Regno , "CK Hu" , Krzysztof Kozlowski , Matthias Brugger , Rob Herring Subject: [PATCH v11 00/23] Add display driver for MT8188 VDOSYS1 Date: Tue, 24 Oct 2023 21:00:25 +0800 Message-ID: <20231024130048.14749-1-shawn.sung@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 X-TM-AS-Product-Ver: SMEX-14.0.0.3152-9.1.1006-23728.005 X-TM-AS-Result: No-10--8.087300-8.000000 X-TMASE-MatchedRID: SOyT7GaTUYHmOzW2IQkhLISvKOGqLLPKfLPKYyLDlAdUjspoiX02Fw3J 2slQCgvmfMtvnnFP0XiIMJ/v7Y5X97JN15vcogu+VU3yVpaj3QyMjqpeR/YVDWecrqZc3vabFEF kjDWppsnBfR/WU+6YOLarhEB4xGYZ+uobhwVz9gDLtNJZxvPj1pKLNrbpy/A0grAXgr/AjP0MhQ WlzVDAVWdNfQ/gmrCQASo1XNPhrPpmmT12WpbGAj9B1SHosSXQYQXxsZnRwoK8NrbzjPvzJ2hyl Wuy2341id8I3ssVPENypjYJtCokIGaAyMVnPatLkkBrUL/4Vy4j3JVwc0NTto5RXzY0MfgCMDPF cR5xz2RZfh5NyMNmxIAy6p60ZV62fJ5/bZ6npdg7AFczfjr/7CED7qr0ErNomJ9V/T+p9TqxZ6Y PVMw1Xgu+a2/6V/5vVYSDFXwlmz0= X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--8.087300-8.000000 X-TMASE-Version: SMEX-14.0.0.3152-9.1.1006-23728.005 X-TM-SNTS-SMTP: 6D6A65416BD5D04AF31EBE9A568C294115A631C580EF18D534B7FE7AB129AED82000:8 X-MTK: N X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nathan Lu , Chun-Kuang Hu , Moudy Ho , Fei Shao , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Johnson Wang , "Nancy . Lin" , linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, "Jason-JH . Lin" , Hsiao Chien Sung , Sean Paul , devicetree@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This series is based 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