Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mohammed Thasleem <mohammed.thasleem@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: [igt-dev] [PATCH v4 1/2] tests/intel/xe_pm : Add support to disable all crtc
Date: Wed, 29 Nov 2023 03:00:50 +0530	[thread overview]
Message-ID: <20231128213050.28999-1-mohammed.thasleem@intel.com> (raw)
In-Reply-To: <20230718110852.2965553-3-anshuman.gupta@intel.com>

From: Anshuman Gupta <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().

v2: Update DPMS OFF and DPMS ON function name.

Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
Signed-off-by: Mohammed Thasleem <mohammed.thasleem@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
---
 tests/intel/xe_pm.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/tests/intel/xe_pm.c b/tests/intel/xe_pm.c
index 9423984cc..54f9c0f5e 100644
--- a/tests/intel/xe_pm.c
+++ b/tests/intel/xe_pm.c
@@ -16,6 +16,7 @@
 
 #include "igt.h"
 #include "lib/igt_device.h"
+#include "lib/igt_kms.h"
 #include "lib/igt_pm.h"
 #include "lib/igt_sysfs.h"
 #include "lib/igt_syncobj.h"
@@ -94,6 +95,8 @@ static void vram_d3cold_threshold_restore(int sig)
 
 static bool setup_d3(device_t device, enum igt_acpi_d_state state)
 {
+	update_display(device.fd_xe);
+
 	switch (state) {
 	case IGT_ACPI_D3Cold:
 		igt_require(igt_pm_acpi_d3cold_supported(device.pci_root));
@@ -110,6 +113,11 @@ static bool setup_d3(device_t device, enum igt_acpi_d_state state)
 	return false;
 }
 
+static void cleanup_d3(device_t device)
+{
+	update_display(device.fd_xe);
+}
+
 static bool in_d3(device_t device, enum igt_acpi_d_state state)
 {
 	uint16_t val;
@@ -510,6 +518,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);
 			}
 		}
 	}
@@ -518,6 +527,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) {
@@ -525,6 +535,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) {
@@ -532,6 +543,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

  parent reply	other threads:[~2023-11-28 21:41 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 ` [igt-dev] [PATCH i-g-t v3 2/3] tests/xe_pm : Add support to disable all crtc Anshuman Gupta
2023-07-18 19:04   ` Rodrigo Vivi
2023-11-28 21:30   ` Mohammed Thasleem [this message]
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=20231128213050.28999-1-mohammed.thasleem@intel.com \
    --to=mohammed.thasleem@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