linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lukas Wunner <lukas@wunner.de>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Linux PM <linux-pm@vger.kernel.org>,
	David Airlie <airlied@linux.ie>,
	nouveau@lists.freedesktop.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Ben Skeggs <bskeggs@redhat.com>
Subject: Re: [Nouveau] [PATCH 1/5] drm/nouveau: Prevent RPM callback recursion in suspend/resume paths
Date: Wed, 18 Jul 2018 10:36:01 +0200	[thread overview]
Message-ID: <20180718083601.GC16072@wunner.de> (raw)
In-Reply-To: <20180718082505.GB16072@wunner.de>

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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2018-07-18  8:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20180716235936.11268-1-lyude@redhat.com>
     [not found] ` <20180716235936.11268-2-lyude@redhat.com>
2018-07-17  7:16   ` [Nouveau] [PATCH 1/5] drm/nouveau: Prevent RPM callback recursion in suspend/resume paths Lukas Wunner
     [not found]     ` <20180717071641.GA5411-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2018-07-17  7:39       ` Rafael J. Wysocki
2018-07-17 16:53     ` [Nouveau] " Lyude Paul
     [not found]       ` <d7c25a7f41df70685c0c4726315592d1d9b561ff.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-07-17 18:20         ` Lukas Wunner
     [not found]           ` <20180717182041.GA18363-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2018-07-17 18:24             ` Lyude Paul
2018-07-17 18:32               ` [Nouveau] " Lukas Wunner
2018-07-17 18:34                 ` Lyude Paul
     [not found]                   ` <2dbe75b1a83c025b9cddc229dbca9af6fb30111e.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-07-18  7:40                     ` Rafael J. Wysocki
2018-07-18  7:47                     ` Lukas Wunner
2018-07-18  7:38             ` Rafael J. Wysocki
     [not found]               ` <CAJZ5v0g8O8J0U8V-gLMe+NnTd3xgZ5_pjr9p2oci7yAfW54B-A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-07-18  8:25                 ` Lukas Wunner
     [not found]                   ` <20180718082505.GB16072-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>
2018-07-18  8:35                     ` Rafael J. Wysocki
2018-07-18  8:36                   ` Lukas Wunner [this message]
2018-07-18 20:11                     ` [Nouveau] " Lyude Paul
     [not found]                       ` <2724dd5eee8a1e4e523e43915fa184ad5afe1c59.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-07-18 21:49                         ` Rafael J. Wysocki

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=20180718083601.GC16072@wunner.de \
    --to=lukas@wunner.de \
    --cc=airlied@linux.ie \
    --cc=bskeggs@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=nouveau@lists.freedesktop.org \
    --cc=rafael@kernel.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).