Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1775718ybp; Wed, 9 Oct 2019 20:20:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqytFkcLlHaBTFUC+GRJ5YLvdBr18UWx6wwu5EvOgRQJtnOxSv/zFnzwTuFDWY92sjM6pxQE X-Received: by 2002:a17:906:b245:: with SMTP id ce5mr5976312ejb.52.1570677645281; Wed, 09 Oct 2019 20:20:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1570677645; cv=pass; d=google.com; s=arc-20160816; b=aRTzh6M4/56W/LPjGrmrEihp37879Me4V4OIMSbRYYOvRpiwZ0OxleS+tsBqnhShrg HImS6Zc0Ij0OvhhE5xx8S+oIEimd/53iaoY6hN9fJLfGXG289ZLrvdcBm5+LsMFYixJz uLPrrEt3YwZM3IQrPRT+TbwgLqu5d9vm0TddBG/xNvJwaAAo+E/g5+JzEqwudxQIR8qK 8jfXtpL//cF8IoygxLUPAGOIjSsorONPs/xFoDmc3wXKGIjSAq2CKBgiyy1G4RJZWq6M QkE/jH57NGSZNh3E+uXGGnZveD1pHwFSKJzQysFf65Xx+NWqIguryObfsGuDmZPdTGT9 UaHw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=1k/h9x6BMxzo8Eu/CIuJyI6dedAQXn9XD490CAdTSXs=; b=udLAVpiHSMXBkd+yQC6poa+TomkSyPyRN4RTV/1uv6BJXRPINuWLTSOcykinveoSVo 3NZFUcFLLsnbazoMXEfhWlAREf2AqL4BtjwUsrbdd7dd9kgHO7o9ZAvNzma6UzCpluoA 5LWlGp7TcNJVbY6Ix5QQk/1A6lhEaGpfMoDNkSLPn6M1dMdfbR2ZQXiVxjrhzjhe+OjX LgAQPKv2C5rHlSL9UU4cT6gJKZdPhf1mLlF1JUQyitd6zGnQPN2//DKnGdo3QngFLHQR M77XcyUPWcs0rpp0Xat5wjmzpM5cU27h9tLy1YNX0I3j7wYmOIsCoEER5oRgIV12bTuW kfmg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Analogixsemi.onmicrosoft.com header.s=selector2-Analogixsemi-onmicrosoft-com header.b="Nh/uND/H"; arc=pass (i=1 spf=pass spfdomain=analogixsemi.com dkim=pass dkdomain=analogixsemi.com dmarc=pass fromdomain=analogixsemi.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id w10si2433687edv.21.2019.10.09.20.20.20; Wed, 09 Oct 2019 20:20:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@Analogixsemi.onmicrosoft.com header.s=selector2-Analogixsemi-onmicrosoft-com header.b="Nh/uND/H"; arc=pass (i=1 spf=pass spfdomain=analogixsemi.com dkim=pass dkdomain=analogixsemi.com dmarc=pass fromdomain=analogixsemi.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1732735AbfJJDTr (ORCPT + 99 others); Wed, 9 Oct 2019 23:19:47 -0400 Received: from mail-eopbgr780112.outbound.protection.outlook.com ([40.107.78.112]:21339 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726621AbfJJDTo (ORCPT ); Wed, 9 Oct 2019 23:19:44 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TLNvOmcAXu1BVyj78ubiHSrZjwWfI82WH9qy1Kv9RsY1k40ih2v0ftOQFk18OkkPvvUXhC+E46kchCEeI1GYVhiRBB9oHA4s48IjqEU/hv2uO/JfNXPI/5aX6iTQUlbE+Ycv63SIeG2Zy8eSljUvVB1X0J4xTVtUNpyzeucFXRmqf5bJ43aQikRQT50SANyMsnqmUbxuiKAbhjUHauiQAyWDq8OH6TrJIal7w8LUBCl8ElnwnkKFF9FXqmgxHrqxeK4PHmCR686gKJhwQ4uk42oaAWRQjNx1C3DNHqFay4SY+ZocD4EUhQ6+XiERH4cyY6PBZKLsh8www3BBYGfU9w== 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=1k/h9x6BMxzo8Eu/CIuJyI6dedAQXn9XD490CAdTSXs=; b=F3PIOLNbvyvYxyslDGYqANsvpgwMUohjxeRTB8JbVLy4wwEZ10UBwijM6xpz8ivjbyXhbpJV012Wih3cVyD0YxmF5ar8MevL3GKEJrUV747qgms7ITaaKp9LXNZCz/a+5CKxazR9lxpSce9I1Zjtjhk29bVbZFXT1KadA59Rwzh57GmfbFIMown96hdcP07DrSqJ8cjgV7Yw2TKLlr6zKRBVDcJDWieB82qIAm3v5Gj0hOwnyYp7btXW4E77FqscOg6NG3oZyZniJi2C0f+zp4CHw30eYWJKiiDO3NSvJJiYPIVYUMPsBzMO4kMBz0ZAcfQzdJVeplBu/4M7BHNbLQ== 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=1k/h9x6BMxzo8Eu/CIuJyI6dedAQXn9XD490CAdTSXs=; b=Nh/uND/HDBb7n2vTasNXLTHvAvXc7aRkJwpDAKNIGHhG+FP3JpomGzBvOJ0xGAXIwFgIxuzYinflaz2uI+dQTvRJGvpS3kyj2AXMmfR1ZK1EeCcTaTskUqRV+YjvuEY4F9Xn33qGXfMww2vadnd/k8NZ6TlN2SNKvbLydnMLIJg= Received: from SN6PR04MB4543.namprd04.prod.outlook.com (52.135.120.29) by SN6PR04MB3806.namprd04.prod.outlook.com (52.135.81.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2327.24; Thu, 10 Oct 2019 03:19:34 +0000 Received: from SN6PR04MB4543.namprd04.prod.outlook.com ([fe80::c55e:6c70:adbb:cf87]) by SN6PR04MB4543.namprd04.prod.outlook.com ([fe80::c55e:6c70:adbb:cf87%5]) with mapi id 15.20.2347.016; Thu, 10 Oct 2019 03:19:33 +0000 From: Xin Ji To: Dan Carpenter 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" , Sheng Pan Subject: Re: [PATCH v2 2/2] drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP bridge driver Thread-Topic: [PATCH v2 2/2] drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP bridge driver Thread-Index: AQHVfoPZsDTKCGgGvEaBZzoEPcILl6dSLOMAgAEJG4A= Date: Thu, 10 Oct 2019 03:19:32 +0000 Message-ID: <20191010031922.GA10005@xin-VirtualBox> References: <6ad16e52cd7591d320001a842fc357d976006ef7.1570588741.git.xji@analogixsemi.com> <20191009113032.GL25098@kadam> In-Reply-To: <20191009113032.GL25098@kadam> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HK0P153CA0031.APCP153.PROD.OUTLOOK.COM (2603:1096:203:17::19) To SN6PR04MB4543.namprd04.prod.outlook.com (2603:10b6:805:a8::29) authentication-results: spf=none (sender IP is ) smtp.mailfrom=xji@analogixsemi.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [114.247.245.252] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 813e5d9c-f190-4089-9989-08d74d30aa9e x-ms-traffictypediagnostic: SN6PR04MB3806: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1728; x-forefront-prvs: 018632C080 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(7916004)(366004)(136003)(346002)(376002)(39850400004)(396003)(189003)(199004)(66066001)(66556008)(66476007)(66446008)(4326008)(66946007)(64756008)(14444005)(7736002)(33716001)(5024004)(2906002)(6246003)(107886003)(71200400001)(71190400001)(5660300002)(6116002)(256004)(3846002)(1076003)(561924002)(30864003)(86362001)(6916009)(25786009)(7416002)(386003)(8936002)(76176011)(6512007)(6506007)(446003)(26005)(9686003)(186003)(102836004)(99286004)(486006)(229853002)(6486002)(52116002)(6436002)(11346002)(476003)(316002)(54906003)(33656002)(14454004)(478600001)(81156014)(81166006)(8676002)(305945005)(559001)(569006);DIR:OUT;SFP:1102;SCL:1;SRVR:SN6PR04MB3806;H:SN6PR04MB4543.namprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: analogixsemi.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: jPRw3s2/za78dMBVy50lC0QHggIS99Gq5WLrrtXE5a2d+O5cyrY4S+s916ItrNheDjRJvXEDnoFHWVj63AExcgOGp8IfFfF7URJ5SgqOlqq3fPjmhJ8gIO6SUWNshi96M7K9tNR++yoyyOXFQhKmTPZZqEXQfXbG7Wk3WrOiOtZv/iAmLLoB2vq7fYK/QIrGSLEJGdYhPI4feboEIzyHZGzJRyUHXvkpRZZXYCrj1RnSsAWqiaOLU60jhWw6sXt5RKnxGvoF2hIjguZ+ecRonOzhVvAIzaM6S5E+5lZRTiy1EAYYaQ3RB9gfgZLY2RgME/Bz1wUF3S7+n/uhm5I9rq+OpnLF8iAjPUQeJFU6oZ6UXu2sk8ZWarPjDJM4BMG6jLAgu6E+l20AUwbKpsWH8I5SKuDNSFKvOnP3RaELrEk= Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: analogixsemi.com X-MS-Exchange-CrossTenant-Network-Message-Id: 813e5d9c-f190-4089-9989-08d74d30aa9e X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Oct 2019 03:19:33.6040 (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: 57zzHSLFhF6pPxNgfKm3ADH8brbMil+/WSf7LqG5He3Ihwp3aS7MASvq12ffDvbqdBi8YFdEHxARUyHQDtNcvQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR04MB3806 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Dan Carpenter, sorry for that, I send the wrong patch, I didn't correctly merge the changed code. Will send the new patch based on your new comments. Thanks, Xin On Wed, Oct 09, 2019 at 02:30:32PM +0300, Dan Carpenter wrote: > Are you sure you sent the correct patch? This has many of the same > style issues I mentioned in the previous email. The error handling > in edid_read() is wrong. probe() will still crash if allocating the > work queue fails. >=20 > On Wed, Oct 09, 2019 at 09:28:02AM +0000, 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. > >=20 > > 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. > >=20 > > 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 | 2132 +++++++++++++++++++++= ++++++++ > > drivers/gpu/drm/bridge/analogix/anx7625.h | 405 ++++++ > > 5 files changed, 2545 insertions(+), 1 deletion(-) > > create mode 100644 drivers/gpu/drm/bridge/analogix/anx7625.c > > create mode 100644 drivers/gpu/drm/bridge/analogix/anx7625.h > >=20 > > diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridge/M= akefile > > index 4934fcf..bcd388a 100644 > > --- a/drivers/gpu/drm/bridge/Makefile > > +++ b/drivers/gpu/drm/bridge/Makefile > > @@ -12,8 +12,8 @@ obj-$(CONFIG_DRM_SII9234) +=3D sii9234.o > > obj-$(CONFIG_DRM_THINE_THC63LVD1024) +=3D thc63lvd1024.o > > obj-$(CONFIG_DRM_TOSHIBA_TC358764) +=3D tc358764.o > > obj-$(CONFIG_DRM_TOSHIBA_TC358767) +=3D tc358767.o > > -obj-$(CONFIG_DRM_ANALOGIX_DP) +=3D analogix/ > > obj-$(CONFIG_DRM_I2C_ADV7511) +=3D adv7511/ > > obj-$(CONFIG_DRM_TI_SN65DSI86) +=3D ti-sn65dsi86.o > > obj-$(CONFIG_DRM_TI_TFP410) +=3D ti-tfp410.o > > +obj-y +=3D analogix/ > > obj-y +=3D synopsys/ > > 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) +=3D anx7625.o > > analogix_dp-objs :=3D analogix_dp_core.o analogix_dp_reg.o > > obj-$(CONFIG_DRM_ANALOGIX_DP) +=3D analogix_dp.o > > diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/dr= m/bridge/analogix/anx7625.c > > new file mode 100644 > > index 0000000..7bb4e17 > > --- /dev/null > > +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c > > @@ -0,0 +1,2132 @@ > > +// SPDX-License-Identifier: GPL-2.0-only > > +/* > > + * Copyright(c) 2016, Analogix Semiconductor. All rights reserved. > > + * > > + */ > > +#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