Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp5667013ybg; Tue, 22 Oct 2019 06:43:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqzfPDMb6kRxGLtwq7nErNRKWmCmnEZKSnuuQYoC2FGx4goI+7RLH2BuIF9XkNiNzNbM3zd7 X-Received: by 2002:a17:906:a0f:: with SMTP id w15mr7133875ejf.321.1571751834984; Tue, 22 Oct 2019 06:43:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571751834; cv=none; d=google.com; s=arc-20160816; b=UDfd7Ku6dAa1nZewVu7Xemq6LF/+e6LmU/roOKOSruJEfWq7jmm2uF5vir1Y0pbop/ Kz65bO0ndLk0dtXGmYKct+lFaXGTkjvJ0eeDa+yLPOPuETfVsemZfhmfTm/Hv8MqXNb3 Xd6LkfZIY0S4TsC0dgsS7jf2dvJXh5df+uhYezlpoKpRDs5GwHX+7JjLj9PnAqE7gErx p7QLgjenS3bHUBUYuv/1QxZx9SxqYvgGWrJdB+StOX21J7BEwMWPSD8iuf9d3QL4IPmJ MjC23qExm74SvkZcLdO2R2hfpy5cVt0Tq3xLpL9u8i557fYaq32o+0zMpiVq+8yXI4rr mjxg== 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=VQhJ5uGsiPgZNc5ipgcQMT+a30qQYOgMN28GxdH6QpQ=; b=wbqYaQMbX2ONVMkkzD0S+Zq0VYV07+ItqUHrJdL3ts0iEJX4NH9yDn/E87JsjbtZTL jZONK2cqPEDJA8sYyRslxBc8kevEg7KjZ6bdPZP/4B75Ub2gIHazARXnZwNEZQ+11YQ6 lpX1zgk8rnEk2ijARo+sBQRUFfLXcDCIgxfmRyc+ITthkFChSP6yTNfufmRT5z4eoiQw ijwwgA6OkQcDDBeuyVjhepBjyZDU2IYTUCn0KRD0oAALfEYUzVq7rGGVw4K0ycchJHrl 0/LxulWXal0BkaBhQ3Otdlg5VkKODD5UURJ2NzR0v2ur4HTqpTeVGIubunfypKNNdpHA hQ5A== 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 r17si12846693edx.257.2019.10.22.06.43.30; Tue, 22 Oct 2019 06:43:54 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388281AbfJVMo6 (ORCPT + 99 others); Tue, 22 Oct 2019 08:44:58 -0400 Received: from mga14.intel.com ([192.55.52.115]:45612 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387479AbfJVMo6 (ORCPT ); Tue, 22 Oct 2019 08:44:58 -0400 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 fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Oct 2019 05:44:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,327,1566889200"; d="scan'208";a="209665685" Received: from lahna.fi.intel.com (HELO lahna) ([10.237.72.157]) by fmsmga001.fm.intel.com with SMTP; 22 Oct 2019 05:44:54 -0700 Received: by lahna (sSMTP sendmail emulation); Tue, 22 Oct 2019 15:44:54 +0300 Date: Tue, 22 Oct 2019 15:44:53 +0300 From: Mika Westerberg To: Karol Herbst Cc: Bjorn Helgaas , "Rafael J . Wysocki" , LKML , Lyude Paul , Linux PCI , Linux PM , dri-devel , nouveau , Linux ACPI Mailing List Subject: Re: [PATCH v3] pci: prevent putting nvidia GPUs into lower device states on certain intel bridges Message-ID: <20191022124453.GK2819@lahna.fi.intel.com> References: <20191016213722.GA72810@google.com> <20191021133328.GI2819@lahna.fi.intel.com> <20191021140852.GM2819@lahna.fi.intel.com> <20191021154606.GT2819@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 Tue, Oct 22, 2019 at 11:16:14AM +0200, Karol Herbst wrote: > I think there is something I totally forgot about: > > When there was never a driver bound to the GPU, and if runtime power > management gets enabled on that device, runtime suspend/resume works > as expected (I am not 100% sure on if that always works, but I will > recheck that). AFAIK, if there is no driver bound to the PCI device it is left to D0 regardless of the runtime PM state which could explain why it works in that case (it is never put into D3hot). I looked at the acpidump you sent and there is one thing that may explain the differences between Windows and Linux. Not sure if you were aware of this already, though. The power resource PGOF() method has this: If (((OSYS <= 0x07D9) || ((OSYS == 0x07DF) && (_REV == 0x05)))) { ... } If I read it right, the later condition tries to detect Linux which fails nowadays but if you have acpi_rev_override in the command line (or the machine is listed in acpi_rev_dmi_table) this check passes and does some magic which is not clear to me. There is similar in PGON() side which is used to turn the device back on. You can check what actually happens when _ON()/_OFF() is called by passing something like below to the kernel command line: acpi.trace_debug_layer=0x80 acpi.trace_debug_level=0x10 acpi.trace_method_name=\_SB.PCI0.PEG0.PG00._ON acpi.trace_state=method (See also Documentation/firmware-guide/acpi/method-tracing.rst). Trace goes to system dmesg.