From patchwork Fri Dec 17 15:08:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guillaume Ranquet X-Patchwork-Id: 12696676 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 DB0E7C4332F for ; Fri, 17 Dec 2021 15:11:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=/yWMxvbscUksVESu4oKzBqnVJFZFDNvkvBGo76gBiYo=; b=muQDqh9tOVRWgN enVxNHvf0AB4JvHAIt9WImqEKnmWJoq9gha1kec3aP/VKNeiCz6LreztqRVmzBdwg0XWkA7XghDc/ 3N72gOwZagMpsHLML+vbWxgeYSC6OOQX38ZCKSW14dmIi6Sa92obNTL3zrA4+MlV4kGBLrBfLeeLg dy5OvcfjeNLdOLNUHkGly/dCcsMY1XF6Crw1iaBpoMX4YfEcbf1Urq/8FnMOvNeHX/r3Rbi9WQqne c2524FGuskhwIotArO1xh/bppYydofEGHmPSknmxeNX3PJNCDYRw1V72lLz1Iazv1g8t8M/7jisVp Oe7B0kJL3fkdWHxKpa5Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1myEru-00AorK-87; Fri, 17 Dec 2021 15:09:58 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1myErI-00AoWL-2A for linux-arm-kernel@lists.infradead.org; Fri, 17 Dec 2021 15:09:24 +0000 Received: by mail-wr1-x443.google.com with SMTP id e5so4650017wrc.5 for ; Fri, 17 Dec 2021 07:09:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=yRgDSSqg18AtQJdN5DkiCaClvOYXgXjHhAlXiCj+Dko=; b=g9W7RWmQSPiKWrJn+NBbsAydp7P4fHv96fk9JDFNnEZKd0xTJbV+xi4lw0i+dtP0mF +x8kzwy9so76cfj/lNK7ApR4d45yQc6H+PAzl9BjXg/8uwuMTkAIR4lxnEjVFqa7aS9a uEVHevqd1C2jwwSWpSDmCZ3Wqzg5iqU5Xuy43mR8qTSrVoxqp7y1t/O4Q5AWVS5uDwDy 0Q456yBlGCZ67FaFNplhPEXOa6ZlApxyBn/iw3U5O2t8OguH9N+PY1phi0b50U3GZVH7 yZc56LZ7muWMqIR09n5kR0Hv8XC3TvPcVDZosDKdduy7ec1Ap3X73GxGG6GjFVaBm5Ec fmxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=yRgDSSqg18AtQJdN5DkiCaClvOYXgXjHhAlXiCj+Dko=; b=jkMpqRPgKRIE3AuDAATdJQh+fTB62ayGqyyUVNcuE5Ts/+5ZluvLpolGhQhchw15TB JftttMz8ZdVXmfxl7Oh6gK+bOJBuCxaf3H13M3uAPHFHs9AY6DYxa3qUjiapeNHdLZgD hmBDHFqEwuJdDE1GPwMAoLJyGpD2zPD2c/G9gFZlOgUPyWZ/JlfMKg+w9IcsngsYz0vC 2YGYhQLhKda6y18DtWZAWPAdPizRen5hVZyBxgx0e1XZXrqlMoZm1KS0RROfcQfq8zLX /i1tTo7ILxIXeLiXou+y56R0k5+kI06sKbFqQLfqZl7WgFupHEQaDt+a7FGKn+A/Lr2Q kOyw== X-Gm-Message-State: AOAM532D1GNqRIp7RE3dO1n+Yys21obk5ki1Ru8/nKYadtlHgq5wnVzn 6RF2UQ1HKwsNWKY8JSZCxDZpE8PHIfBwa2YS X-Google-Smtp-Source: ABdhPJzsW1ZAuSMTYzAh7uXUsc8BKNG+Z28cgFLomjdg1zeQ6UhSck5TG3zIkixQmqnJ5kgJap7lbg== X-Received: by 2002:adf:f112:: with SMTP id r18mr3040944wro.655.1639753757614; Fri, 17 Dec 2021 07:09:17 -0800 (PST) Received: from localhost.localdomain (2a02-8440-6441-43a4-3074-96af-9642-0003.rev.sfr.net. [2a02:8440:6441:43a4:3074:96af:9642:3]) by smtp.gmail.com with ESMTPSA id g18sm12655132wmq.4.2021.12.17.07.09.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Dec 2021 07:09:17 -0800 (PST) From: Guillaume Ranquet To: Matthias Brugger Cc: linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH v7 0/8] drm/mediatek: Add mt8195 DisplayPort driver Date: Fri, 17 Dec 2021 16:08:46 +0100 Message-Id: <20211217150854.2081-1-granquet@baylibre.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211217_070920_173983_0113D7BD X-CRM114-Status: GOOD ( 17.22 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org this series is built around the DisplayPort driver. The dpi/dpintf driver and the added helper functions are required for the DisplayPort driver to work. In v7 I've adressed the comments from the community: - clean the checkpatch --strict output - better split up of the patches (some bad fixup were done in v6...) - use of devm_phy_get() - make the "ck_cg" clock optional as to not break the other platforms. There's still some leftover comments from Chun Kuang as can be seen in this thread: https://lore.kernel.org/linux-mediatek/CABnWg9v-QBAaJ0MffNNSKCNyd8eb1zhETxoZjxQ5c7FNeUkBAg@mail.gmail.com/ - mtk_dp_poweron() stayed in mtk_dp_bridge_attach() as the change breaks eDP - That request was left un-addressed as I'm not sure what to do with it. > > Refer to mtk_hdmi_bridge_atomic_enable() for getting the mode. Older revisions: RFC - https://lore.kernel.org/linux-mediatek/20210816192523.1739365-1-msp@baylibre.com/ v1 - https://lore.kernel.org/linux-mediatek/20210906193529.718845-1-msp@baylibre.com/ v2 - https://lore.kernel.org/linux-mediatek/20210920084424.231825-1-msp@baylibre.com/ v3 - https://lore.kernel.org/linux-mediatek/20211001094443.2770169-1-msp@baylibre.com/ v4 - https://lore.kernel.org/linux-mediatek/20211011094624.3416029-1-msp@baylibre.com/ v5 - https://lore.kernel.org/all/20211021092707.3562523-1-msp@baylibre.com/ v6 - https://lore.kernel.org/linux-mediatek/20211110130623.20553-1-granquet@baylibre.com/ Functional dependencies are: - Add Mediatek Soc DRM (vdosys0) support for mt8195 https://lore.kernel.org/all/20211026155911.17651-1-jason-jh.lin@mediatek.com/ - Add MediaTek SoC DRM (vdosys1) support for mt8195 https://lore.kernel.org/all/20211029075203.17093-1-nancy.lin@mediatek.com/ Guillaume Ranquet (1): drm/mediatek: Add mt8195 eDP support Markus Schneider-Pargmann (7): dt-bindings: mediatek,dpi: Add DP_INTF compatible dt-bindings: mediatek,dp: Add Display Port binding drm/edid: Add cea_sad helpers for freq/length video/hdmi: Add audio_infoframe packing for DP drm/mediatek: dpi: Add dpintf support phy: phy-mtk-dp: Add driver for DP phy drm/mediatek: Add mt8195 DisplayPort driver .../display/mediatek/mediatek,dp.yaml | 87 + .../display/mediatek/mediatek,dpi.yaml | 11 +- MAINTAINERS | 1 + drivers/gpu/drm/drm_edid.c | 74 + drivers/gpu/drm/mediatek/Kconfig | 7 + drivers/gpu/drm/mediatek/Makefile | 2 + drivers/gpu/drm/mediatek/mtk_dp.c | 3072 +++++++++++++++++ drivers/gpu/drm/mediatek/mtk_dp_reg.h | 568 +++ drivers/gpu/drm/mediatek/mtk_dpi.c | 304 +- drivers/gpu/drm/mediatek/mtk_dpi_regs.h | 38 + drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 4 + drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h | 1 + drivers/gpu/drm/mediatek/mtk_drm_drv.c | 6 +- drivers/gpu/drm/mediatek/mtk_drm_drv.h | 1 + drivers/phy/mediatek/Kconfig | 8 + drivers/phy/mediatek/Makefile | 1 + drivers/phy/mediatek/phy-mtk-dp.c | 219 ++ drivers/video/hdmi.c | 83 +- include/drm/drm_dp_helper.h | 2 + include/drm/drm_edid.h | 18 +- include/linux/hdmi.h | 7 +- include/linux/soc/mediatek/mtk-mmsys.h | 2 + 22 files changed, 4434 insertions(+), 82 deletions(-) create mode 100644 Documentation/devicetree/bindings/display/mediatek/mediatek,dp.yaml create mode 100644 drivers/gpu/drm/mediatek/mtk_dp.c create mode 100644 drivers/gpu/drm/mediatek/mtk_dp_reg.h create mode 100644 drivers/phy/mediatek/phy-mtk-dp.c