Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1851338ybt; Sun, 21 Jun 2020 01:11:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+skYAJWznkzAs/UOnbTYDK1LfmKXvsuGZDAsXK1/42BEqXlPwXXsYYvdYAv9ZxYTuVHoj X-Received: by 2002:aa7:cc19:: with SMTP id q25mr11230651edt.26.1592727119406; Sun, 21 Jun 2020 01:11:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592727119; cv=none; d=google.com; s=arc-20160816; b=vM0WeyPmjZG3AKVCl+2LFeFPS6v96AX1vEK3zI+/mkjU6P1D6oaya2GT/ZYfnspAWC FCOJypNT36TKY+w8wdJbRvFkbsm+T6NymVJB53xi5Ji9JcXGzPIP5ouxxk4EUFwEBxr7 CGAYZjte+U/zPypUOhFpdsj5Iyuj8/uvF2ssMQTC7zqc3xMCP+1+S05Bp+DJGB+sz49z ZWtypqGyEsInOxHt1Z8vGs19SnzMX+/qnnG0KrL/wsZKoU9bVsdr+2wd2CZfEmP6/7oQ HUmQ8C8zYO+CPUw5BqMlRbgjcp4AHdqyY4tBpzw3eb/zFNIEcdvV9xJZeO3x1dR1vP78 D/RQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=2EoPF5AbDDPFYfxOviZr+Nz+atonilZtT2+br1iGi2E=; b=IoX7XR39J8Fpt2NRzWiUqvBs7WzYi9/dHstqg22cnRMOsst1Lt4Qetx67ODmHIAYkg N3ZIp9XiWU3pfJfrPgfrJFkAK8gwc/4JPqpXafv1aeGGkqIjE2KFMxB9Ks018hDhSKnt 8OJURIkJPEJS+/dOjv/rqxcS3zNCjkJstISNWck4m441bn6Q5rJjNYZDuZkhvy26AZPt 0/da9HHVDA/eIJfHYF5+OVDqPCSg9r6MrCXL/U7PGNgoh6B5a8U09OtuZEHzrHDTeV0h DTOtALrCg3vnxDfPZyD7bO12sGaHglbM6zyrBkGobNsT5ivLQvJAAG1bRfpYqDsVqnjr vJdw== ARC-Authentication-Results: i=1; mx.google.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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q26si333532eja.585.2020.06.21.01.11.35; Sun, 21 Jun 2020 01:11: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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729477AbgFUIJr (ORCPT + 99 others); Sun, 21 Jun 2020 04:09:47 -0400 Received: from asavdk3.altibox.net ([109.247.116.14]:56310 "EHLO asavdk3.altibox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729443AbgFUIJq (ORCPT ); Sun, 21 Jun 2020 04:09:46 -0400 Received: from ravnborg.org (unknown [188.228.123.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by asavdk3.altibox.net (Postfix) with ESMTPS id 2DDBB20026; Sun, 21 Jun 2020 10:09:26 +0200 (CEST) Date: Sun, 21 Jun 2020 10:09:25 +0200 From: Sam Ravnborg To: Xin Ji Cc: devel@driverdev.osuosl.org, Laurent Pinchart , Andrzej Hajda , Nicolas Boichat , Jernej Skrabec , Nicolas Boichat , Pi-Hsun Shih , Jonas Karlman , David Airlie , Shawn Ku , Neil Armstrong , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Sheng Pan , Hsin-Yi Wang , Dan Carpenter Subject: Re: [PATCH v13 2/2] drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP Message-ID: <20200621080925.GH74146@ravnborg.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=edQTgYMH c=1 sm=1 tr=0 a=S6zTFyMACwkrwXSdXUNehg==:117 a=S6zTFyMACwkrwXSdXUNehg==:17 a=kj9zAlcOel0A:10 a=bbNUuHX0AAAA:8 a=e5mUnYsNAAAA:8 a=WuTIMwpaZP_gVESzas0A:9 a=Uh4VTly-S2yuYZWg:21 a=te-yXDEZyxPkjRxM:21 a=CjuIK1q_8ugA:10 a=3b-t3vAtY4IUXy2q2Ylb:22 a=Vxmtnl_E_bksehYqCbjh:22 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Xin. On Tue, Jun 09, 2020 at 03:19:50PM +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. > > Signed-off-by: Xin Ji The bridge driver now implements the bridge functions for get_edid + detect which is good. But the bridge driver also needs to check the flags argument of anx7625_bridge_attach() so the connector creation is optional. This is required to prepare the bridge driver to fully support a chain of bridges and is mandatory for new bridge drivers. Futhermore the bridge driver needs to be converted to use the bridge panel. See what other bridge drivers do. In short - the drm_panel shall be replaced by a bridge in your platform data structure. Usual this end up in less code after the conversion. Sam > --- > drivers/gpu/drm/bridge/analogix/Kconfig | 9 + > drivers/gpu/drm/bridge/analogix/Makefile | 1 + > drivers/gpu/drm/bridge/analogix/anx7625.c | 1999 +++++++++++++++++++++++++++++ > drivers/gpu/drm/bridge/analogix/anx7625.h | 397 ++++++ > 4 files changed, 2406 insertions(+) > 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/analogix/Kconfig b/drivers/gpu/drm/bridge/analogix/Kconfig > index e1fa7d8..024ea2a 100644 > --- a/drivers/gpu/drm/bridge/analogix/Kconfig > +++ b/drivers/gpu/drm/bridge/analogix/Kconfig > @@ -25,3 +25,12 @@ config DRM_ANALOGIX_ANX78XX > config DRM_ANALOGIX_DP > tristate > depends on DRM > + > +config DRM_ANALOGIX_ANX7625 > + tristate "Analogix Anx7625 MIPI to DP interface support" > + depends on DRM > + depends on OF > + 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 97669b3..44da392 100644 > --- a/drivers/gpu/drm/bridge/analogix/Makefile > +++ b/drivers/gpu/drm/bridge/analogix/Makefile > @@ -1,5 +1,6 @@ > # SPDX-License-Identifier: GPL-2.0-only > analogix_dp-objs := analogix_dp_core.o analogix_dp_reg.o analogix-i2c-dptx.o > obj-$(CONFIG_DRM_ANALOGIX_ANX6345) += analogix-anx6345.o > +obj-$(CONFIG_DRM_ANALOGIX_ANX7625) += anx7625.o > obj-$(CONFIG_DRM_ANALOGIX_ANX78XX) += analogix-anx78xx.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..db37f68 > --- /dev/null > +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c > @@ -0,0 +1,1999 @@ > +// SPDX-License-Identifier: GPL-2.0-only > +/* > + * Copyright(c) 2020, 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