From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tomasz Figa Date: Thu, 27 Dec 2012 14:43:34 +0000 Subject: Re: [RFC v2 0/5] Common Display Framework Message-Id: <2529718.glQX8guWfJ@amdc1227> List-Id: References: <1353620736-6517-1-git-send-email-laurent.pinchart@ideasonboard.com> <7255068.DBf2OgseHL@amdc1227> <3445117.L94DmxEvrl@avalon> In-Reply-To: <3445117.L94DmxEvrl@avalon> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: Laurent Pinchart Cc: dri-devel@lists.freedesktop.org, Vikas Sajjan , Thomas Petazzoni , linux-fbdev@vger.kernel.org, Benjamin Gaignard , Tom Gall , Kyungmin Park , Rob Clark , Ragesh Radhakrishnan , Tomi Valkeinen , Philipp Zabel , Bryan Wu , Maxime Ripard , sunil joshi , Sumit Semwal , Sebastien Guiriec , linux-media@vger.kernel.org Hi Laurent, On Monday 24 of December 2012 15:12:28 Laurent Pinchart wrote: > Hi Tomasz, >=20 > On Friday 21 December 2012 11:00:52 Tomasz Figa wrote: > > On Tuesday 18 of December 2012 08:31:30 Vikas Sajjan wrote: > > > On 17 December 2012 20:55, Laurent Pinchart wrote: > > > > Hi Vikas, > > > >=20 > > > > Sorry for the late reply. I now have more time to work on CDF, so > > > > delays should be much shorter. > > > >=20 > > > > On Thursday 06 December 2012 10:51:15 Vikas Sajjan wrote: > > > > > Hi Laurent, > > > > >=20 > > > > > I was thinking of porting CDF to samsung EXYNOS 5250 platform, > > > > > what > > > > > I found is that, the exynos display controller is MIPI DSI based > > > > > controller. > > > > >=20 > > > > > But if I look at CDF patches, it has only support for MIPI DBI > > > > > based > > > > > Display controller. > > > > >=20 > > > > > So my question is, do we have any generic framework for MIPI DSI > > > > > based display controller? basically I wanted to know, how to go > > > > > about > > > > > porting CDF for such kind of display controller. > > > >=20 > > > > MIPI DSI support is not available yet. The only reason for that is > > > > that I don't have any MIPI DSI hardware to write and test the code > > > > with :-) > > > >=20 > > > > The common display framework should definitely support MIPI DSI. I > > > > think the existing MIPI DBI code could be used as a base, so the > > > > implementation shouldn't be too high. > > > >=20 > > > > Yeah, i was also thinking in similar lines, below is my though for > > > > MIPI DSI support in CDF. > > >=20 > > > o MIPI DSI support as part of CDF framework will expose > > > =A7 mipi_dsi_register_device(mpi_device) (will be called > > > mach-xxx-dt.c > > > file ) > > > =A7 mipi_dsi_register_driver(mipi_driver, bus ops) (will be called > > > from > > > platform specific init driver call ) > > > =B7 bus ops will be > > > o read data > > > o write data > > > o write command > > > =A7 MIPI DSI will be registered as bus_register() > > >=20 > > > When MIPI DSI probe is called, it (e.g., Exynos or OMAP MIPI DSI) > > > will > > > initialize the MIPI DSI HW IP. > > >=20 > > > This probe will also parse the DT file for MIPI DSI based panel, add > > > the panel device (device_add() ) to kernel and register the display > > > entity with its control and video ops with CDF. > > >=20 > > > I can give this a try. > >=20 > > I am currently in progress of reworking Exynos MIPI DSIM code and > > s6e8ax0 LCD driver to use the v2 RFC of Common Display Framework. I > > have most of the work done, I have just to solve several remaining > > problems. > Do you already have code that you can publish ? I'm particularly > interested (and I think Tomi Valkeinen would be as well) in looking at > the DSI operations you expose to DSI sinks (panels, transceivers, ...). Well, I'm afraid this might be little below your expectations, but here's=20 an initial RFC of the part defining just the DSI bus. I need a bit more=20 time for patches for Exynos MIPI DSI master and s6e8ax0 LCD. The implementation is very simple and heavily based on your MIPI DBI=20 support and existing Exynos MIPI DSIM framework. Provided operation set is = based on operation set used by Exynos s6e8ax0 LCD driver. Unfortunately=20 this is my only source of information about MIPI DSI. Best regards, --=20 Tomasz Figa Samsung Poland R&D Center SW Solution Development, Linux Platform >From bad07d8bdce0ff76cbc81a9da597c0d01e5244f7 Mon Sep 17 00:00:00 2001 From: Tomasz Figa Date: Thu, 27 Dec 2012 12:36:15 +0100 Subject: [RFC] video: display: Add generic MIPI DSI bus Signed-off-by: Tomasz Figa --- drivers/video/display/Kconfig | 4 + drivers/video/display/Makefile | 1 + drivers/video/display/mipi-dsi-bus.c | 214=20 +++++++++++++++++++++++++++++++++++ include/video/display.h | 1 + include/video/mipi-dsi-bus.h | 98 ++++++++++++++++ 5 files changed, 318 insertions(+) create mode 100644 drivers/video/display/mipi-dsi-bus.c create mode 100644 include/video/mipi-dsi-bus.h diff --git a/drivers/video/display/Kconfig b/drivers/video/display/Kconfig index 13b6aaf..dbaff9d 100644 --- a/drivers/video/display/Kconfig +++ b/drivers/video/display/Kconfig @@ -9,6 +9,10 @@ config DISPLAY_MIPI_DBI tristate default n =20 +config DISPLAY_MIPI_DSI + tristate + default n + config DISPLAY_PANEL_DPI tristate "DPI (Parallel) Display Panels" ---help--- diff --git a/drivers/video/display/Makefile=20 b/drivers/video/display/Makefile index 482bec7..429b3ac8 100644 --- a/drivers/video/display/Makefile +++ b/drivers/video/display/Makefile @@ -1,5 +1,6 @@ obj-$(CONFIG_DISPLAY_CORE) +=3D display-core.o obj-$(CONFIG_DISPLAY_MIPI_DBI) +=3D mipi-dbi-bus.o +obj-$(CONFIG_DISPLAY_MIPI_DSI) +=3D mipi-dsi-bus.o obj-$(CONFIG_DISPLAY_PANEL_DPI) +=3D panel-dpi.o obj-$(CONFIG_DISPLAY_PANEL_R61505) +=3D panel-r61505.o obj-$(CONFIG_DISPLAY_PANEL_R61517) +=3D panel-r61517.o diff --git a/drivers/video/display/mipi-dsi-bus.c=20 b/drivers/video/display/mipi-dsi-bus.c new file mode 100644 index 0000000..2998522 --- /dev/null +++ b/drivers/video/display/mipi-dsi-bus.c @@ -0,0 +1,214 @@ +/* + * MIPI DSI Bus + * + * Copyright (C) 2012 Samsung Electronics Co., Ltd. + * Contacts: Tomasz Figa + * + * Heavily based ond mipi-dbi-bus.c. + * + * 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. + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include