From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4E73010E51A for ; Wed, 2 Nov 2022 18:05:06 +0000 (UTC) Date: Wed, 2 Nov 2022 14:04:25 -0400 From: Rodrigo Vivi To: Anshuman Gupta Message-ID: References: <20221102115851.2223804-1-anshuman.gupta@intel.com> <20221102115851.2223804-3-anshuman.gupta@intel.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20221102115851.2223804-3-anshuman.gupta@intel.com> MIME-Version: 1.0 Subject: Re: [igt-dev] [PATCH i-g-t v2 2/2] test/i915_pm_rpm: Verify bridge binds with pcieport driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: igt-dev@lists.freedesktop.org, badal.nilawar@intel.com Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: On Wed, Nov 02, 2022 at 05:28:51PM +0530, Anshuman Gupta wrote: > It has been observed that on some Intel x86 host, > PCI core does not bind the Intel dgfx pci card's pci bridge > devices(virtual switch ports) to the pcieport driver. > This leaves pci bridge devices to D0 state and burns power on > dgfx card. It will block the card d3cold as well. > Therefore skip the basic-pci-d3-state subtest in case of > bridge pci devices do not bind with pcieport driver. > > v2: > - Commit log modification. [Rodrigo] > - Kept a separate patch for unrelated changes. [Rodrigo] > > Signed-off-by: Anshuman Gupta Reviewed-by: Rodrigo Vivi > --- > tests/i915/i915_pm_rpm.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/tests/i915/i915_pm_rpm.c b/tests/i915/i915_pm_rpm.c > index 017c05fde..366a3050c 100644 > --- a/tests/i915/i915_pm_rpm.c > +++ b/tests/i915/i915_pm_rpm.c > @@ -1559,15 +1559,20 @@ static bool device_in_pci_d3(struct pci_device *pci_dev) > > static void pci_d3_state_subtest(void) > { > - struct pci_device *pci_dev; > + struct pci_device *pci_dev, *bridge_pci_dev; > > igt_require(has_runtime_pm); > > pci_dev = igt_device_get_pci_device(drm_fd); > + bridge_pci_dev = pci_device_get_parent_bridge(pci_dev); > > disable_all_screens_and_wait(&ms_data); > igt_assert(igt_wait(device_in_pci_d3(pci_dev), 2000, 100)); > > + if (gem_has_lmem(drm_fd)) > + igt_require_f(pci_device_has_kernel_driver(bridge_pci_dev), > + "pci bridge device does not bind with pcieport driver\n"); > + > enable_one_screen_or_forcewake_get_and_wait(&ms_data); > igt_assert(!device_in_pci_d3(pci_dev)); > forcewake_put(&ms_data); > -- > 2.25.1 >