[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180718083601.GC16072@wunner.de>
Date: Wed, 18 Jul 2018 10:36:01 +0200
From: Lukas Wunner <lukas@...ner.de>
To: "Rafael J. Wysocki" <rafael@...nel.org>
Cc: Lyude Paul <lyude@...hat.com>, nouveau@...ts.freedesktop.org,
David Airlie <airlied@...ux.ie>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
dri-devel <dri-devel@...ts.freedesktop.org>,
Ben Skeggs <bskeggs@...hat.com>,
Linux PM <linux-pm@...r.kernel.org>
Subject: Re: [Nouveau] [PATCH 1/5] drm/nouveau: Prevent RPM callback
recursion in suspend/resume paths
On Wed, Jul 18, 2018 at 10:25:05AM +0200, Lukas Wunner wrote:
> The GPU contains an i2c subdevice for each connector with DDC lines.
> I believe those are modelled as children of the GPU's PCI device as
> they're accessed via mmio of the PCI device.
>
> The problem here is that when the GPU's PCI device runtime suspends,
> its i2c child device needs to be runtime active to suspend the MST
> topology. Catch-22.
>
> I don't know whether or not it's necessary to suspend the MST topology.
> I'm not an expert on DisplayPort MultiStream transport.
>
> BTW Lyude, in patch 4 and 5 of this series, you're runtime resuming
> pad->i2c->subdev.device->dev. Is this the PCI device or is it the i2c
> device? I'm always confused by nouveau's structs. In nvkm_i2c_bus_ctor()
> I can see that the device you're runtime resuming is the parent of the
> i2c_adapter:
>
> struct nvkm_device *device = pad->i2c->subdev.device;
> [...]
> bus->i2c.dev.parent = device->dev;
>
> If the i2c_adapter is a child of the PCI device, it's sufficient
> to runtime resume the i2c_adapter, i.e. bus->i2c.dev, and this will
> implicitly runtime resume its parent.
Actually, having written all this I just remembered that we have this
in the documentation:
8. "No-Callback" Devices
Some "devices" are only logical sub-devices of their parent and cannot be
power-managed on their own. [...]
Subsystems can tell the PM core about these devices by calling
pm_runtime_no_callbacks().
So it might actually be sufficient to just call pm_runtime_no_callbacks()
for the i2c devices...
Lukas
Powered by blists - more mailing lists