[PATCH i-g-t 2/2] tests/intel/xe_mmap: Acquire rpm ref for all other pci-membarrier tests
Kolanupaka Naveena
kolanupaka.naveena at intel.com
Fri May 16 10:51:49 UTC 2025
To make sure the device is awake during the access. If not the read is
getting a special value 0xffffffff thus leading to error.
Suggested-by: Matthew Auld <matthew.auld at intel.com>
Signed-off-by: Kolanupaka Naveena <kolanupaka.naveena at intel.com>
---
tests/intel/xe_mmap.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/tests/intel/xe_mmap.c b/tests/intel/xe_mmap.c
index 51c27586f..061b3de0a 100644
--- a/tests/intel/xe_mmap.c
+++ b/tests/intel/xe_mmap.c
@@ -406,6 +406,7 @@ static bool is_pci_membarrier_supported(int fd)
igt_main
{
int fd;
+ int fw_handle = -1;
igt_fixture
fd = drm_open_driver(DRIVER_XE);
@@ -423,14 +424,16 @@ igt_main
igt_subtest("pci-membarrier") {
igt_require(is_pci_membarrier_supported(fd));
+ fw_handle = igt_debugfs_open(fd, "forcewake_all", O_RDONLY);
+ igt_assert_lte(0, fw_handle);
test_pci_membarrier(fd);
+ close(fw_handle);
}
igt_subtest("pci-membarrier-parallel") {
int xe;
unsigned int i;
uint32_t *ptr;
- int fw_handle = -1;
igt_require(is_pci_membarrier_supported(fd));
xe = drm_open_driver(DRIVER_XE);
@@ -449,7 +452,10 @@ igt_main
igt_subtest("pci-membarrier-bad-pagesize") {
igt_require(is_pci_membarrier_supported(fd));
+ fw_handle = igt_debugfs_open(fd, "forcewake_all", O_RDONLY);
+ igt_assert_lte(0, fw_handle);
test_bad_pagesize_for_pcimem(fd);
+ close(fw_handle);
}
igt_subtest("bad-flags")
@@ -463,7 +469,10 @@ igt_main
igt_subtest("pci-membarrier-bad-object") {
igt_require(is_pci_membarrier_supported(fd));
+ fw_handle = igt_debugfs_open(fd, "forcewake_all", O_RDONLY);
+ igt_assert_lte(0, fw_handle);
test_bad_object_for_pcimem(fd);
+ close(fw_handle);
}
igt_subtest("small-bar") {
--
2.34.1
More information about the igt-dev
mailing list