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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D6840C433F5 for ; Mon, 15 Nov 2021 10:12:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AE43F61AE2 for ; Mon, 15 Nov 2021 10:12:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237571AbhKOKPK (ORCPT ); Mon, 15 Nov 2021 05:15:10 -0500 Received: from wnew3-smtp.messagingengine.com ([64.147.123.17]:49623 "EHLO wnew3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236829AbhKOKO3 (ORCPT ); Mon, 15 Nov 2021 05:14:29 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.west.internal (Postfix) with ESMTP id D8B642B0132D; Mon, 15 Nov 2021 05:11:32 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Mon, 15 Nov 2021 05:11:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=2N6e1I5fw1vFDc8EvMgiEKbahQd RAAQj+6mq2DLuVog=; b=KYOaXdbcVs8DHIiJIJYbQfpeIt9Kd0gX4qi9JbL2JJH Y3FL86Kz9D9sU5BesAnCUgXRbQ/lARBWC/Y5D9Fw5U0HyUfPVwN0N0nOlKCkBYBi WqN+htc5gHG3X1LC4npOZkO3HUoHqnemwORO0niYcoUC47Glo9iRSLghUqHzMMvn psKPh70o2a03MmOdegGpLmNI65mC9AtaDHmQV6xtH6pXB2bTuWJNJ6zLVdo4Fw8c fS1aPDJ2F/HuJD6XwNY9l+eJyptDqeqf7qCmV4HcVl3RZlh5+RKSMfQdLBwsrWw/ w4waxy12LycB0YnSAmntCkn1ijN93IN6qeQH2iHhRig== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=2N6e1I 5fw1vFDc8EvMgiEKbahQdRAAQj+6mq2DLuVog=; b=G1EFPoZ5Y+HJsVLyfZDu08 u4QN0h+WnKOWQVxY33sdqYZH+tvccwihL3LvoYPWaEyw6QJ9FyDQf+aahwpdStw5 h/2I8mmant17yyBzR3B0Ut6gEdal3Jgwkp3iUIq7U7/vm5Sms0PBsM1UjjVokM0H 16El0bXnl31c8ki4qJCsJeYK5ITyzUUTCcOJvCNtQ6KG2ZraukP5ggW7B2JmPiad Onb+/xjvKuhYcT7c+5BajEYrwlWiHvjyIX5r5KLE2Ta7sy1ONXfaxwmtCqdydxj3 adquXNtcnHq9JtBJYe4nP/0Bp+XqwctPd7MrI+t7dBngLzecdEmSqztpF/R6kBDQ == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrvdelgdduudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepofgrgihimhgv ucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrghtth gvrhhnpeelkeeghefhuddtleejgfeljeffheffgfeijefhgfeufefhtdevteegheeiheeg udenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrg igihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 15 Nov 2021 05:11:31 -0500 (EST) Date: Mon, 15 Nov 2021 11:11:29 +0100 From: Maxime Ripard To: Guillaume Ranquet Cc: Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Chun-Kuang Hu , Philipp Zabel , Matthias Brugger , Markus Schneider-Pargmann , kernel test robot , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v6 7/7] drm/mediatek: Add mt8195 DisplayPort driver Message-ID: <20211115101129.lyxxmb6i7paaonwi@gilmour> References: <20211110130623.20553-1-granquet@baylibre.com> <20211110130623.20553-8-granquet@baylibre.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="om47agqyp767tihh" Content-Disposition: inline In-Reply-To: <20211110130623.20553-8-granquet@baylibre.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --om47agqyp767tihh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Wed, Nov 10, 2021 at 02:06:23PM +0100, Guillaume Ranquet wrote: > From: Markus Schneider-Pargmann >=20 > This patch adds a DisplayPort driver for the Mediatek mt8195 SoC and a > according phy driver mediatek-dp-phy. >=20 > It supports both functional units on the mt8195, the embedded > DisplayPort as well as the external DisplayPort units. It offers > hot-plug-detection, audio up to 8 channels, and DisplayPort 1.4 with up > to 4 lanes. There's a number of checkpatch --strict errors in there, make sure to fix t= hem. > The driver creates a child device for the phy. The child device will > never exist without the parent being active. As they are sharing a > register range, the parent passes a regmap pointer to the child so that > both can work with the same register range. The phy driver sets device > data that is read by the parent to get the phy device that can be used > to control the phy properties. If the PHY is in the same register space than the DP controller, why do you need a separate PHY driver in the first place? > This driver is based on an initial version by > Jason-JH.Lin . >=20 > Signed-off-by: Markus Schneider-Pargmann > Signed-off-by: Guillaume Ranquet > Reported-by: kernel test robot > --- > drivers/gpu/drm/drm_edid.c | 2 +- > drivers/gpu/drm/mediatek/Kconfig | 7 + > drivers/gpu/drm/mediatek/Makefile | 2 + > drivers/gpu/drm/mediatek/mtk_dp.c | 3094 +++++++++++++++++++++++ > drivers/gpu/drm/mediatek/mtk_dp_reg.h | 568 +++++ > drivers/gpu/drm/mediatek/mtk_dpi.c | 111 +- > drivers/gpu/drm/mediatek/mtk_dpi_regs.h | 26 + > drivers/gpu/drm/mediatek/mtk_drm_drv.c | 1 + > drivers/gpu/drm/mediatek/mtk_drm_drv.h | 1 + > 9 files changed, 3799 insertions(+), 13 deletions(-) > create mode 100644 drivers/gpu/drm/mediatek/mtk_dp.c > create mode 100644 drivers/gpu/drm/mediatek/mtk_dp_reg.h >=20 > diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c > index 500279a82167a..bfd98b50ceb5b 100644 > --- a/drivers/gpu/drm/drm_edid.c > +++ b/drivers/gpu/drm/drm_edid.c > @@ -5183,7 +5183,7 @@ static void drm_parse_hdmi_deep_color_info(struct d= rm_connector *connector, > * modes and forbids YCRCB422 support for all video modes per > * HDMI 1.3 spec. > */ > - info->color_formats =3D DRM_COLOR_FORMAT_RGB444; > + info->color_formats |=3D DRM_COLOR_FORMAT_RGB444; > =20 > /* YCRCB444 is optional according to spec. */ > if (hdmi[6] & DRM_EDID_HDMI_DC_Y444) { This looks unrelated? > diff --git a/drivers/gpu/drm/mediatek/Kconfig b/drivers/gpu/drm/mediatek/= Kconfig > index 2976d21e9a34a..029b94c716131 100644 > --- a/drivers/gpu/drm/mediatek/Kconfig > +++ b/drivers/gpu/drm/mediatek/Kconfig > @@ -28,3 +28,10 @@ config DRM_MEDIATEK_HDMI > select PHY_MTK_HDMI > help > DRM/KMS HDMI driver for Mediatek SoCs > + > +config MTK_DPTX_SUPPORT > + tristate "DRM DPTX Support for Mediatek SoCs" > + depends on DRM_MEDIATEK > + select PHY_MTK_DP > + help > + DRM/KMS Display Port driver for Mediatek SoCs. > diff --git a/drivers/gpu/drm/mediatek/Makefile b/drivers/gpu/drm/mediatek= /Makefile > index 29098d7c8307c..d86a6406055e6 100644 > --- a/drivers/gpu/drm/mediatek/Makefile > +++ b/drivers/gpu/drm/mediatek/Makefile > @@ -21,3 +21,5 @@ mediatek-drm-hdmi-objs :=3D mtk_cec.o \ > mtk_hdmi_ddc.o > =20 > obj-$(CONFIG_DRM_MEDIATEK_HDMI) +=3D mediatek-drm-hdmi.o > + > +obj-$(CONFIG_MTK_DPTX_SUPPORT) +=3D mtk_dp.o > diff --git a/drivers/gpu/drm/mediatek/mtk_dp.c b/drivers/gpu/drm/mediatek= /mtk_dp.c > new file mode 100644 > index 0000000000000..83087219d5a5e > --- /dev/null > +++ b/drivers/gpu/drm/mediatek/mtk_dp.c > @@ -0,0 +1,3094 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* > + * Copyright (c) 2019 MediaTek Inc. > + * Copyright (c) 2021 BayLibre > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include