From patchwork Thu Dec 27 14:43:34 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tomasz Figa X-Patchwork-Id: 1912951 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 81985DF2A2 for ; Thu, 27 Dec 2012 14:44:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5E8E7E6255 for ; Thu, 27 Dec 2012 06:44:10 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by gabe.freedesktop.org (Postfix) with ESMTP id 827BFE6254 for ; Thu, 27 Dec 2012 06:43:39 -0800 (PST) Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MFP006LB28I24T0@mailout1.samsung.com> for dri-devel@lists.freedesktop.org; Thu, 27 Dec 2012 23:43:38 +0900 (KST) X-AuditID: cbfee61a-b7fa66d0000004cf-8f-50dc5e997fc5 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 77.C5.01231.99E5CD05; Thu, 27 Dec 2012 23:43:37 +0900 (KST) Received: from amdc1227.localnet ([106.116.147.199]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MFP00BQY28O6Y30@mmp1.samsung.com> for dri-devel@lists.freedesktop.org; Thu, 27 Dec 2012 23:43:37 +0900 (KST) From: Tomasz Figa To: Laurent Pinchart Subject: Re: [RFC v2 0/5] Common Display Framework Date: Thu, 27 Dec 2012 15:43:34 +0100 Message-id: <2529718.glQX8guWfJ@amdc1227> Organization: Samsung Poland R&D Center User-Agent: KMail/4.9.4 (Linux/3.7.1-gentoo; KDE/4.9.4; x86_64; ; ) In-reply-to: <3445117.L94DmxEvrl@avalon> References: <1353620736-6517-1-git-send-email-laurent.pinchart@ideasonboard.com> <7255068.DBf2OgseHL@amdc1227> <3445117.L94DmxEvrl@avalon> MIME-version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrBLMWRmVeSWpSXmKPExsVy+t9jAd2ZcXcCDJYesrG48vU9mwOjx/3u 40wBjFFcNimpOZllqUX6dglcGZ07JzAV7Kqs+LFtKnMD49rULkZODgkBE4muxzMZIWwxiQv3 1rN1MXJxCAksYpToeTSDBcJZwSQxb9sbZpAqNgE1ic8Nj9hAbBEBC4neRdMZQYqYBdaxSty5 1Qs2SljASOLpqRssIDaLgKrE43M9rCA2r4CmxOpJu8AG8QuoS7zb9pSpi5GDQ1TAWWLqslKQ MKeAhsTXkz+hruhjlDi59S4TRK+gxI/J98BmMgtoSzx5d4EVwtaR6P3+jXkCo+AsJGWzkJTN QlK2gJF5FaNoakFyQXFSeq6hXnFibnFpXrpecn7uJkZweD6T2sG4ssHiEKMAB6MSD6+i9e0A IdbEsuLK3EOMEhzMSiK8Tr53AoR4UxIrq1KL8uOLSnNSiw8xSnOwKInzNnukBAgJpCeWpGan phakFsFkmTg4pRoYp60rP6FlvEJi6vHDDb0zxFZ15F6fZJby9YbPm7AieW/rjkOb14SrPZd+ d5jxMtvU7oiVy1iznwjfXtGy2tThy2StrW1Csfn3e56/y159LnW6Ru+f+TP2WIgmRF754mYp 9H5OwUKbeysrj/s+P7PnqOAu/3IFlko1j4WmPIf4H0s4mf/Zfl16uRJLcUaioRZzUXEiAP0i NvJLAgAA Cc: Thomas Petazzoni , linux-fbdev@vger.kernel.org, Philipp Zabel , Tom Gall , Ragesh Radhakrishnan , dri-devel@lists.freedesktop.org, Rob Clark , Kyungmin Park , Tomi Valkeinen , sunil joshi , Benjamin Gaignard , Bryan Wu , Maxime Ripard , Vikas Sajjan , Sumit Semwal , Sebastien Guiriec , linux-media@vger.kernel.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Hi Laurent, On Monday 24 of December 2012 15:12:28 Laurent Pinchart wrote: > Hi Tomasz, > > 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, > > > > > > > > Sorry for the late reply. I now have more time to work on CDF, so > > > > delays should be much shorter. > > > > > > > > On Thursday 06 December 2012 10:51:15 Vikas Sajjan wrote: > > > > > Hi Laurent, > > > > > > > > > > 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. > > > > > > > > > > But if I look at CDF patches, it has only support for MIPI DBI > > > > > based > > > > > Display controller. > > > > > > > > > > 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. > > > > > > > > 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 :-) > > > > > > > > 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. > > > > > > > > Yeah, i was also thinking in similar lines, below is my though for > > > > MIPI DSI support in CDF. > > > > > > o MIPI DSI support as part of CDF framework will expose > > > § mipi_dsi_register_device(mpi_device) (will be called > > > mach-xxx-dt.c > > > file ) > > > § mipi_dsi_register_driver(mipi_driver, bus ops) (will be called > > > from > > > platform specific init driver call ) > > > · bus ops will be > > > o read data > > > o write data > > > o write command > > > § MIPI DSI will be registered as bus_register() > > > > > > When MIPI DSI probe is called, it (e.g., Exynos or OMAP MIPI DSI) > > > will > > > initialize the MIPI DSI HW IP. > > > > > > 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. > > > > > > I can give this a try. > > > > 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 an initial RFC of the part defining just the DSI bus. I need a bit more time for patches for Exynos MIPI DSI master and s6e8ax0 LCD. The implementation is very simple and heavily based on your MIPI DBI support and existing Exynos MIPI DSIM framework. Provided operation set is based on operation set used by Exynos s6e8ax0 LCD driver. Unfortunately this is my only source of information about MIPI DSI. Best regards, 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 +config DISPLAY_MIPI_DSI + tristate + default n + config DISPLAY_PANEL_DPI tristate "DPI (Parallel) Display Panels" ---help--- diff --git a/drivers/video/display/Makefile 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) += display-core.o obj-$(CONFIG_DISPLAY_MIPI_DBI) += mipi-dbi-bus.o +obj-$(CONFIG_DISPLAY_MIPI_DSI) += mipi-dsi-bus.o obj-$(CONFIG_DISPLAY_PANEL_DPI) += panel-dpi.o obj-$(CONFIG_DISPLAY_PANEL_R61505) += panel-r61505.o obj-$(CONFIG_DISPLAY_PANEL_R61517) += panel-r61517.o diff --git a/drivers/video/display/mipi-dsi-bus.c 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