Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3125896ybc; Thu, 21 Nov 2019 03:47:50 -0800 (PST) X-Google-Smtp-Source: APXvYqyE5E6AC447hCs6YREM5uqD7Ep+j7xtTUOBFFp6+IOfSfqmoEFYWBSPScct4JQIrUP13DzZ X-Received: by 2002:a17:906:f209:: with SMTP id gt9mr13282970ejb.241.1574336870822; Thu, 21 Nov 2019 03:47:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574336870; cv=none; d=google.com; s=arc-20160816; b=ibPJJW3sW4V13Tdk9hI8SbVjL9pRiNSiCvNQ2e5XWhEfOTP7qcAtqJn2fDl9EOmgED zIi10PlCUc83//w+g9jRgGx16U0XNk99c4xNnHqBSXRNjivhb/ebMoqWqzYNFJ5rgtnQ LVr1XEfeecHFMntGhsWZ9wZqQLUFJolbT+hiUXUkdcQRSYb87jU5daJnCuoipKYhVnHL 5FqpYSHDGO13BJ5O3w8d78udVgbh2g5a8TSvM9ax0jpoy2r8ZW2bJ84EatQexnTjh+M4 MJIqRxBwWvBG4gqtJz4Aflc8tWgTQY8GgPE2/2mMcvOEZv2w+NI9kzKww2DuF2QkDaIs XPsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=h/vwKF+JMXitUEBuvCv9FRXghletP4mDACt1jPFNRCY=; b=YDZ6Kpd2FjMY33rEN12tkSmkDhMRsexUjoTmtr6bTu92IH5CIzVbKShjk45QBtnpzZ d1AMs6MCiV9Fkjewwk+NSYr0oAq751VKztQs+txgmKYa5cT1KGl2HbWky2qSr0fxQr6g kzVBwp/eaQA4axqsgS2c8ajESj3ofeulyRTdBGBjMvG15VmRU52bAU+1xFNmaEdbjjGT WD4IlJc4bmCkXowQ5KODlJ1vzUmyhgbmcfG+2p35QeON1YWa9MWrsdhdKPcIFDgn6PVb wqlFu7IOApN1nJV+NWWJ/prDsKuoE/hKg9G0H+tHBuPzELCnGTC7/EvTLsXdUPCM2wtA VqnQ== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z16si1539889eji.25.2019.11.21.03.47.25; Thu, 21 Nov 2019 03:47:50 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726620AbfKULqP (ORCPT + 99 others); Thu, 21 Nov 2019 06:46:15 -0500 Received: from mga11.intel.com ([192.55.52.93]:20055 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726170AbfKULqP (ORCPT ); Thu, 21 Nov 2019 06:46:15 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Nov 2019 03:46:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,224,1571727600"; d="scan'208";a="216119105" Received: from lahna.fi.intel.com (HELO lahna) ([10.237.72.163]) by fmsmga001.fm.intel.com with SMTP; 21 Nov 2019 03:46:10 -0800 Received: by lahna (sSMTP sendmail emulation); Thu, 21 Nov 2019 13:46:10 +0200 Date: Thu, 21 Nov 2019 13:46:10 +0200 From: Mika Westerberg To: "Rafael J. Wysocki" Cc: Karol Herbst , Bjorn Helgaas , LKML , Lyude Paul , "Rafael J . Wysocki" , Linux PCI , Linux PM , dri-devel , nouveau , Dave Airlie , Mario Limonciello Subject: Re: [PATCH v4] pci: prevent putting nvidia GPUs into lower device states on certain intel bridges Message-ID: <20191121114610.GW11621@lahna.fi.intel.com> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.12.1 (2019-06-15) 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:34:22PM +0100, Rafael J. Wysocki wrote: > 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? No. We put the GPU into D3hot first, then the root port and then turn off the power resource (which is attached to the root port) resulting the topology entering D3cold. > > 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. :-) Yes, I agree :)