From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Anshuman Gupta <anshuman.gupta@intel.com>
Cc: igt-dev@lists.freedesktop.org, badal.nilawar@intel.com
Subject: Re: [igt-dev] [PATCH i-g-t] test/i915_pm_rpm: Verify bridge binds with pcieport driver
Date: Tue, 1 Nov 2022 12:25:35 -0400 [thread overview]
Message-ID: <Y2FIf7usXF3qEb7w@intel.com> (raw)
In-Reply-To: <20221031135652.2342078-1-anshuman.gupta@intel.com>
On Mon, Oct 31, 2022 at 07:26:52PM +0530, Anshuman Gupta wrote:
> It has been observed that on some Intel x86 host PCI core
probably a comma would help, maybe here?!.........^
> does not bind the Intel dgfx catds's pci bridge
s/catds's pci/cards' pci/
> devices(virtual switch port) to the pcieport driver.
> This leaves the pci bridge devices to D0 state and
> burns power on dgfx card.
>
> Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
> ---
> tests/i915/i915_pm_rpm.c | 14 +++++++++++---
> 1 file changed, 11 insertions(+), 3 deletions(-)
>
> diff --git a/tests/i915/i915_pm_rpm.c b/tests/i915/i915_pm_rpm.c
> index 1ff69a060a..92c30ae791 100644
> --- a/tests/i915/i915_pm_rpm.c
> +++ b/tests/i915/i915_pm_rpm.c
> @@ -1545,12 +1545,12 @@ static void reg_read_ioctl_subtest(void)
> igt_assert(wait_for_suspended());
> }
>
> -static bool device_in_pci_d3(void)
> +static bool device_in_pci_d3(struct pci_device *pci_dev)
> {
> uint16_t val;
> int rc;
>
> - rc = pci_device_cfg_read_u16(igt_device_get_pci_device(drm_fd), &val, 0xd4);
> + rc = pci_device_cfg_read_u16(pci_dev, &val, 0xd4);
> igt_assert_eq(rc, 0);
>
> igt_debug("%s: PCI D3 state=%d\n", __func__, val & 0x3);
> @@ -1559,10 +1559,18 @@ static bool device_in_pci_d3(void)
>
> static void pci_d3_state_subtest(void)
> {
> + 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(), 2000, 100));
> + igt_assert(igt_wait(device_in_pci_d3(pci_dev), 2000, 100));
> +
> + if (gem_has_lmem(drm_fd))
> + igt_require((pci_device_has_kernel_driver(bridge_pci_dev));
these last 2 lines seems to be doing the protection that commit msg
requests, right? but probably the above chunck deserves a separated patch?
or maybe explain a little bit more in the commit msg?
Thanks,
Rodrigo.
>
> enable_one_screen_or_forcewake_get_and_wait(&ms_data);
> igt_assert(!device_in_pci_d3());
> --
> 2.38.0
>
prev parent reply other threads:[~2022-11-01 16:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-31 13:56 [igt-dev] [PATCH i-g-t] test/i915_pm_rpm: Verify bridge binds with pcieport driver Anshuman Gupta
2022-10-31 17:04 ` [igt-dev] ✗ Fi.CI.BUILD: failure for " Patchwork
2022-11-01 16:25 ` Rodrigo Vivi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y2FIf7usXF3qEb7w@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=anshuman.gupta@intel.com \
--cc=badal.nilawar@intel.com \
--cc=igt-dev@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox