From: Anshuman Gupta <anshuman.gupta@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: badal.nilawar@intel.com, rodrigo.vivi@intel.com
Subject: [igt-dev] [PATCH i-g-t v3 2/3] tests/xe_pm : Add support to disable all crtc
Date: Tue, 18 Jul 2023 16:38:51 +0530 [thread overview]
Message-ID: <20230718110852.2965553-3-anshuman.gupta@intel.com> (raw)
In-Reply-To: <20230718110852.2965553-1-anshuman.gupta@intel.com>
xe_pm d3 test requires to turn off all crtc in order to enter
to d3 state therefore, adding the support to triggering
"DPMS OFF" in setup_d3() and "DPMS ON" in cleanup_d3().
Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
---
tests/xe/xe_pm.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/tests/xe/xe_pm.c b/tests/xe/xe_pm.c
index 23b8246ed..11a4c3705 100644
--- a/tests/xe/xe_pm.c
+++ b/tests/xe/xe_pm.c
@@ -18,6 +18,7 @@
#include "igt.h"
#include "lib/igt_device.h"
+#include "lib/igt_kms.h"
#include "lib/igt_pm.h"
#include "lib/igt_syncobj.h"
#include "lib/intel_reg.h"
@@ -78,6 +79,8 @@ static void set_d3cold_allowed(struct pci_device *pci,
static bool setup_d3(device_t device, enum igt_acpi_d_state state)
{
+ igt_dpms_turn_off_display(device.fd_xe);
+
switch (state) {
case IGT_ACPI_D3Cold:
igt_require(igt_pm_acpi_d3cold_supported(device.pci_root));
@@ -94,6 +97,11 @@ static bool setup_d3(device_t device, enum igt_acpi_d_state state)
return false;
}
+static void cleanup_d3(device_t device)
+{
+ igt_dpms_turn_on_display(device.fd_xe);
+}
+
static bool in_d3(device_t device, enum igt_acpi_d_state state)
{
uint16_t val;
@@ -412,6 +420,7 @@ igt_main
xe_for_each_hw_engine(device.fd_xe, hwe)
test_exec(device, hwe, 1, 2, s->state,
NO_RPM);
+ cleanup_d3(device);
}
}
}
@@ -420,6 +429,7 @@ igt_main
igt_subtest_f("%s-basic", d->name) {
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) {
@@ -427,6 +437,7 @@ igt_main
xe_for_each_hw_engine(device.fd_xe, hwe)
test_exec(device, hwe, 1, 1,
NO_SUSPEND, d->state);
+ cleanup_d3(device);
}
igt_subtest_f("%s-multiple-execs", d->name) {
@@ -434,6 +445,7 @@ igt_main
xe_for_each_hw_engine(device.fd_xe, hwe)
test_exec(device, hwe, 16, 32,
NO_SUSPEND, d->state);
+ cleanup_d3(device);
}
}
--
2.25.1
next prev parent reply other threads:[~2023-07-18 11:09 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-18 11:08 [igt-dev] [PATCH i-g-t v3 0/3] vram d3cold threshold test Anshuman Gupta
2023-07-18 11:08 ` [igt-dev] [PATCH i-g-t v3 1/3] lib/igt_kms: Add helper with DPMS to turn on and off the displays Anshuman Gupta
2023-07-18 19:03 ` Rodrigo Vivi
2023-08-07 9:32 ` [igt-dev] [PATCH v4 3/3] " Mohammed Thasleem
2023-08-07 15:13 ` Rodrigo Vivi
2023-08-07 17:04 ` Modem, Bhanuprakash
2023-09-07 19:22 ` [igt-dev] [PATCH i-g-t] lib/igt_kms: Add helper " Mohammed Thasleem
2023-09-08 5:14 ` Modem, Bhanuprakash
2023-09-08 5:17 ` Modem, Bhanuprakash
2023-09-12 8:11 ` Mohammed Thasleem
2023-09-13 11:02 ` Juha-Pekka Heikkila
2023-11-28 21:31 ` [igt-dev] [PATCH v4 2/2] tests/intel/xe_pm: " Mohammed Thasleem
2023-11-29 15:04 ` Kamil Konieczny
2023-07-18 11:08 ` Anshuman Gupta [this message]
2023-07-18 19:04 ` [igt-dev] [PATCH i-g-t v3 2/3] tests/xe_pm : Add support to disable all crtc Rodrigo Vivi
2023-11-28 21:30 ` [igt-dev] [PATCH v4 1/2] tests/intel/xe_pm " Mohammed Thasleem
2023-07-18 11:08 ` [igt-dev] [PATCH i-g-t v3 3/3] test/xe_pm: Add vram_d3cold_threshold subtest Anshuman Gupta
2023-07-20 21:07 ` Rodrigo Vivi
2023-07-21 7:22 ` Gupta, Anshuman
2023-07-21 15:06 ` Vivi, Rodrigo
2023-07-21 4:04 ` Nilawar, Badal
2023-07-21 7:17 ` Gupta, Anshuman
2023-07-18 12:42 ` [igt-dev] ○ CI.xeBAT: info for vram d3cold threshold test (rev3) Patchwork
2023-07-18 12:55 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2023-07-18 16:56 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2023-08-07 12:41 ` [igt-dev] ○ CI.xeBAT: info for vram d3cold threshold test (rev4) Patchwork
2023-08-07 12:49 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2023-08-07 17:25 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2023-09-07 19:38 ` [igt-dev] ✗ Fi.CI.BUILD: failure for vram d3cold threshold test (rev5) Patchwork
2023-09-12 11:30 ` [igt-dev] ✗ Fi.CI.BUILD: failure for vram d3cold threshold test (rev6) Patchwork
2023-11-28 21:59 ` [igt-dev] ✗ Fi.CI.BUILD: failure for vram d3cold threshold test (rev8) 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=20230718110852.2965553-3-anshuman.gupta@intel.com \
--to=anshuman.gupta@intel.com \
--cc=badal.nilawar@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox