[igt-dev] [PATCH i-g-t v8 6/6] tests/intel/xe_create: use drm helper for GPUs count
Kamil Konieczny
kamil.konieczny at linux.intel.com
Wed Oct 4 16:49:42 UTC 2023
Instead of counting filter use more general method supported
by new function from drmtest, drm_get_gpu_count().
Signed-off-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>
---
tests/intel/xe_create.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/intel/xe_create.c b/tests/intel/xe_create.c
index ee970450f..4feabb70c 100644
--- a/tests/intel/xe_create.c
+++ b/tests/intel/xe_create.c
@@ -237,14 +237,14 @@ igt_main
}
igt_subtest("multigpu-create-massive-size") {
- int gpu_filter_count = igt_device_filter_count();
+ int gpu_filter_count = drm_get_gpu_count(DRIVER_XE);
igt_require(xe > 0);
igt_require(gpu_filter_count >= 2);
igt_multi_fork(child, gpu_filter_count) {
int gpu_fd;
- gpu_fd = child ? __drm_open_driver_another(child, DRIVER_XE) : drm_reopen_driver(xe);
+ gpu_fd = __drm_open_driver_another(child, DRIVER_XE);
igt_assert_f(gpu_fd > 0, "cannot open gpu-%d, errno=%d\n", child, errno);
create_massive_size(gpu_fd);
--
2.42.0
More information about the igt-dev
mailing list