dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Josef Luštický" <josef@lusticky.cz>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: devicetree <devicetree@vger.kernel.org>,
	Dave Airlie <airlied@linux.ie>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Subject: Re: Controllers with several interface options - one or more drivers?
Date: Mon, 29 Jul 2019 09:19:39 +0200	[thread overview]
Message-ID: <CAMqqaJERwmZj-AX+7HvOOdDob24StxHoeniWOfz9ppUj1uzdZA@mail.gmail.com> (raw)
In-Reply-To: <20190726161403.GA25593@ravnborg.org>

Hello,
I am happy to see this discussion.

I like Noralf's late work to move mipi_dbi to drm/ and remove tinydrm.
This helps to simplify implementation and maintenance of drivers for
displays that conform to MIPI_DBI set of commands,
no matter if they use MIPI_DBI to transfer the image data or not.

There are already MIPI_DBI compliant panels in drm/panel, but until
Noralf's refactor they needed to implement custom
functions (on top SPI) to initialize the display. See the following
drivers as examples:
- drm/panel/panel-sitronix-st7789v.c
- drivers/gpu/drm/panel/panel-tpo-tpg110.c
- drivers/gpu/drm/panel/panel-lg-lg4573.c
- drivers/gpu/drm/panel/panel-samsung-ld9040.c
- drivers/gpu/drm/panel/panel-samsung-s6e63m0.c
there may be more...

There are also at least two drivers for the same chip ili9341. See:
- drm/tinydrm/mi0283qt.c
- drm/tinydrm/ili9341.c
+ another driver for the same chip, but with parallel RGB initial
configuration, was submitted

I think there should be a single driver supporting all of the chip's
capabilities / configurations
to avoid maintenance burden and user confusion:

As a user, I can see the following use cases if a display conforms to MIPI_DBI.
a) it has its internal GRAM and MIPI_DBI can be used to transfer image data
b) internal GRAM is not present, parallel RGB must be used to transfer
image data
c) the display supports both - ili9341 case (but also others available)

As a user I want to specify displays that are going to use option a)
and/or b) - i.e.
I can have multiple ili9341 displays connected to the same parallel
RGB MCU interface,
but on a different SPI bus (or just different chip_select).
The same image data can be transferred to the displays over the parallel RGB
or I can switch some of the displays to use the MIPI_DBI (SPI) for
different image data transfer.

Kind regards
Josef Lusticky

pá 26. 7. 2019 v 18:14 odesílatel Sam Ravnborg <sam@ravnborg.org> napsal:
>
> Hi Daniel.
>
> Added Noralf - somehow I missed him on the original mail.
>
> On Fri, Jul 26, 2019 at 05:06:03PM +0200, Daniel Vetter wrote:
> > Also probably should add a few more (drm_bridge) people, I think
> > that's also somewhat relevant here.
> > -Daniel
> >
> > On Fri, Jul 26, 2019 at 4:55 PM Daniel Vetter <daniel@ffwll.ch> wrote:
> > >
> > > On Fri, Jul 26, 2019 at 02:25:10PM +0200, Sam Ravnborg wrote:
> > > > Hi Josef, Daniel et al.
> > > >
> > > > The driver that triggered this reply is a driver that adds parallel
> > > > support to ili9341 in a dedicated panel driver.
> > > > The issue here is that we already have a tiny driver that supports the
> > > > ili9341 controller - but with a slightly different configuration.
> > > >
> > > > The ili9341 supports several interfaces - from the datasheet:
> > > >     "ILI9341 supports parallel 8-/9-/16-/18-bit data bus
> > > >      MCU interface, 6-/16-/18-bit data bus RGB interface and
> > > >      3-/4-line serial peripheral interface (SPI)"
> > > >
> > > > Noralf - in another mail explained:
> > > > "
> > > > The MIPI Alliance has lots of standards some wrt. display controller
> > > > interfaces:
> > > > - MIPI DBI - Display Bus Interface (used for commands and optionally pixels)
> > > > - MIPI DPI - Display Pixel Interface (also called RGB interface or
> > > > DOTCLK interface)
> > > > - MIPI DSI - Display Serial Interface (commands and pixels)
> > > >
> > > > The ili9341 supports both MIPI DBI and DPI.
> > > > "
> > > >
> > > > MIPI DPI - is a good fit for a drm_panel driver.
> > > > MIPI DBI - requires a full display controller driver.
> > > >
> > > > There are many other examples of driver SoC that in the same way
> > > > can be seen only as a panel or as a full display controller driver.
> > > >
> > > > The open question here is if we should try to support both cases in the
> > > > same driver / file. Or shall we implment two different drivers.
> > > > One for the panel use-case. And one for the display controller usecase?
> > > >
> > > > Not sure - so asking for feedback.
> > >
> > > I'm not sure. Currently we do have DSI and dumb RGB panels all in
> > > drm/panel. I don't think we have DBI panels in there yet, but then
> > > drm/tiny is the only one supporting these.
> > >
> > > I guess we could look into move some of the DBI panel drivers into panel
> > > drivers, but that needs a bit more glue all around. I'm honestly not sure
> > > how the current DSI drivers in drm_panel work exactly, especially for
> > > command mode.
> > >
> > > Or maybe we need a new interface for command mode.
> If I get around to do a driver for the ssd1306 then I will try to sewhat
> makes sense then. For now we shall not stall the ili9341 driver.
> > >
> > > Wrt sharing code between drivers for the same chip, but different
> > > interfaces: I wouldn't worry too much about that. Maybe try to have a
> > > shared header file at least for registers.
> This part should be the minimum. Somthing like include/drm/mipi/?
>
>         Sam
>
> > > Long term we could end up with
> > > one driver module which exposes different flavours of the same chip, so
> > > multiple drm_panel drivers, or maybe we'll get something more specific for
> > > dsi/dbi.
> > > -Daniel
> > > --
> > > Daniel Vetter
> > > Software Engineer, Intel Corporation
> > > http://blog.ffwll.ch
> >
> >
> >
> > --
> > Daniel Vetter
> > Software Engineer, Intel Corporation
> > +41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

      reply	other threads:[~2019-07-29  7:20 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-04 12:50 [RFC PATCH 0/2] Add DRM panel driver for Ilitek ILI9341 based panels in parallel RGB mode Josef Lusticky
2019-03-04 12:50 ` [RFC PATCH 1/2] drm/panel: Add Ilitek ILI9341 parallel RGB panel driver Josef Lusticky
2019-03-27 21:00   ` Rob Herring
2019-03-04 12:50 ` [RFC PATCH 2/2] dt-bindings: panel: Add Ilitek ILI9341 panel documentation Josef Lusticky
2019-03-27 20:55   ` Rob Herring
2019-07-08 14:56 ` [PATCH v2 0/2] Add DRM ILI9341 parallel RGB panel driver Josef Lusticky
2019-07-08 14:56   ` [PATCH v2 1/2] dt-bindings: panel: Add parallel RGB mode for Ilitek ILI9341 panels Josef Lusticky
2019-07-10 13:39     ` Sam Ravnborg
2019-07-24 19:57     ` Rob Herring
2019-07-08 14:56   ` [PATCH v2 2/2] drm/panel: Add Ilitek ILI9341 parallel RGB panel driver Josef Lusticky
2019-07-10 13:47     ` Sam Ravnborg
2019-07-12  9:53       ` Josef Luštický
2019-07-10 13:51   ` [PATCH v2 0/2] Add DRM " Sam Ravnborg
2019-07-26 12:25   ` Controllers with several interface options - one or more drivers? Sam Ravnborg
2019-07-26 14:55     ` Daniel Vetter
2019-07-26 15:06       ` Daniel Vetter
2019-07-26 16:14         ` Sam Ravnborg
2019-07-29  7:19           ` Josef Luštický [this message]

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=CAMqqaJERwmZj-AX+7HvOOdDob24StxHoeniWOfz9ppUj1uzdZA@mail.gmail.com \
    --to=josef@lusticky.cz \
    --cc=airlied@linux.ie \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=sam@ravnborg.org \
    --cc=thierry.reding@gmail.com \
    /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).