From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrzej Hajda Subject: Re: [PATCH v3 1/2] drm/bridge: Add Cadence DSI driver Date: Fri, 01 Sep 2017 09:51:59 +0200 Message-ID: <6404fb07-9c42-78bf-f76e-e7aa1abf5549@samsung.com> References: <20170831155519.3704-1-boris.brezillon@free-electrons.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Return-path: In-reply-to: <20170831155519.3704-1-boris.brezillon-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> Content-language: en-US Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Boris Brezillon , David Airlie , Daniel Vetter , dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org, Archit Taneja Cc: Mark Rutland , devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Cyprian Wronka , Thomas Petazzoni , Pawel Moll , Ian Campbell , Simon Hatliff , Tomi Valkeinen , Jyri Sarha , Alan Douglas , Rob Herring , Kumar Gala , Maxime Ripard , Richard Sproul , Neil Webb List-Id: devicetree@vger.kernel.org On 31.08.2017 17:55, Boris Brezillon wrote: > Add a driver for Cadence DPI -> DSI bridge. > > This driver only support a subset of Cadence DSI bridge capabilities. > > Here is a non-exhaustive list of missing features: > * burst mode > * dynamic configuration of the DPHY based on the > * support for additional input interfaces (SDI input) > > Signed-off-by: Boris Brezillon > --- > Changes in v3: > - replace magic values by real timing calculation. The DPHY PLL clock > is still hardcoded since we don't have a working DPHY block yet, and > this is the piece of HW we need to dynamically configure the PLL > rate based on the display refresh rate and the resolution. > - parse DSI devices represented with the OF-graph. This is needed to > support DSI devices controlled through an external bus like I2C or > SPI. > - use the DRM panel-bridge infrastructure to simplify the DRM panel > logic > > Changes in v2: > - rebase on v4.12-rc1 and adapt to driver to the drm_bridge API changes > - return the correct error when devm_clk_get(sysclk) fails > - add missing depends on OF and select DRM_PANEL in the Kconfig entry > --- > drivers/gpu/drm/bridge/Kconfig | 9 + > drivers/gpu/drm/bridge/Makefile | 1 + > drivers/gpu/drm/bridge/cdns-dsi.c | 1090 +++++++++++++++++++++++++++++++++++++ > 3 files changed, 1100 insertions(+) > create mode 100644 drivers/gpu/drm/bridge/cdns-dsi.c > > diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig > index adf9ae0e0b7c..88c324b12e16 100644 > --- a/drivers/gpu/drm/bridge/Kconfig > +++ b/drivers/gpu/drm/bridge/Kconfig > @@ -25,6 +25,15 @@ config DRM_ANALOGIX_ANX78XX > the HDMI output of an application processor to MyDP > or DisplayPort. > > +config DRM_CDNS_DSI > + tristate "Cadence DPI/DSI bridge" > + select DRM_KMS_HELPER > + select DRM_MIPI_DSI > + select DRM_PANEL what about: select DRM_PANEL_BRIDGE > + depends on OF > + help > + Support Cadence DPI to DSI bridge. > + > config DRM_DUMB_VGA_DAC > tristate "Dumb VGA DAC Bridge support" > depends on OF > diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridge/Makefile > index defcf1e7ca1c..77b65e8ecf59 100644 > --- a/drivers/gpu/drm/bridge/Makefile > +++ b/drivers/gpu/drm/bridge/Makefile > @@ -1,4 +1,5 @@ > obj-$(CONFIG_DRM_ANALOGIX_ANX78XX) += analogix-anx78xx.o > +obj-$(CONFIG_DRM_CDNS_DSI) += cdns-dsi.o > obj-$(CONFIG_DRM_DUMB_VGA_DAC) += dumb-vga-dac.o > obj-$(CONFIG_DRM_LVDS_ENCODER) += lvds-encoder.o > obj-$(CONFIG_DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW) += megachips-stdpxxxx-ge-b850v3-fw.o > diff --git a/drivers/gpu/drm/bridge/cdns-dsi.c b/drivers/gpu/drm/bridge/cdns-dsi.c > new file mode 100644 > index 000000000000..f5dc26c90b20 > --- /dev/null > +++ b/drivers/gpu/drm/bridge/cdns-dsi.c > @@ -0,0 +1,1090 @@ > +/* > + * Copyright: 2017 Cadence Design Systems, Inc. > + * > + * Author: Boris Brezillon > + * > + * This program is free software; you can redistribute it and/or modify it > + * under the terms of the GNU General Public License version 2 as published by > + * the Free Software Foundation. > + * > + * This program is distributed in the hope that it will be useful, but WITHOUT > + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or > + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for > + * more details. > + * > + * You should have received a copy of the GNU General Public License along with > + * this program. If not, see . > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include