From: Tomasz Figa <t.figa@samsung.com>
To: Marcus Lorentzon <marcus.xm.lorentzon@stericsson.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
"linux-fbdev@vger.kernel.org" <linux-fbdev@vger.kernel.org>,
Philipp Zabel <p.zabel@pengutronix.de>,
Tom Gall <tom.gall@linaro.org>,
Ragesh Radhakrishnan <Ragesh.R@linaro.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
Rob Clark <rob.clark@linaro.org>,
Kyungmin Park <kyungmin.park@samsung.com>,
Tomi Valkeinen <tomi.valkeinen@ti.com>,
sunil joshi <joshi@samsung.com>,
Benjamin Gaignard <benjamin.gaignard@linaro.org>,
Bryan Wu <bryan.wu@canonical.com>,
Maxime Ripard <maxime.ripard@free-electrons.com>,
Vikas Sajjan <vikas.sajjan@linaro.org>,
Sumit Semwal <sumit.semwal@linaro.org>,
Sebastien Guiriec <s-guiriec@ti.com>,
"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>
Subject: Re: [RFC v2 0/5] Common Display Framework
Date: Tue, 08 Jan 2013 16:36:39 +0000 [thread overview]
Message-ID: <1987992.4TmVjQaiLj@amdc1227> (raw)
In-Reply-To: <50EBF10A.7080906@stericsson.com>
On Tuesday 08 of January 2013 11:12:26 Marcus Lorentzon wrote:
> On 01/08/2013 09:18 AM, Laurent Pinchart wrote:
> > On Thursday 27 December 2012 15:43:34 Tomasz Figa wrote:
> >> > On Monday 24 of December 2012 15:12:28 Laurent Pinchart wrote:
> >>> > > 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.
> >
> > No worries. I was particularly interested in the DSI operations you
> > needed to export, they seem pretty simple. Thank you for sharing the
> > code.
> FYI,
> here is STE "DSI API":
> http://www.igloocommunity.org/gitweb/?p=kernel/igloo-kernel.git;a=blob;f
> =include/video/mcde.h;hI9ce5cfecc9ad77593e761cdcc1624502f28432;hb=HEAD
> #l361
>
> But it is not perfect. After a couple of products we realized that most
> panel drivers want an easy way to send a bunch of init commands in one
> go. So I think it should be an op for sending an array of commands at
> once. Something like
>
> struct dsi_cmd {
> enum mipi_pkt_type type; /* MIPI DSI, DCS, SetPacketLen, ... */
> u8 cmd;
> int dataLen;
> u8 *data;
> }
> struct dsi_ops {
> int dsi_write(source, int num_cmds, struct dsi_cmd *cmds);
> ...
> }
Yes, this should be flexible enough to cover most of (or even whole) DSI
specification.
However I'm not sure whether the dsi_write name would be appropriate,
since DSI packet types include also read and special transactions. So,
according to DSI terminology, maybe dsi_transaction would be better?
>
> The rest of "DSI write API" could be made helpers on top of this one op.
> This grouping also allows driver to describe intent to send a bunch of
> commands together which might be of interest with mode set (if you need
> to synchronize a bunch of commands with a mode set, like setting smart
> panel rotation in synch with new framebuffer in dsi video mode).
>
> I also looked at the video source in Tomi's git tree
> (http://gitorious.org/linux-omap-dss2/linux/blobs/work/dss-dev-model-cdf
> /include/video/display.h). I think I would prefer a single "setup" op
> taking a "struct dsi_config" as argument. Then each DSI
> formatter/encoder driver could decide best way to set that up. We have
> something similar at
> http://www.igloocommunity.org/gitweb/?p=kernel/igloo-kernel.git;a=blob;f
> =include/video/mcde.h;hI9ce5cfecc9ad77593e761cdcc1624502f28432;hb=HEAD
> #l118
Yes, this would be definitely better, because such configuration changes
usually come together (i.e. display connected, which needs complete
reconfiguration of all parameters).
> And I think I still prefer the dsi_bus in favor of the abstract video
> source. It just looks like a home made bus with bus-ops ... can't you do
> something similar using the normal driver framework? enable/disable
> looks like suspend/resume, register/unregister_vid_src is like
> bus_(un)register_device, ... the video source anyway seems unattached
> to the panel stuff with the find_video_source call.
DSI needs specific power management. It's necessary to power up the panel
first to make it wait for Tinit event and then enable DSI master to
trigger such event. Only then rest of panel initialization can be
completed.
Also, as discussed in previous posts, some panels might use DSI only for
video data and another interface (I2C, SPI) for control data. In such case
it would be impossible to represent such device in a reasonable way using
current driver model.
Best regards,
--
Tomasz Figa
Samsung Poland R&D Center
SW Solution Development, Linux Platform
next prev parent reply other threads:[~2013-01-08 16:36 UTC|newest]
Thread overview: 78+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-22 21:45 [RFC v2 0/5] Common Display Framework Laurent Pinchart
2012-11-22 21:45 ` [RFC v2 1/5] video: Add generic display entity core Laurent Pinchart
2012-11-27 13:07 ` Tomi Valkeinen
2012-11-22 21:45 ` [RFC v2 2/5] video: panel: Add DPI panel support Laurent Pinchart
2012-11-27 13:02 ` Tomi Valkeinen
2012-11-30 9:26 ` Philipp Zabel
2012-11-22 21:45 ` [RFC v2 3/5] video: display: Add MIPI DBI bus support Laurent Pinchart
2012-11-30 12:02 ` Tomi Valkeinen
2012-11-22 21:45 ` [RFC v2 4/5] video: panel: Add R61505 panel support Laurent Pinchart
2012-11-22 21:45 ` [RFC v2 5/5] video: panel: Add R61517 " Laurent Pinchart
2012-11-23 14:51 ` [RFC v2 0/5] Common Display Framework Tomi Valkeinen
2012-12-17 14:36 ` Laurent Pinchart
2012-12-17 15:29 ` Tomi Valkeinen
2012-12-17 23:18 ` Laurent Pinchart
2012-12-17 16:53 ` Jani Nikula
2012-12-17 22:19 ` Laurent Pinchart
2012-12-19 14:57 ` Jani Nikula
2012-12-19 15:07 ` Tomi Valkeinen
2012-12-24 17:31 ` Laurent Pinchart
2012-12-19 15:26 ` Rob Clark
2012-12-19 15:37 ` Tomi Valkeinen
2012-12-19 16:05 ` Rob Clark
2012-12-24 17:40 ` Laurent Pinchart
2012-12-24 17:35 ` Laurent Pinchart
2012-12-27 16:10 ` Rob Clark
2012-12-24 17:27 ` Laurent Pinchart
2012-12-27 16:04 ` Rob Clark
2012-12-27 19:19 ` Sascha Hauer
2012-11-23 19:56 ` Thierry Reding
2012-11-24 7:15 ` Tomi Valkeinen
2012-11-26 14:47 ` Alan Cox
2012-12-17 15:15 ` Laurent Pinchart
2012-11-26 7:53 ` Philipp Zabel
2012-12-17 14:58 ` Laurent Pinchart
2012-11-23 21:41 ` Sascha Hauer
2012-12-17 15:02 ` Laurent Pinchart
2012-12-18 5:04 ` Dave Airlie
2012-12-18 6:21 ` Rob Clark
2012-12-18 8:30 ` Daniel Vetter
2012-12-24 13:39 ` Laurent Pinchart
[not found] ` <CAAQKjZMt+13oooEw39mOM1rF2=ss4ih1s7iVS362di-50h4+Hg@mail.gmail.com>
2012-12-19 20:13 ` Stéphane Marchesin
2012-12-24 14:08 ` Laurent Pinchart
2012-12-18 10:59 ` Sylwester Nawrocki
2012-12-24 17:19 ` Laurent Pinchart
2012-12-19 20:05 ` Stéphane Marchesin
2012-12-24 13:37 ` Laurent Pinchart
2012-12-27 15:54 ` Rob Clark
2012-12-27 19:18 ` Sascha Hauer
2012-12-27 19:57 ` Rob Clark
2012-12-28 0:04 ` Sascha Hauer
2013-01-08 8:33 ` Laurent Pinchart
2013-01-08 8:25 ` Laurent Pinchart
2013-01-08 16:13 ` Rob Clark
2013-01-09 8:35 ` Rahul Sharma
2013-02-01 23:42 ` Laurent Pinchart
2013-02-02 10:08 ` Rob Clark
2012-12-18 10:39 ` Marcus Lorentzon
2012-12-24 17:09 ` Laurent Pinchart
2012-12-27 15:57 ` Rob Clark
2013-01-06 17:46 ` Daniel Vetter
2013-01-08 8:41 ` Laurent Pinchart
2012-12-24 13:24 ` Laurent Pinchart
[not found] ` <CAD025yS5rGMbiRBdDxv=YLP6_fsQndAkr+3t29_mNhcvow_SwA@mail.gmail.com>
[not found] ` <3133576.BkqAl7V01U@avalon>
[not found] ` <CAD025yQoCiNaKvaCwvUWhk_jV70CPhV35UzV9MR6HtE+1baCxg@mail.gmail.com>
2012-12-18 6:25 ` Vikas Sajjan
2012-12-21 10:00 ` Tomasz Figa
2012-12-24 14:12 ` Laurent Pinchart
2012-12-27 14:43 ` Tomasz Figa
2012-12-28 3:38 ` Vikas Sajjan
2013-01-08 8:18 ` Laurent Pinchart
2013-01-08 10:12 ` Marcus Lorentzon
2013-01-08 16:36 ` Tomasz Figa [this message]
2013-01-08 17:08 ` Marcus Lorentzon
2013-02-01 23:35 ` Laurent Pinchart
2013-02-04 10:05 ` Marcus Lorentzon
2013-02-06 9:52 ` Archit Taneja
2013-02-08 10:51 ` Tomi Valkeinen
2013-02-08 12:43 ` Marcus Lorentzon
2013-02-01 23:37 ` Laurent Pinchart
2012-12-24 12:59 ` Laurent Pinchart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1987992.4TmVjQaiLj@amdc1227 \
--to=t.figa@samsung.com \
--cc=Ragesh.R@linaro.org \
--cc=benjamin.gaignard@linaro.org \
--cc=bryan.wu@canonical.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=joshi@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=marcus.xm.lorentzon@stericsson.com \
--cc=maxime.ripard@free-electrons.com \
--cc=p.zabel@pengutronix.de \
--cc=rob.clark@linaro.org \
--cc=s-guiriec@ti.com \
--cc=sumit.semwal@linaro.org \
--cc=thomas.petazzoni@free-electrons.com \
--cc=tom.gall@linaro.org \
--cc=tomi.valkeinen@ti.com \
--cc=vikas.sajjan@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).