All of lore.kernel.org
 help / color / mirror / Atom feed
From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: Stephen Boyd <swboyd@chromium.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	Rob Clark <robdclark@gmail.com>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] component: Move host device to end of device lists on binding
Date: Thu, 13 May 2021 14:40:16 +0100	[thread overview]
Message-ID: <20210513134016.GY1336@shell.armlinux.org.uk> (raw)
In-Reply-To: <YJlZwYS+oH7W5WjO@phenom.ffwll.local>

On Mon, May 10, 2021 at 06:05:21PM +0200, Daniel Vetter wrote:
> Entirely aside, but an s/master/aggregate/ or similar over the entire
> component.c codebase would help a pile in making it easier to understand
> which part does what. Or at least I'm always terribly confused about which
> bind binds what and all that, so maybe an additional review whether we
> have a clear split into aggregate and individual components after that
> initial fix is needed.

I'm not entirely sure what you mean "which bind binds what".

The component helper solves this problem:

We have a master or aggregate device representing a collection of
individual devices. The aggregate and individual devices may be probed
by the device model in any order. The aggregate device is only complete
once all individual and aggregate devices have been successfully probed.

It does this by tracking which devices are present, and only when they
are all present does it call the bind() operation. Conversely, if one
happens to be removed, it calls the unbind() operation. To me, that's
very simple.

When we start talking about PM, the original idea was for the aggregate
device to handle that. However, DRM/OF has pushed to change the model a
bit such that the aggregate device is created as a platform device when
we detect the presence of one of the individual devices.

I suspect what we actually want is something that, when the first
individual device gets notified of a transition to a lower power mode,
we want to place the system formed by all the devices into a low power
mode. Please realise that it may not be appropriate for every
individual device to be affected by that transition until it receives
its own PM call.

> One question I have: Why is the bridge component driver not correctly
> ordered wrt the i2c driver it needs? The idea is that the aggregate driver
> doesn't access any hw itself, but entirely relies on all its components.

As far as I'm aware, bridge was never converted to use any component
stuff, so I'm not sure what you're referring to.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

WARNING: multiple messages have this Message-ID (diff)
From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	Stephen Boyd <swboyd@chromium.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH] component: Move host device to end of device lists on binding
Date: Thu, 13 May 2021 14:40:16 +0100	[thread overview]
Message-ID: <20210513134016.GY1336@shell.armlinux.org.uk> (raw)
In-Reply-To: <YJlZwYS+oH7W5WjO@phenom.ffwll.local>

On Mon, May 10, 2021 at 06:05:21PM +0200, Daniel Vetter wrote:
> Entirely aside, but an s/master/aggregate/ or similar over the entire
> component.c codebase would help a pile in making it easier to understand
> which part does what. Or at least I'm always terribly confused about which
> bind binds what and all that, so maybe an additional review whether we
> have a clear split into aggregate and individual components after that
> initial fix is needed.

I'm not entirely sure what you mean "which bind binds what".

The component helper solves this problem:

We have a master or aggregate device representing a collection of
individual devices. The aggregate and individual devices may be probed
by the device model in any order. The aggregate device is only complete
once all individual and aggregate devices have been successfully probed.

It does this by tracking which devices are present, and only when they
are all present does it call the bind() operation. Conversely, if one
happens to be removed, it calls the unbind() operation. To me, that's
very simple.

When we start talking about PM, the original idea was for the aggregate
device to handle that. However, DRM/OF has pushed to change the model a
bit such that the aggregate device is created as a platform device when
we detect the presence of one of the individual devices.

I suspect what we actually want is something that, when the first
individual device gets notified of a transition to a lower power mode,
we want to place the system formed by all the devices into a low power
mode. Please realise that it may not be appropriate for every
individual device to be affected by that transition until it receives
its own PM call.

> One question I have: Why is the bridge component driver not correctly
> ordered wrt the i2c driver it needs? The idea is that the aggregate driver
> doesn't access any hw itself, but entirely relies on all its components.

As far as I'm aware, bridge was never converted to use any component
stuff, so I'm not sure what you're referring to.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

  parent reply	other threads:[~2021-05-13 13:40 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-08  7:41 [PATCH] component: Move host device to end of device lists on binding Stephen Boyd
2021-05-08  7:41 ` Stephen Boyd
2021-05-10 11:59 ` Rafael J. Wysocki
2021-05-10 11:59   ` Rafael J. Wysocki
2021-05-11 17:59   ` Saravana Kannan
2021-05-11 17:59     ` Saravana Kannan
2021-05-10 16:05 ` Daniel Vetter
2021-05-10 16:05   ` Daniel Vetter
2021-05-10 17:52   ` Stephen Boyd
2021-05-10 17:52     ` Stephen Boyd
2021-05-10 18:26     ` Daniel Vetter
2021-05-10 18:26       ` Daniel Vetter
2021-05-10 19:08       ` Stephen Boyd
2021-05-10 19:08         ` Stephen Boyd
2021-05-11 10:52         ` Rafael J. Wysocki
2021-05-11 10:52           ` Rafael J. Wysocki
2021-05-11 13:39           ` Daniel Vetter
2021-05-11 13:39             ` Daniel Vetter
2021-05-11 17:19             ` Stephen Boyd
2021-05-11 17:19               ` Stephen Boyd
2021-05-11 17:25               ` Daniel Vetter
2021-05-11 17:25                 ` Daniel Vetter
2021-05-11 19:12               ` Saravana Kannan
2021-05-11 19:12                 ` Saravana Kannan
2021-05-11 17:00           ` Stephen Boyd
2021-05-11 17:00             ` Stephen Boyd
2021-05-11 17:20             ` Rafael J. Wysocki
2021-05-11 17:20               ` Rafael J. Wysocki
2021-05-13 13:40   ` Russell King - ARM Linux admin [this message]
2021-05-13 13:40     ` Russell King - ARM Linux admin
2021-05-11 14:42 ` Russell King - ARM Linux admin
2021-05-11 14:42   ` Russell King - ARM Linux admin
2021-05-11 17:22   ` Stephen Boyd
2021-05-11 17:22     ` Stephen Boyd

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=20210513134016.GY1336@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=robdclark@gmail.com \
    --cc=swboyd@chromium.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 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.