From: "Bernatowicz, Marcin" <marcin.bernatowicz@linux.intel.com>
To: Jakub Kolakowski <jakub1.kolakowski@intel.com>,
igt-dev@lists.freedesktop.org
Cc: Adam Miszczak <adam.miszczak@linux.intel.com>,
Lukasz Laguna <lukasz.laguna@intel.com>
Subject: Re: [PATCH i-g-t 2/2] tests/intel/xe_pm: Add a check for power management capability
Date: Thu, 13 Mar 2025 11:33:22 +0100 [thread overview]
Message-ID: <c4cfe888-24e0-44d2-b8d8-f30a32e447cb@linux.intel.com> (raw)
In-Reply-To: <20250311170144.602535-3-jakub1.kolakowski@intel.com>
On 3/11/2025 6:01 PM, Jakub Kolakowski wrote:
> Add a check for power management capability of device tested in tests
> related to D-states. Currently if test is started on configuration
> that does not support the PM capability it doesn't skip, instead
> depending on test it may fail, abort or timeout.
> With this change test will skip with a clear message why it did.
>
> Cc: Adam Miszczak <adam.miszczak@linux.intel.com>
> Cc: Lukasz Laguna <lukasz.laguna@intel.com>
> Cc: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
> Signed-off-by: Jakub Kolakowski <jakub1.kolakowski@intel.com>
> ---
> tests/intel/xe_pm.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/tests/intel/xe_pm.c b/tests/intel/xe_pm.c
> index c2026474d..25fc7bc9f 100644
> --- a/tests/intel/xe_pm.c
> +++ b/tests/intel/xe_pm.c
> @@ -854,6 +854,8 @@ igt_main
>
> for (const struct d_state *d = d_states; d->name; d++) {
> igt_subtest_f("%s-%s-basic-exec", s->name, d->name) {
> + igt_require_f(igt_is_pm_supported(device.pci_root),
> + "PCI power management capability not found\n");
Can we move the check to setup_d3 to avoid duplication ?
> igt_assert(setup_d3(device, d->state));
> test_exec(device, 1, 2, s->state, NO_RPM, 0);
> cleanup_d3(device);
> @@ -870,18 +872,24 @@ igt_main
>
> for (const struct d_state *d = d_states; d->name; d++) {
> igt_subtest_f("%s-basic", d->name) {
> + igt_require_f(igt_is_pm_supported(device.pci_root),
> + "PCI power management capability not found\n");
> igt_assert(setup_d3(device, d->state));
> igt_assert(in_d3(device, d->state));
> cleanup_d3(device);
> }
>
> igt_subtest_f("%s-basic-exec", d->name) {
> + igt_require_f(igt_is_pm_supported(device.pci_root),
> + "PCI power management capability not found\n");
> igt_assert(setup_d3(device, d->state));
> test_exec(device, 1, 1, NO_SUSPEND, d->state, 0);
> cleanup_d3(device);
> }
>
> igt_subtest_f("%s-multiple-execs", d->name) {
> + igt_require_f(igt_is_pm_supported(device.pci_root),
> + "PCI power management capability not found\n");
> igt_assert(setup_d3(device, d->state));
> test_exec(device, 16, 32, NO_SUSPEND, d->state, 0);
> cleanup_d3(device);
> @@ -890,6 +898,8 @@ igt_main
> igt_describe_f("Validate mmap memory mappings with system region,"
> "when device along with parent bridge in %s", d->name);
> igt_subtest_f("%s-mmap-system", d->name) {
> + igt_require_f(igt_is_pm_supported(device.pci_root),
> + "PCI power management capability not found\n");
> igt_assert(setup_d3(device, d->state));
> test_mmap(device, system_memory(device.fd_xe), 0,
> READ, d->state);
> @@ -903,6 +913,8 @@ igt_main
> igt_subtest_f("%s-mmap-vram", d->name) {
> int delay_ms = igt_pm_get_autosuspend_delay(device.pci_xe);
>
> + igt_require_f(igt_is_pm_supported(device.pci_root),
> + "PCI power management capability not found\n");
> /* Give some auto suspend delay to validate rpm active during page fault */
> igt_pm_set_autosuspend_delay(device.pci_xe, 1000);
> igt_assert(setup_d3(device, d->state));
> @@ -919,6 +931,8 @@ igt_main
>
> igt_describe_f("Validate the contents of mocs registers over %s state", d->name);
> igt_subtest_f("%s-mocs", d->name) {
> + igt_require_f(igt_is_pm_supported(device.pci_root),
> + "PCI power management capability not found\n");
> igt_assert(setup_d3(device, d->state));
> test_mocs_suspend_resume(device, NO_SUSPEND, d->state);
> cleanup_d3(device);
> @@ -928,6 +942,8 @@ igt_main
> igt_describe("Validate whether card is limited to d3hot,"
> "if vram used > vram threshold");
> igt_subtest("vram-d3cold-threshold") {
> + igt_require_f(igt_is_pm_supported(device.pci_root),
> + "PCI power management capability not found\n");
> orig_threshold = get_vram_d3cold_threshold(sysfs_fd);
> igt_install_exit_handler(vram_d3cold_threshold_restore);
> test_vram_d3cold_threshold(device, sysfs_fd);
next prev parent reply other threads:[~2025-03-13 10:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-11 17:01 [PATCH i-g-t 0/2] Add a check for power management PCI capability Jakub Kolakowski
2025-03-11 17:01 ` [PATCH i-g-t 1/2] lib/igt_pm: Introduce helper to check for PM capability Jakub Kolakowski
2025-03-13 10:30 ` Bernatowicz, Marcin
2025-03-13 11:12 ` Kamil Konieczny
2025-03-11 17:01 ` [PATCH i-g-t 2/2] tests/intel/xe_pm: Add a check for power management capability Jakub Kolakowski
2025-03-13 10:33 ` Bernatowicz, Marcin [this message]
2025-03-12 4:49 ` ✓ Xe.CI.BAT: success for Add a check for power management PCI capability Patchwork
2025-03-12 5:03 ` ✗ i915.CI.BAT: failure " Patchwork
2025-03-12 20:13 ` ✗ Xe.CI.Full: " 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=c4cfe888-24e0-44d2-b8d8-f30a32e447cb@linux.intel.com \
--to=marcin.bernatowicz@linux.intel.com \
--cc=adam.miszczak@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=jakub1.kolakowski@intel.com \
--cc=lukasz.laguna@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox