All of lore.kernel.org
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@armlinux.org.uk>
To: Andrzej Hajda <a.hajda@samsung.com>
Cc: Lubomir Rintel <lkundrak@v3.sk>,
	DRI Development <dri-devel@lists.freedesktop.org>,
	Liviu Dudau <Liviu.Dudau@arm.com>, Peter Rosin <peda@axentia.se>
Subject: Re: Armada DRM: bridge with componentized devices
Date: Tue, 8 Jan 2019 10:16:03 +0000	[thread overview]
Message-ID: <20190108101603.GQ11171@n2100.armlinux.org.uk> (raw)
In-Reply-To: <ee58ec69-032a-e0f2-21f8-328c53a27e0a@samsung.com>

On Tue, Jan 08, 2019 at 09:35:21AM +0100, Andrzej Hajda wrote:
> On 07.01.2019 22:56, Daniel Vetter wrote:
> > If you call drm_dev_register before you have all the components
> > assembled (i.e. anywhere else than in master bind) that sounds like a
> > driver bug.
> 
> 
> This is how components work, every component calls component_add usually
> in probe, and this function checks if all components are present, if yes
> (ie. during probe of the last component) master bind is called and it
> creates drm device and then registers it. If you add device link at this
> moment, it is still before end of probe of the last component.

I wonder if device links will create more problems with the component
stuff, because we'll end up with two different systems fighting to
achieve the same aim.

1) a component device is probed, and is added to the component helper
   as a component.  (Repeat for as many component devices as are
   required.)
2) the main device is probed, added as a master.  The system is
   complete, so the master bind is called, and device links are
   created - the component device is a provider, and the main
   device is a consumer.
3) the component device is unbound, which triggers the device links
   to unbind the provider device.  This undoes everything, removing
   the device links and removing the main device from the component
   helper.
4) the component device is re-probed, and added to the component
   helper again.

At this point, there is nothing that causes the main device to be
re-probed.  As far as userspace is concerned, that's confusing because
userspace never asked for any change of status of the provider device.

Without device links, the main device would not be unbound, and there
would be an additional stage:

5) the component helper notices the re-appearance of the component
   device, notices that the system is again complete, and re-binds
   the master device bring the system back up.

This seems to be a disadvantage with device links, but there is an
advantage that device links offer - the ability to deal with other
resources (such as clocks, regulators, etc) going away more
gracefully than is possible today - but folk have to understand
that a consumer device will only ever be unbound, it will never be
re-bound automatically when the resources re-appear.

I suppose that could be fixed by moving the consumer devices onto
the deferred probe list, so when a device is re-bound, they are
retried.  At that point, the component helper becomes entirely
redundant, since its functionality can be implemented completely
using device links.

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2019-01-08 10:16 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-03  9:47 Armada DRM: bridge with componentized devices Lubomir Rintel
2019-01-03 13:11 ` Russell King - ARM Linux
2019-01-07 10:45   ` Daniel Vetter
2019-01-07 11:26     ` Andrzej Hajda
2019-01-07 16:08       ` Daniel Vetter
2019-01-07 16:27         ` Andrzej Hajda
2019-01-07 21:56           ` Daniel Vetter
2019-01-08  8:35             ` Andrzej Hajda
2019-01-08  8:47               ` Daniel Vetter
2019-01-08  9:22                 ` Andrzej Hajda
2019-01-08 10:23                   ` Russell King - ARM Linux
2019-01-08 10:32                     ` Andrzej Hajda
2019-01-08 10:24                   ` Daniel Vetter
2019-01-08 11:25                     ` Andrzej Hajda
2019-01-08 11:38                       ` Russell King - ARM Linux
2019-01-08 12:27                         ` Andrzej Hajda
2019-01-08 13:21                           ` Russell King - ARM Linux
2019-01-08 13:34                             ` Daniel Vetter
2019-01-08 14:33                             ` Andrzej Hajda
2019-01-08 15:07                               ` Russell King - ARM Linux
2019-01-08 18:07                                 ` Daniel Vetter
2019-01-09  9:12                                 ` Andrzej Hajda
2019-01-09  9:24                                   ` Rafael J. Wysocki
2019-01-09  9:30                                     ` Russell King - ARM Linux
2019-01-11 14:20                                       ` Daniel Vetter
2019-01-11 14:26                                         ` Rafael J. Wysocki
2019-01-11 14:32                                           ` Russell King - ARM Linux
2019-01-11 14:36                                             ` Daniel Vetter
2019-01-11 14:40                                               ` Rafael J. Wysocki
2019-01-11 14:36                                             ` Rafael J. Wysocki
2019-01-11 14:49                                               ` Russell King - ARM Linux
2019-01-14 12:32                                                 ` Rafael J. Wysocki
2019-01-15  0:04                                                   ` Rafael J. Wysocki
2019-01-15 22:47                                                     ` Rafael J. Wysocki
2019-01-16 18:42                                                       ` Daniel Vetter
2019-01-16 22:43                                                         ` Rafael J. Wysocki
2019-01-17 12:20                                                           ` Daniel Vetter
2019-01-18  9:36                                                             ` Lucas Stach
2019-01-18 10:03                                                               ` Rafael J. Wysocki
2019-01-18 11:06                                                                 ` Daniel Vetter
2019-01-18 11:17                                                                   ` Rafael J. Wysocki
2019-01-18 11:37                                                                     ` Rafael J. Wysocki
2019-01-18 12:57                                                                       ` Daniel Vetter
2019-01-24 11:00                                                                         ` Rafael J. Wysocki
2019-01-17 17:26                                                       ` Russell King - ARM Linux admin
2019-01-17 22:43                                                         ` Rafael J. Wysocki
2019-01-18 11:07                   ` Linus Walleij
2019-01-08 10:16               ` Russell King - ARM Linux [this message]
2019-01-08 10:31                 ` Daniel Vetter
2019-01-07 16:12     ` Russell King - ARM Linux
2019-01-07 21:55       ` Daniel Vetter
2019-01-08  0:39         ` Russell King - ARM Linux
2019-01-08 14:29           ` Liviu Dudau

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=20190108101603.GQ11171@n2100.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=Liviu.Dudau@arm.com \
    --cc=a.hajda@samsung.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=lkundrak@v3.sk \
    --cc=peda@axentia.se \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.