Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1476978ybz; Wed, 29 Apr 2020 23:28:00 -0700 (PDT) X-Google-Smtp-Source: APiQypLDU/MJ0545s1T2ia7oR5gROwTQ7NYYdgPda3D40SNPw8/I5uwo0kxEUOZlYlD5al527YEh X-Received: by 2002:aa7:ca48:: with SMTP id j8mr1208703edt.328.1588228079803; Wed, 29 Apr 2020 23:27:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1588228079; cv=pass; d=google.com; s=arc-20160816; b=xTHHYwWBCsu96sNBe6R387gDfxhAyd77EIsMY/7eB5uVO7nBhfPv8YESqeodHxvlgv s8QV7JmfcjIsVLsDOK1rR4gOfmLJOs6M0ThQqYhqylCPA/+V6T7JzdmTI1pteHwGAMW6 VGBe5huAwJUwm2KXAQ5cM6e5rSrGAGZ7QM1uGReUzfhAJV74RdalThVQVagPUoTpyxYu KRAsUVY6mdsCa/6wDc9jLkgO4CkyY49K53nvxcAFGON2ePryehIxXQVgfNuJ6FcfJAD+ 4D5Uy9X77rVKdWuUb8cN7hZYAL1cb/TKm7rbovy6Yjuv0pMrdrK63abfch/c0v0M1zPB 1gNg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:in-reply-to :content-disposition:references:message-id:subject:cc:to:from:date :dkim-signature; bh=to7bGhPPSedVewEfTLyWQYNCqk1s80fF2KDf4iOiQ6c=; b=pXpuDezGp+uimhLUV9r+U9sSZi+EL5N+mxAopZSMCPfSWNfUTXlb50DUSsYrV4VkQy Kg8EBbPEKwOXHt+VBuuVh4jF86T3NM0HNBf+erj3NdNzzQYr1ujTjkdz+dNzsfmVAWyB iQ+KG/OBd785MmVxrYngkR7kCG6klcsfokWbdv3gizdwJcoLSYtKcXlhRvQVp5dAnUBt LK26oBwFZAGoUaTe9pVuyYHMqxFBZEfv8kOJp9Mf+hBwE3/5uS50wr9cAROS2S49tZ2l zbc4kn4x9ypMhQJKhlkA3a3otrBLKXu/33Ew4uFPv3Wa7dy8t4d9bog9/Fl2Z4MFOpzK 8lZg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Analogixsemi.onmicrosoft.com header.s=selector2-Analogixsemi-onmicrosoft-com header.b=1s6WCeWP; arc=pass (i=1 spf=pass spfdomain=analogixsemi.com dkim=pass dkdomain=analogixsemi.com dmarc=pass fromdomain=analogixsemi.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=analogixsemi.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bd6si3930976edb.277.2020.04.29.23.27.33; Wed, 29 Apr 2020 23:27:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@Analogixsemi.onmicrosoft.com header.s=selector2-Analogixsemi-onmicrosoft-com header.b=1s6WCeWP; arc=pass (i=1 spf=pass spfdomain=analogixsemi.com dkim=pass dkdomain=analogixsemi.com dmarc=pass fromdomain=analogixsemi.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=analogixsemi.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726428AbgD3GZ2 (ORCPT + 99 others); Thu, 30 Apr 2020 02:25:28 -0400 Received: from mail-bn8nam11on2137.outbound.protection.outlook.com ([40.107.236.137]:32558 "EHLO NAM11-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726337AbgD3GZ1 (ORCPT ); Thu, 30 Apr 2020 02:25:27 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Vp5q8ZiRVRS8Pqq4kI8Dvnod16Ne/VxgETi9Cy6zPylWCwZD0XMv1XIEeh5KEv2izjTn1441WvImRpFj0/zLZGFwEISSgqyEP3+jis7JMQUryBo+Xb4S9uve2O+4Q3CEb6Np14qgEQwqEhMbxnSvzJIqfoexDJVQUrqMX29SlgZB8dJWlZbcGEjV64TlXVQ0TgTBomSB4jL7wMQXQwYriCeP7kWLvR+DHuV/jZ1gQkDqu05wRgXHXCPynXfPEo1F0wMFgITzowHAn2nd9VM/bdLcZhJ/yvYAavQTv0Qy32vTLPlKOnyKJv3Dg+A8hvU/9MlLTR47GFX+35N/ySI3XQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=to7bGhPPSedVewEfTLyWQYNCqk1s80fF2KDf4iOiQ6c=; b=IbEiMjl9MmRKDsdKlVL/3pqENgrqZFawaVDlTS0Fy27deB7NYQ8jNTs80WPSvQ8A9XEeXIGyRdmTjDLCLzaGtdtc4F7oJhv+uh2+8kAoaT9NTegRvb4kf4DrIRTB6MB3+Iu+Rs9VBtKOTgzsmE+i5/fuVCjKDzi+u5AcBvH2nr7b20JTHkthy6lUWtNc1YjH17hL8RAF6gePFP+tk3zJTW3/4/+uL4EQ+Gry23gThKqThF/4YlR06JjuBByf0Qcu/tqoqlKRso6/Rd45gRPmYJg6zxVHio+hcTfI+lschPmfgTj8mA8yc+iBy8COO4mijXpF70ATf/rRzecDtx6hOw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=analogixsemi.com; dmarc=pass action=none header.from=analogixsemi.com; dkim=pass header.d=analogixsemi.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Analogixsemi.onmicrosoft.com; s=selector2-Analogixsemi-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=to7bGhPPSedVewEfTLyWQYNCqk1s80fF2KDf4iOiQ6c=; b=1s6WCeWPzi4t4b5ZgkKwskR5TGw8TFRJDq7T9qZm6w8Hb2kEwtCxpZ6aABnQ524a2F9jqTtI7woLqv46J48S9SIFcrrMTs/i0BQPKScugxx8NA6jqkEMxtuPi9EbZeCDyLpyKh1MUOAS3pNBE9C/JgSX16+Uu1RfBOoZB8NrrlA= Authentication-Results: analogixsemi.com; dkim=none (message not signed) header.d=none;analogixsemi.com; dmarc=none action=none header.from=analogixsemi.com; Received: from BY5PR04MB6739.namprd04.prod.outlook.com (2603:10b6:a03:229::8) by BY5PR04MB6868.namprd04.prod.outlook.com (2603:10b6:a03:21a::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.13; Thu, 30 Apr 2020 06:24:24 +0000 Received: from BY5PR04MB6739.namprd04.prod.outlook.com ([fe80::4517:bcc8:a3bd:407f]) by BY5PR04MB6739.namprd04.prod.outlook.com ([fe80::4517:bcc8:a3bd:407f%6]) with mapi id 15.20.2958.020; Thu, 30 Apr 2020 06:24:24 +0000 Date: Thu, 30 Apr 2020 14:24:16 +0800 From: Xin Ji To: Sam Ravnborg Cc: devel@driverdev.osuosl.org, Laurent Pinchart , Dan Carpenter , Andrzej Hajda , Neil Armstrong , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Pi-Hsun Shih , Sheng Pan Subject: Re: [PATCH v8 2/2] drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP bridge driver Message-ID: <20200430062416.GD6645@xin-VirtualBox> References: <4d14400b6c19f17c28267f6ebdbce9673333c05c.1587880280.git.xji@analogixsemi.com> <20200427200044.GC15880@ravnborg.org> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200427200044.GC15880@ravnborg.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-ClientProxiedBy: HK2PR0302CA0020.apcprd03.prod.outlook.com (2603:1096:202::30) To BY5PR04MB6739.namprd04.prod.outlook.com (2603:10b6:a03:229::8) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from xin-VirtualBox (114.247.245.254) by HK2PR0302CA0020.apcprd03.prod.outlook.com (2603:1096:202::30) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA) id 15.20.2979.14 via Frontend Transport; Thu, 30 Apr 2020 06:24:23 +0000 X-Originating-IP: [114.247.245.254] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1dea15ba-ba6e-41ac-0a21-08d7eccf2027 X-MS-TrafficTypeDiagnostic: BY5PR04MB6868: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-Forefront-PRVS: 0389EDA07F X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BY5PR04MB6739.namprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(366004)(376002)(346002)(39840400004)(396003)(136003)(107886003)(2906002)(8936002)(478600001)(8676002)(33656002)(4326008)(54906003)(86362001)(6496006)(316002)(186003)(966005)(6666004)(52116002)(30864003)(5660300002)(9686003)(66476007)(66556008)(956004)(7416002)(1076003)(55016002)(26005)(33716001)(16526019)(6916009)(66946007)(579004)(559001);DIR:OUT;SFP:1102; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8I+k9JWNt3yXpKURVGWC3WPnqzM6ZeHE/k6WNeXcVIvueTDfEjpPpNMQ07wMKrE0RXNOLd4mZb67uDfI2hFk05euWd4q/fI7JRngjg2g5IlQwzuzMlFAz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4/P6vtfEIlM5MPRBV9R0x0DwQWrpKRpuuuDjjF9JhgdjoYtYG2F9rbhtiZNsVH1TYQMLr/wqPVTa5TRJsWZ6akJ2Ry85wGCBIkKT4NYrTR8QNIDvorfIwkGmZEmy5pGlQw90tt4sPFOP9G2p+nSa2YVpcIyB4lKjiNSWdsnxcmLQ8eUMHiYzk X-OriginatorOrg: analogixsemi.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1dea15ba-ba6e-41ac-0a21-08d7eccf2027 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Apr 2020 06:24:24.5237 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b099b0b4-f26c-4cf5-9a0f-d5be9acab205 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: UiGiqx92vIrIdk2pbi1qllK1MNcJpzzsVBa26NA/6dzf9hlGa7SRe0w80Tt6BGJk/vah0WRWm6EJ4pKCfDcFGg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR04MB6868 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sam, On Mon, Apr 27, 2020 at 10:00:44PM +0200, Sam Ravnborg wrote: > Hi Xin Ji > > On Mon, Apr 27, 2020 at 02:18:44PM +0800, Xin Ji wrote: > > The ANX7625 is an ultra-low power 4K Mobile HD Transmitter designed > > for portable device. It converts MIPI DSI/DPI to DisplayPort 1.3 4K. > > > > The ANX7625 can support both USB Type-C PD feature and MIPI DSI/DPI > > to DP feature. This driver only enabled MIPI DSI/DPI to DP feature. > > You are sending this patch in an interesting time for bridge drivers. > We are migrating to an approach where the individual brdge drivers > exposes operations and where the connector creation is now optional. > > Laurent Pinchart is the architect behind it - and the required > interfaces is well documented. > You may find inspiration in a patchset I sent today: > https://lore.kernel.org/dri-devel/20200427081850.17512-1-sam@ravnborg.org/T/#t > This is not reviewed - so keep an eye out for feedback. > > It would be great to base this on top of drm-misc-next, as this is where > we will apply it eventually. > As it is now it will not build due to internal API changes. > > The driver looks well structured with nice coding. > > I am missing an explanation why the current analogix infrastructure > cannot be used. I have no clue but I just see other > drivers in same dir that benefits from the infrastructure. > So the questions seems relevant to be addressed. > > See a few more comments in the following, which you need to decide > what to follow and what to ignore. > I will make it obvious when something is a must to change, > if I find anything such. > > Sorry for providing such massive feedback on v8. > Please keep up the spirit and submit a v9 soon! > > Sam OK > > > > > Signed-off-by: Xin Ji > > --- > > drivers/gpu/drm/bridge/Makefile | 2 +- > > drivers/gpu/drm/bridge/analogix/Kconfig | 6 + > > drivers/gpu/drm/bridge/analogix/Makefile | 1 + > > drivers/gpu/drm/bridge/analogix/anx7625.c | 2158 +++++++++++++++++++++++++++++ > > drivers/gpu/drm/bridge/analogix/anx7625.h | 410 ++++++ > > 5 files changed, 2576 insertions(+), 1 deletion(-) > > create mode 100644 drivers/gpu/drm/bridge/analogix/anx7625.c > > create mode 100644 drivers/gpu/drm/bridge/analogix/anx7625.h > > > > diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridge/Makefile > > index 4934fcf..bcd388a 100644 > > --- a/drivers/gpu/drm/bridge/Makefile > > +++ b/drivers/gpu/drm/bridge/Makefile > > @@ -12,8 +12,8 @@ obj-$(CONFIG_DRM_SII9234) += sii9234.o > > obj-$(CONFIG_DRM_THINE_THC63LVD1024) += thc63lvd1024.o > > obj-$(CONFIG_DRM_TOSHIBA_TC358764) += tc358764.o > > obj-$(CONFIG_DRM_TOSHIBA_TC358767) += tc358767.o > > -obj-$(CONFIG_DRM_ANALOGIX_DP) += analogix/ > > obj-$(CONFIG_DRM_I2C_ADV7511) += adv7511/ > > obj-$(CONFIG_DRM_TI_SN65DSI86) += ti-sn65dsi86.o > > obj-$(CONFIG_DRM_TI_TFP410) += ti-tfp410.o > > +obj-y += analogix/ > > obj-y += synopsys/ > With this change we will always visit analogix/ > which will trigger build of too much i think. > Use: > obj-$(CONFIG_ANALOGIX_ANX7625) += analogix/ > like the other drivers do, if for nothing else then for consistency. I noticed that, the latest kernel used "obj-y += analogix/" > > > diff --git a/drivers/gpu/drm/bridge/analogix/Kconfig b/drivers/gpu/drm/bridge/analogix/Kconfig > > index e930ff9..b2f127e 100644 > > --- a/drivers/gpu/drm/bridge/analogix/Kconfig > > +++ b/drivers/gpu/drm/bridge/analogix/Kconfig > > @@ -2,3 +2,9 @@ > > config DRM_ANALOGIX_DP > > tristate > > depends on DRM > > + > > +config ANALOGIX_ANX7625 > > + tristate "Analogix MIPI to DP interface support" > > + help > > + ANX7625 is an ultra-low power 4K mobile HD transmitter designed > > + for portable devices. It converts MIPI/DPI to DisplayPort1.3 4K. > > diff --git a/drivers/gpu/drm/bridge/analogix/Makefile b/drivers/gpu/drm/bridge/analogix/Makefile > > index fdbf3fd..8a52867 100644 > > --- a/drivers/gpu/drm/bridge/analogix/Makefile > > +++ b/drivers/gpu/drm/bridge/analogix/Makefile > > @@ -1,3 +1,4 @@ > > # SPDX-License-Identifier: GPL-2.0-only > > +obj-$(CONFIG_ANALOGIX_ANX7625) += anx7625.o > > analogix_dp-objs := analogix_dp_core.o analogix_dp_reg.o > > obj-$(CONFIG_DRM_ANALOGIX_DP) += analogix_dp.o > > diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c > > new file mode 100644 > > index 0000000..fff7a49 > > --- /dev/null > > +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c > > @@ -0,0 +1,2158 @@ > > +// SPDX-License-Identifier: GPL-2.0-only > > +/* > > + * Copyright(c) 2016, Analogix Semiconductor. All rights reserved. > 2020? OK > > > + * > > + */ > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > + > > +#include > > +#include > > +#include > > + > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > +#include > > + > > +#include