From: Anshuman Gupta <anshuman.gupta@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: petri.latvala@intel.com, badal.nilawar@intel.com, rodrigo.vivi@intel.com
Subject: [igt-dev] [PATCH i-g-t v4 6/9] i915_pm_rpm: Add D3Cold basic subtest
Date: Thu, 5 May 2022 16:33:51 +0530 [thread overview]
Message-ID: <20220505110354.30768-7-anshuman.gupta@intel.com> (raw)
In-Reply-To: <20220505110354.30768-1-anshuman.gupta@intel.com>
Add support for D3Cold basic subtest.
It setup and prepares the gfx PCI card for D3Cold
and checks the ACPI D3Cold state.
v2:
- Removed IS_DGFX() condition.
- Added igt_describe(). [Kamil]
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
---
tests/i915/i915_pm_rpm.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/tests/i915/i915_pm_rpm.c b/tests/i915/i915_pm_rpm.c
index d2bce5826..31f9712a8 100644
--- a/tests/i915/i915_pm_rpm.c
+++ b/tests/i915/i915_pm_rpm.c
@@ -1534,6 +1534,28 @@ __noreturn static void stay_subtest(void)
sleep(600);
}
+static void d3cold_basic_subtest(void)
+{
+ struct pci_device *root;
+ bool result;
+
+ root = igt_device_get_pci_root_port(drm_fd);
+ igt_require(igt_pm_acpi_d3cold_supported(root));
+ igt_pm_setup_pci_card_runtime_pm(root);
+ disable_all_screens_and_wait(&ms_data);
+
+ result = igt_wait(igt_pm_get_acpi_real_d_state(root) == IGT_ACPI_D3Cold, 10000, 500);
+
+ if (!result) {
+ igt_info("D3Cold not achieved for root port %04x:%02x:%02x.%01x\n",
+ root->domain, root->bus, root->dev, root->func);
+ igt_pm_print_pci_card_runtime_status();
+ }
+
+ igt_assert(result);
+ igt_pm_restore_pci_card_runtime_pm();
+}
+
static void system_suspend_subtest(int state, int debug)
{
disable_all_screens_and_wait(&ms_data);
@@ -2065,6 +2087,10 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
igt_subtest("stay")
stay_subtest();
+ igt_describe("Validate gfx root port d3cold state");
+ igt_subtest("d3cold-basic")
+ d3cold_basic_subtest();
+
/* Essential things */
igt_subtest("drm-resources-equal")
drm_resources_equal_subtest();
--
2.26.2
next prev parent reply other threads:[~2022-05-05 11:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-05 11:03 [igt-dev] [PATCH i-g-t v4 0/9] D3Cold Tool & IGT Anshuman Gupta
2022-05-05 11:03 ` [igt-dev] [PATCH i-g-t v4 1/9] test/i915_pm_rpm: Add placement to gem-{mmap-type, execbuf} Anshuman Gupta
2022-05-05 11:03 ` [igt-dev] [PATCH i-g-t v4 2/9] lib/igt_device: Get gfx PCI card root port Anshuman Gupta
2022-05-05 11:03 ` [igt-dev] [PATCH i-g-t v4 3/9] lib/igt_pm: D3Cold runtime pm infrastructure Anshuman Gupta
2022-05-05 16:16 ` Rodrigo Vivi
2022-05-05 11:03 ` [igt-dev] [PATCH i-g-t v4 4/9] tools: Add intel_pm_rpm tool Anshuman Gupta
2022-05-05 16:22 ` Rodrigo Vivi
2022-05-05 11:03 ` [igt-dev] [PATCH i-g-t v4 5/9] tools/intel_pm_rpm: Add an option to configure autosuspend Anshuman Gupta
2022-05-05 16:29 ` Rodrigo Vivi
2022-05-05 11:03 ` Anshuman Gupta [this message]
2022-05-05 11:03 ` [igt-dev] [PATCH i-g-t v4 7/9] i915_pm_rpm: Extend gem_exec_stress test with D3Cold Anshuman Gupta
2022-05-05 11:03 ` [igt-dev] [PATCH i-g-t v4 8/9] i915_pm_rpm: Extend gem_execbuf " Anshuman Gupta
2022-05-05 11:03 ` [igt-dev] [PATCH i-g-t v4 9/9] i915_pm_rpm: Extend gem-mmap-type " Anshuman Gupta
2022-05-05 12:15 ` [igt-dev] ✗ Fi.CI.BAT: failure for D3Cold Tool & IGT (rev4) Patchwork
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=20220505110354.30768-7-anshuman.gupta@intel.com \
--to=anshuman.gupta@intel.com \
--cc=badal.nilawar@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=petri.latvala@intel.com \
--cc=rodrigo.vivi@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.