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 v2 2/3] test/xe_pm: Use fw_handle exit handler for vram-d3cold-threshold
Date: Fri, 22 Sep 2023 18:54:00 +0530 [thread overview]
Message-ID: <20230922132401.177284-3-anshuman.gupta@intel.com> (raw)
In-Reply-To: <20230922132401.177284-1-anshuman.gupta@intel.com>
Scaling forcewake close exit handler for vram-d3cold-threshold
subtest, while doing so add the missing subtest Functionality
as well.
Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
---
tests/intel/xe_pm.c | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/tests/intel/xe_pm.c b/tests/intel/xe_pm.c
index 5495da154..0c15f8d15 100644
--- a/tests/intel/xe_pm.c
+++ b/tests/intel/xe_pm.c
@@ -378,6 +378,7 @@ NULL));
* Description:
* Validate whether card is limited to d3hot while vram used
* is greater than vram_d3cold_threshold.
+ * Functionality: pm-d3cold
*/
static void test_vram_d3cold_threshold(device_t device, int sysfs_fd)
{
@@ -390,7 +391,7 @@ static void test_vram_d3cold_threshold(device_t device, int sysfs_fd)
};
uint64_t vram_used_mb = 0, vram_total_mb = 0, threshold;
uint32_t bo, flags;
- int handle, i;
+ int i;
bool active;
void *map;
@@ -436,10 +437,10 @@ static void test_vram_d3cold_threshold(device_t device, int sysfs_fd)
* the device from runtime suspend.
* Therefore open and close fw handle to wake the device.
*/
- handle = igt_debugfs_open(device.fd_xe, "forcewake_all", O_RDONLY);
- igt_assert(handle >= 0);
+ fw_handle = igt_debugfs_open(device.fd_xe, "forcewake_all", O_RDONLY);
+ igt_assert(fw_handle >= 0);
active = igt_get_runtime_pm_status() == IGT_RUNTIME_PM_STATUS_ACTIVE;
- close(handle);
+ close(fw_handle);
igt_assert(active);
/* Test D3Cold again after freeing up the Xe BO */
@@ -606,18 +607,19 @@ igt_main
}
}
- igt_describe("Validate whether card is limited to d3hot, if vram used > vram threshold");
- igt_subtest("vram-d3cold-threshold") {
- orig_threshold = get_vram_d3cold_threshold(sysfs_fd);
- igt_install_exit_handler(vram_d3cold_threshold_restore);
- test_vram_d3cold_threshold(device, sysfs_fd);
- }
-
igt_subtest_group {
igt_fixture {
igt_install_exit_handler(close_fw_handle);
}
+ igt_describe("Validate whether card is limited to d3hot,"
+ "if vram used > vram threshold");
+ igt_subtest("vram-d3cold-threshold") {
+ orig_threshold = get_vram_d3cold_threshold(sysfs_fd);
+ igt_install_exit_handler(vram_d3cold_threshold_restore);
+ test_vram_d3cold_threshold(device, sysfs_fd);
+ }
+
igt_describe("Validate mmap memory mappings with system region,"
"when device along with parent bridge in d3");
igt_subtest("d3-mmap-system") {
--
2.25.1
next prev parent reply other threads:[~2023-09-22 13:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-22 13:23 [igt-dev] [PATCH i-g-t v2 0/3] Add d3 mmap test Anshuman Gupta
2023-09-22 13:23 ` [igt-dev] [PATCH i-g-t v2 1/3] tests/xe_pm: Add d3-mmap IGT test Anshuman Gupta
2023-09-22 14:22 ` Rodrigo Vivi
2023-09-22 15:00 ` Gupta, Anshuman
2023-09-22 13:24 ` Anshuman Gupta [this message]
2023-09-22 13:24 ` [igt-dev] [PATCH i-g-t v2 3/3] HAX: Add d3-mmap to xe-fast-feedback Anshuman Gupta
2023-09-22 14:35 ` [igt-dev] ✗ Fi.CI.BAT: failure for Add d3 mmap test Patchwork
2023-09-22 15:23 ` [igt-dev] ✓ CI.xeBAT: success " 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=20230922132401.177284-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