From mboxrd@z Thu Jan 1 00:00:00 1970 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 91D34C433F5 for ; Wed, 15 Dec 2021 14:13:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C5C1610EB2F; Wed, 15 Dec 2021 14:13:49 +0000 (UTC) Received: from mail-oi1-x22f.google.com (mail-oi1-x22f.google.com [IPv6:2607:f8b0:4864:20::22f]) by gabe.freedesktop.org (Postfix) with ESMTPS id C605C10EB2F for ; Wed, 15 Dec 2021 14:13:48 +0000 (UTC) Received: by mail-oi1-x22f.google.com with SMTP id t19so31866390oij.1 for ; Wed, 15 Dec 2021 06:13:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=mime-version:in-reply-to:references:from:user-agent:date:message-id :subject:to:cc:content-transfer-encoding; bh=Y4zhr1qBpQouWAjQmvQmYm8AO9iMhLv9gsqOBViL2VY=; b=fCTSIupul7HV3t0Pc2YRbF5joKjanOEBO8j7BSRvcj4Nwvczd/l0R8QpqDInjzUDgI ISXaKJWrUhb/qLJLFD6OJwp/5oVLPs/YSJwZ9T8wG7UZJq8xu4qH5WS9LcmicHzwaiR2 1Mjg+45dc86B478Ip/vQIoCDq0CHPG5tgoGOP9kcJUlbH9+kX+8ccMhmdQSbGzf21P7S S3fMEgUM8zzp6Iitp5jJFbg2fAHeWYfAkskGEbanskX84I6Uxzm/flbmlgEsJ/6yoWYw 3Lf5FNYHeocrymRGeeeCsyO9iK40rNmhMiZzsolpitHW6gQdRKfwOQb8VPpChhyjaUuz lxxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:in-reply-to:references:from :user-agent:date:message-id:subject:to:cc:content-transfer-encoding; bh=Y4zhr1qBpQouWAjQmvQmYm8AO9iMhLv9gsqOBViL2VY=; b=lkGQwpw8ReEumEE3OOnJJsO1vbT1MmCEHT9q9s5IV5+IHDVMTMWQywX0RY/beoJyFL 6TyKfVtGCTyJGIGxbhw00JSqMxYgPgNaEojQ/xAQnud7B+6A9mPBtMweCrC/uLXomBwR ylUo3vCqakmBSQR9xs9I8iD23ZoiFeV0CSJQ41/0lY4yzu/wNM5NvodvV4hpc86VsXV7 Hjlu5epuNodHXM9NmcGANRXyBYK4Sl7Kkhy65AyzlQXFzOblLdWZm74+p4Xhl43AiBAJ PV3b0B3u6h8l0hPQqWxnOuO3NtufkOgF58XjEke5HUooTfHQsnjYGmr6vy3NIPAAzQe9 RrrA== X-Gm-Message-State: AOAM533YfA+eL8bt7/Hgibkv5LlrsJXHH+/WP6sjz063h7qmXHGFM8gs IFYzbEQQSCio32q6aX2Xpn/1mOp8UAN8UFpaNiAXbQ== X-Google-Smtp-Source: ABdhPJwRFY1fq8yZUUhdUBtDKqKygr3wmrQBm1uJ0DWwFLApjZXm+12sLNNfYTFx2KiRxrS+xsNX+Kq+lo9ijUZWzl8= X-Received: by 2002:aca:2b02:: with SMTP id i2mr8696186oik.140.1639577627856; Wed, 15 Dec 2021 06:13:47 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 15 Dec 2021 08:13:46 -0600 MIME-Version: 1.0 In-Reply-To: References: <20211110130623.20553-1-granquet@baylibre.com> <20211110130623.20553-8-granquet@baylibre.com> From: Guillaume Ranquet User-Agent: alot/0.10 Date: Wed, 15 Dec 2021 08:13:46 -0600 Message-ID: Subject: Re: [PATCH v6 7/7] drm/mediatek: Add mt8195 DisplayPort driver To: Chun-Kuang Hu Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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: David Airlie , Thomas Zimmermann , linux-kernel , Markus Schneider-Pargmann , ARM/Mediatek SoC support , DRI Development , Matthias Brugger , Linux ARM , kernel test robot Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Chun-Kuang. Quoting Guillaume Ranquet (2021-12-02 16:31:03) > Hi Chun-Kuang. > > Quoting Chun-Kuang Hu (2021-11-25 16:27:45) > > Hi, Guillaume: > > > > This is a big patch, so I give some comment first. > > > > Guillaume Ranquet =E6=96=BC 2021=E5=B9=B411=E6= =9C=8810=E6=97=A5 =E9=80=B1=E4=B8=89 =E4=B8=8B=E5=8D=889:06=E5=AF=AB=E9=81= =93=EF=BC=9A > > > > > > From: Markus Schneider-Pargmann > > > > > > This patch adds a DisplayPort driver for the Mediatek mt8195 SoC and = a > > > according phy driver mediatek-dp-phy. > > > > > > 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. > > > > > > 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 th= at > > > both can work with the same register range. The phy driver sets devic= e > > > data that is read by the parent to get the phy device that can be use= d > > > to control the phy properties. > > > > > > This driver is based on an initial version by > > > Jason-JH.Lin . > > > > > > Signed-off-by: Markus Schneider-Pargmann > > > Signed-off-by: Guillaume Ranquet > > > Reported-by: kernel test robot > > > --- > > > drivers/gpu/drm/drm_edid.c | 2 +- > > > > Separate this to another patch. > > > > > 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 +- > > > > Ditto. > > > > > drivers/gpu/drm/mediatek/mtk_dpi_regs.h | 26 + > > > > Ditto. > > > > > drivers/gpu/drm/mediatek/mtk_drm_drv.c | 1 + > > > > Ditto > > > > > drivers/gpu/drm/mediatek/mtk_drm_drv.h | 1 + > > > > Ditto > > > yes my bad, I've made a bunch of fixup which ended up in the wrong place. > It will be fixed for the next version. > > > > 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 > > > > > > 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(stru= ct drm_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; > > > > > > /* YCRCB444 is optional according to spec. */ > > > if (hdmi[6] & DRM_EDID_HDMI_DC_Y444) { > > > diff --git a/drivers/gpu/drm/mediatek/Kconfig b/drivers/gpu/drm/media= tek/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/medi= atek/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 > > > > > > 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/medi= atek/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