linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Thierry Reding <thierry.reding@avionic-design.de>
Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
	Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Tom Gall <tom.gall@linaro.org>,
	Ragesh Radhakrishnan <ragesh.r@linaro.org>,
	Rob Clark <rob.clark@linaro.org>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Tomi Valkeinen <tomi.valkeinen@ti.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
Subject: Re: [RFC v2 0/5] Common Display Framework
Date: Mon, 17 Dec 2012 14:58:43 +0000	[thread overview]
Message-ID: <2541365.P6Gsa5p3NZ@avalon> (raw)
In-Reply-To: <20121123195607.GA20990@avionic-0098.adnet.avionic-design.de>

[-- Attachment #1: Type: text/plain, Size: 3859 bytes --]

Hi Thierry,

On Friday 23 November 2012 20:56:07 Thierry Reding wrote:
> On Thu, Nov 22, 2012 at 10:45:31PM +0100, Laurent Pinchart wrote:
> [...]
> 
> > Display entities are accessed by driver using notifiers. Any driver can
> > register a display entity notifier with the CDF, which then calls the
> > notifier when a matching display entity is registered. The reason for
> > this asynchronous mode of operation, compared to how drivers acquire
> > regulator or clock resources, is that the display entities can use
> > resources provided by the display driver. For instance a panel can be a
> > child of the DBI or DSI bus controlled by the display device, or use a
> > clock provided by that device. We can't defer the display device probe
> > until the panel is registered and also defer the panel device probe until
> > the display is registered. As most display drivers need to handle output
> > devices hotplug (HDMI monitors for instance), handling other display
> > entities through a notification system seemed to be the easiest solution.
> > 
> > Note that this brings a different issue after registration, as display
> > controller and display entity drivers would take a reference to each
> > other. Those circular references would make driver unloading impossible.
> > One possible solution to this problem would be to simulate an unplug event
> > for the display entity, to force the display driver to release the dislay
> > entities it uses. We would need a userspace API for that though. Better
> > solutions would of course be welcome.
> 
> Maybe I don't understand all of the underlying issues correctly, but a
> parent/child model would seem like a better solution to me. We discussed
> this back when designing the DT bindings for Tegra DRM and came to the
> conclusion that the output resource of the display controller (RGB,
> HDMI, DSI or TVO) was the most suitable candidate to be the parent of
> the panel or display attached to it. The reason for that decision was
> that it keeps the flow of data or addressing of nodes consistent. So the
> chain would look something like this (on Tegra):
> 
> 	CPU
> 	+-host1x
> 	  +-dc
> 	    +-rgb
> 	    | +-panel
> 	    +-hdmi
> 	      +-monitor
> 
> In a natural way this makes the output resource the master of the panel
> or display. From a programming point of view this becomes quite easy to
> implement and is very similar to how other busses like I2C or SPI are
> modelled. In device tree these would be represented as subnodes, while
> with platform data some kind of lookup could be done like for regulators
> or alternatively a board setup registration mechanism like what's in
> place for I2C or SPI.

That works well for panels that have a shared control and video bus (DBI, DSI) 
or only a video bus (DPI), but breaks when you need to support panels with 
separate control and video busses, such as panels with a parallel data bus and 
an I2C or SPI control bus.

Both Linux and DT have a tree-based device model. Devices can have a single 
parent, so you can't represent your panel as a child of both the video source 
and the control bus master. We have the exact same problem in V4L2 with I2C 
camera sensors that output video data on a separate parallel or serial bus, 
and we decided to handle the device as a child of its control bus master. This 
model makes usage of the Linux power management model easier (but not 
straightforward when power management dependencies exist across video busses, 
outside of the kernel device tree).

As the common display framework should handle both panels with common control 
and video busses and panels with separate busses in a similar fashion, DT 
bindings needs to reference the panel through a phandle, even though in some 
cases they could technically just be children of the display controller.

-- 
Regards,

Laurent Pinchart

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

  parent reply	other threads:[~2012-12-17 14:58 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 [this message]
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
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=2541365.P6Gsa5p3NZ@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=benjamin.gaignard@linaro.org \
    --cc=bryan.wu@canonical.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=maxime.ripard@free-electrons.com \
    --cc=p.zabel@pengutronix.de \
    --cc=ragesh.r@linaro.org \
    --cc=rob.clark@linaro.org \
    --cc=s-guiriec@ti.com \
    --cc=sumit.semwal@linaro.org \
    --cc=thierry.reding@avionic-design.de \
    --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).