Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp266419imm; Wed, 18 Jul 2018 01:37:04 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfEYJ7YavJ6qff1hIc/6LD1iY9cOj6MdBhr5jJn1JTUmJzXEctItzXlZZUjdFLazSqHIgvx X-Received: by 2002:a62:3a5b:: with SMTP id h88-v6mr4270532pfa.61.1531903024331; Wed, 18 Jul 2018 01:37:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531903024; cv=none; d=google.com; s=arc-20160816; b=PVDlWTBlZvNl5e6w6RHdxCJk0OEMz76NcO7lE4znCDuH+xgR62hTB+g3R/CnSVwtHX IPLoPvV4xFX3NOTfEaC85h5I0tV9/DQGdl4+BwS9oa6psZKZGBAGe0rgS1sYEn7A9D9E pWa6H+ei6VBIZxi/jx0t4pIlRc9LQV2/OagHumqFrID1603N7vz/lKfILycgaKt1COBS 88Mp4gIvk02VEGKw2rbcCL1t53VV++Ds5ILsH2PpoQWcleWbQN+bCnMfLBfPWwZsoc1W azWBfh2FXlIWSHEiPp1XHZ8J1eDd/1cYTPNXlTatO7B9v5hdz82CNXKAz4+SZv5tShph l0Ow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=dhVHMjrPb1Bms0u5q04F2dieaVvhhxg28Sqi0Ccqsmk=; b=w+K/337VXCC/XWm5tc8U1D4ODA9NlWf9cGv5wvJiEvhmDq/49Ta4fvKtp2DJgqy25F TlkxvqEA14bKGMN9VxLoQa6DvsQqkPHIUGtAHvZPcC57ABUqHwZxLsnfE1tmg/zO/x8F HkF12AQ97Ql64UTEFsoZ5QjS44J07erSCcCNmBlZm6lIooXy8Ce4iOJdn0mpf2KCwBLc ST1YHgFb529IoNRUNmGdZBTBX4Gl28+ERsccYfNPR0Tvtw8ccur3w9gWJrPUZ5T+cexD Dfs2z5ZmPGhakyPK3agH81aX1ftXRCQinwCT1mW4z6GJHagmjAOj7pafR8IT1Z17Z1gX CeqA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f2-v6si2779931pgh.661.2018.07.18.01.36.49; Wed, 18 Jul 2018 01:37:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730316AbeGRJMv (ORCPT + 99 others); Wed, 18 Jul 2018 05:12:51 -0400 Received: from bmailout3.hostsharing.net ([176.9.242.62]:49803 "EHLO bmailout3.hostsharing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726180AbeGRJMv (ORCPT ); Wed, 18 Jul 2018 05:12:51 -0400 Received: from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.hostsharing.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (not verified)) by bmailout3.hostsharing.net (Postfix) with ESMTPS id 5090E100BE789; Wed, 18 Jul 2018 10:36:02 +0200 (CEST) Received: by h08.hostsharing.net (Postfix, from userid 100393) id DE36071E27; Wed, 18 Jul 2018 10:36:01 +0200 (CEST) Date: Wed, 18 Jul 2018 10:36:01 +0200 From: Lukas Wunner To: "Rafael J. Wysocki" Cc: Lyude Paul , nouveau@lists.freedesktop.org, David Airlie , Linux Kernel Mailing List , dri-devel , Ben Skeggs , Linux PM Subject: Re: [Nouveau] [PATCH 1/5] drm/nouveau: Prevent RPM callback recursion in suspend/resume paths Message-ID: <20180718083601.GC16072@wunner.de> References: <20180716235936.11268-1-lyude@redhat.com> <20180716235936.11268-2-lyude@redhat.com> <20180717071641.GA5411@wunner.de> <20180717182041.GA18363@wunner.de> <20180718082505.GB16072@wunner.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180718082505.GB16072@wunner.de> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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