Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3114832ybc; Thu, 21 Nov 2019 03:36:16 -0800 (PST) X-Google-Smtp-Source: APXvYqxD0pE7Fb6hw4KVe3lZTk7D6xU1TaRt1RQawZJ9vNDmh9utU05cV+Nzj433v13UsT58/vN3 X-Received: by 2002:a17:906:600b:: with SMTP id o11mr13027011ejj.175.1574336176089; Thu, 21 Nov 2019 03:36:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574336176; cv=none; d=google.com; s=arc-20160816; b=iMo+Ab+Q3O25NJxDP0ZzAk/RNhVQ6NVAFOF8eVOprn7BXFUUOp1HRSZrKmwLwir/CW r5Vn9m1R0kk7EABpyqxMVB7zul7dYqQODsdhNMzY+gDkRTRT/5471WFrikBvMXCJQJHi m3wfVcAcE+7GhERCVNX4QHMgoXeyMlcFw2pSuKDOqEOrUB4gebDrgO2DW3/Vlq6e8HHT 08O/S9K2/5YptI0822i9B9EaaRATBBDmX7JOr6U2Jr0uzv/yf1Qax3VPERLsIbZ4OPGT +1ead0M9kRMT3POZwyH7EgCpOrF9B9rrzIMXk/m8DUJd+TXxuFMIpbs0xI5j2Mbg30Ox A4MQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=Kuqs327pUhPcYZgV8CR1QRbPOc0dkeg/XwrNu/owu1o=; b=eCF6aM+52oc9PrA4F5v/jXHCrUQXGaBetDruH06nmv2IxEEh5OQ9Ku8L1nu8wRhGUb pLzaYDR9VWA+YNzLVUMMntLu85fiqcxXBouWiQUWs6N/4HfKGaL4+ylImbmIpGqnx9Io xB8dlhmpjWs78HAzbaUh3XdlkjAgsMRj7nJ6GOUeRGfbfe0wqiapovolcCzwuQMTEMn9 ATLgWtYrfu4eL6+O1w05oDS0KDtukFbauu3plJGHA7TyrQHGTOaHHF/smqp5h5nvFC1u pURMtZDrRg+QVLd7DiRz0um5xHx/qNnDdxW+AM9K+DKAyf5GcY1ifAbNgdpFANx97HEz gyPg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u15si1459450ejb.120.2019.11.21.03.35.51; Thu, 21 Nov 2019 03:36:16 -0800 (PST) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726532AbfKULef (ORCPT + 99 others); Thu, 21 Nov 2019 06:34:35 -0500 Received: from mail-ot1-f68.google.com ([209.85.210.68]:32932 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726170AbfKULef (ORCPT ); Thu, 21 Nov 2019 06:34:35 -0500 Received: by mail-ot1-f68.google.com with SMTP id u13so2648633ote.0; Thu, 21 Nov 2019 03:34:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Kuqs327pUhPcYZgV8CR1QRbPOc0dkeg/XwrNu/owu1o=; b=Rf63ka8JaHij+58jN/MC52o6+z/uqnyeoXo12S8lbV+xA+c+JoiArrrSWwPicbIkuz mBo6RxYOAi1/eatFM6rKsmhCKQo1yG4x88HjknummjrkdCWtvpCOPuveUlKBYeOz/Tgg XCAxyJgpI2oorzOHYa6Yi8R6mqnxH0IcF0MomsDEu97h160JU46uDo9Ug/aibY+7aI9p WzS7pFTGU3nylxNaQcC/cd58cufYmP52T0WYhwyeK41ko6LXhh2+YW4u5xcvg3b/fX1U KjLlaLammzRR9dOewUmn4deg7CChHceEfEaPuDt4a865eOyEEkovAB/KHkgHmN7zBsv4 NmxA== X-Gm-Message-State: APjAAAXEW0fO1hboxxg3lVEbQepzVWvyIXrTso8qgOE7aTl9bXOzqNyi Uvw5G4CLtwqEiZRkioJMObiXyZT0z+nWXJ9p6Zc= X-Received: by 2002:a05:6830:103:: with SMTP id i3mr6231632otp.266.1574336073815; Thu, 21 Nov 2019 03:34:33 -0800 (PST) MIME-Version: 1.0 References: <20191120120913.GE11621@lahna.fi.intel.com> <20191120151542.GH11621@lahna.fi.intel.com> <20191120155301.GL11621@lahna.fi.intel.com> <20191121112821.GU11621@lahna.fi.intel.com> In-Reply-To: <20191121112821.GU11621@lahna.fi.intel.com> From: "Rafael J. Wysocki" Date: Thu, 21 Nov 2019 12:34:22 +0100 Message-ID: Subject: Re: [PATCH v4] pci: prevent putting nvidia GPUs into lower device states on certain intel bridges To: Mika Westerberg Cc: "Rafael J. Wysocki" , Karol Herbst , Bjorn Helgaas , LKML , Lyude Paul , "Rafael J . Wysocki" , Linux PCI , Linux PM , dri-devel , nouveau , Dave Airlie , Mario Limonciello Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 21, 2019 at 12:28 PM Mika Westerberg wrote: > > On Wed, Nov 20, 2019 at 11:29:33PM +0100, Rafael J. Wysocki wrote: > > > last week or so I found systems where the GPU was under the "PCI > > > Express Root Port" (name from lspci) and on those systems all of that > > > seems to work. So I am wondering if it's indeed just the 0x1901 one, > > > which also explains Mikas case that Thunderbolt stuff works as devices > > > never get populated under this particular bridge controller, but under > > > those "Root Port"s > > > > It always is a PCIe port, but its location within the SoC may matter. > > Exactly. Intel hardware has PCIe ports on CPU side (these are called > PEG, PCI Express Graphics, ports), and the PCH side. I think the IP is > still the same. > > > Also some custom AML-based power management is involved and that may > > be making specific assumptions on the configuration of the SoC and the > > GPU at the time of its invocation which unfortunately are not known to > > us. > > > > However, it looks like the AML invoked to power down the GPU from > > acpi_pci_set_power_state() gets confused if it is not in PCI D0 at > > that point, so it looks like that AML tries to access device memory on > > the GPU (beyond the PCI config space) or similar which is not > > accessible in PCI power states below D0. > > Or the PCI config space of the GPU when the parent root port is in D3hot > (as it is the case here). Also then the GPU config space is not > accessible. Why would the parent port be in D3hot at that point? Wouldn't that be a suspend ordering violation? > I took a look at the HP Omen ACPI tables which has similar problem and > there is also check for Windows 7 (but not Linux) so I think one > alternative workaround would be to add these devices into > acpi_osi_dmi_table[] where .callback is set to dmi_disable_osi_win8 (or > pass 'acpi_osi="!Windows 2012"' in the kernel command line). I'd like to understand the facts that have been established so far before deciding what to do about them. :-)