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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4473DC433F5 for ; Thu, 2 Dec 2021 15:31:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347674AbhLBPea (ORCPT ); Thu, 2 Dec 2021 10:34:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347564AbhLBPe1 (ORCPT ); Thu, 2 Dec 2021 10:34:27 -0500 Received: from mail-ot1-x330.google.com (mail-ot1-x330.google.com [IPv6:2607:f8b0:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC731C06174A for ; Thu, 2 Dec 2021 07:31:04 -0800 (PST) Received: by mail-ot1-x330.google.com with SMTP id 47-20020a9d0332000000b005798ac20d72so71166otv.9 for ; Thu, 02 Dec 2021 07:31:04 -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=OUgnc/HoJU3Rg4M3a8hKtNksh3/9ENly+mAw2/6gMEE=; b=5H6vDSGbta8fk/QGiaGjIC5hW1UzHXMSypWuDVTCKtRdLmdKJHe25ZGiKMyXAutqHR KtXmcGzlVMrayMB7kQMdhpJFDu5IMw3uZj2K7rgLRF9mqCtPIby7lsN7knMzV1yILfw6 af2IFHC5JffP3jpHVzgVvyRG1rD8URqjQ1OkbaAypmCALBZSCglpTzXtTEIRR5gxBfxb RJ8kOdCX1oqPCH1X+EwHntxeqexvoa6YeXT9nGikCoTu7tqbRk2HAAP95FdFHLwjJ5LN H4HTdIzKBJ+rP+jdlQH/7PezTrG8XCdtd9VcoxizD4cd6dBVrgU1r8Sjefzl/YIfaqRx bBcQ== 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=OUgnc/HoJU3Rg4M3a8hKtNksh3/9ENly+mAw2/6gMEE=; b=t6fNh9cCyTbGjpmpvvZ1PZd5/Jxt+Xk67s1w36OSpkxIz4hzd3CeDOJbtiDdmypojP NopbER3vCAdtIXQpYXTJfaNY/EBcHZR5U4wSkODni7/8CiFwB9xB+L2i63bCrmqvfxoR SaJIqeWHKOhkuHQnMhON+aFVbyHrBeeVIp5EvMyQQA9Cef1y4G3RKCIYbE2285C0o9xp SrC0Dfz/Vj9NMKO4Z/J+KYZnYckrinMItnAQY/Fn0R2r1V5EnZ+6w1AArPavYLQaTIp3 ZRC+R1z7DBs1Z/in3VgGX4UflDjVtvkIh3J5JvvayuR12bP2uhnRJkouiY++RcgjhjH/ 3TfA== X-Gm-Message-State: AOAM530fMjyWPi0F0yVLn6MZ7BbQTiHwzBoRiXz7B5WE33EyfpJ/VdYe 9eKHSEz/akcBbySL1Gso1XzORzlU2Zpx+fsqOA+N1w== X-Google-Smtp-Source: ABdhPJxe8jEnPLalJVqLPTDTUwwr00L9oI3zbvqkiTCYa5iQRohqaLIoOYVHQLU4h5wbUeDpZE+Yz0E1w1DVC64+MCw= X-Received: by 2002:a9d:51c3:: with SMTP id d3mr11920478oth.152.1638459063850; Thu, 02 Dec 2021 07:31:03 -0800 (PST) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 2 Dec 2021 07:31:03 -0800 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: Thu, 2 Dec 2021 07:31:03 -0800 Message-ID: Subject: Re: [PATCH v6 7/7] drm/mediatek: Add mt8195 DisplayPort driver To: Chun-Kuang Hu Cc: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Philipp Zabel , Matthias Brugger , Markus Schneider-Pargmann , kernel test robot , linux-kernel , DRI Development , "ARM/Mediatek SoC support" , Linux ARM Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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. > > > > 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(struct= 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/mediate= k/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/mediat= ek/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/mediat= ek/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