From patchwork Mon Oct 16 10:39:47 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: 15415 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp3367108vqb; Mon, 16 Oct 2023 03:41:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF6G6k5giNYJYUklIfo5p8/3K8vv0/UKjIptJc1cHbsDUjhDAJ8DHAXm1hUl5NcpkwNJR9x X-Received: by 2002:a92:cb41:0:b0:357:6783:73ce with SMTP id f1-20020a92cb41000000b00357678373cemr7112741ilq.0.1697452892056; Mon, 16 Oct 2023 03:41:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697452892; cv=none; d=google.com; s=arc-20160816; b=wG9aGYLpYS/R7idn3gTp3m7sPe2L6XdvE7x/6xHLmGk6fwGT4XFGXS2vZoxiljOx0z OEiW3uDKqoaDS0TH5DcpIn7yBw9r+sBRYp7b4ubGeuQYQzI2OOzp+vYMVSmjwWmK6utp Vlfmumf/UlNqWKqCx0ahERXRFf+QnSrehWy+X4g6hiAoZHCEApkuluiFDxgOtEzDtSka 5jtDV7Z06j3IYPPmBXbau0RDgNEU4AnWSxzzBpLucFPwwVncGEflfi6b7uXYDtYSGDiU w7aPNgywrjc5e+KUXMuyWff1pe5WsjHEyHXKj8P75+oq0RcNvFHGh3pRPtxkg4hLwFks uA1g== 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=oAkgw2E/OB6PuTR4MDaMIbqSzw1psfdmYM16TpVduMk=; fh=8kgzifk4orktq6sICAh9UkMBfxIdH2rYYHr6dIOIt3w=; b=shQ+IpDFy5V0O5OR0Vx+e0V8UgbRY5Fsjlsux/UKNU5LXoCfdmmWEeK+9zIesp0KD1 cWEdQaEnYicSLu9XV/Fs16dg2xegyWPLSdehEd/fdZWobx5QgKoXvQVUJvXUG32Ks4y9 yePRfzQdHOm91/ScHzTF2xtxZ7+f0ee3Fbyik00i7bWJoXpKq0x84x8lVnCe+edVIPqQ lXateBlrRsJsWPXlmuE1L1/ziwQ0AO6Ui/t50dH0DtFbsp61Ffx9dDxMUuXd9gBh0s1M i4+cNQFf62cAngicHjr/twe89jBcLJXNW8D+8e3m2gGSQKubtUe/IDwpoOsS+fTXBXFL 8oPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=Y5c8bq8v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id b3-20020a633403000000b005859c6d691dsi7801465pga.895.2023.10.16.03.41.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 03:41:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=Y5c8bq8v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (Postfix) with ESMTP id 4C9AD804B01E; Mon, 16 Oct 2023 03:41:11 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233069AbjJPKkk (ORCPT + 18 others); Mon, 16 Oct 2023 06:40:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229666AbjJPKk1 (ORCPT ); Mon, 16 Oct 2023 06:40:27 -0400 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F56DC5; Mon, 16 Oct 2023 03:40:21 -0700 (PDT) X-UUID: 632ac7026c1011ee8051498923ad61e6-20231016 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=oAkgw2E/OB6PuTR4MDaMIbqSzw1psfdmYM16TpVduMk=; b=Y5c8bq8v23ab5zgAamFfB/Hx+gb4vW5jbHG2Xlc7JwYjwVeq2NxVRooSfG6Ka8R2k+3mdhXPt1+mqid5vIOaDDl/NR+s54JbmxHPnpqwsg3yrOgSIfud8Ig9V6W/wblU/4RLFqZkpUYnNR3dRan/N1AjLx1lOLrRr/BPsV0ByoE=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.32,REQID:1c6a9795-0b6d-46dd-adf5-bca38456a292,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:f3bb2dc4-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: 632ac7026c1011ee8051498923ad61e6-20231016 Received: from mtkmbs14n2.mediatek.inc [(172.21.101.76)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1815123853; Mon, 16 Oct 2023 18:40:13 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs11n1.mediatek.inc (172.21.101.185) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Mon, 16 Oct 2023 18:40:12 +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; Mon, 16 Oct 2023 18:40:12 +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 , "Jason-JH . Lin" , Nathan Lu , Hsiao Chien Sung , Yongqiang Niu , Hans Verkuil , Mauro Carvalho Chehab , , , , , Subject: [PATCH v8 00/23] Add display driver for MT8188 VDOSYS1 Date: Mon, 16 Oct 2023 18:39:47 +0800 Message-ID: <20231016104010.3270-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.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.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 (pete.vger.email [0.0.0.0]); Mon, 16 Oct 2023 03:41:12 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779908363567056395 X-GMAIL-MSGID: 1779908363567056395 This series is based on mediatek-drm-next. 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 (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: Refine device table of OVL adaptor drm/mediatek: Sort OVL adaptor components drm/mediatek: Add component ID to component match structure drm/mediatek: Manage component's clock with function pointers drm/mediatek: Start/Stop components with function pointers 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: Power on devices in OVL adaptor when atomic enable 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 | 283 +++++++++++------- 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, 895 insertions(+), 153 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