summaryrefslogtreecommitdiff
path: root/tests/gem_sync.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/gem_sync.c')
-rw-r--r--tests/gem_sync.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/tests/gem_sync.c b/tests/gem_sync.c
index 44b2378c..2a80efc4 100644
--- a/tests/gem_sync.c
+++ b/tests/gem_sync.c
@@ -693,35 +693,25 @@ store_all(int fd, int num_children)
static void print_welcome(int fd)
{
bool active;
- char *str;
int dir;
dir = igt_sysfs_open_parameters(fd);
if (dir < 0)
return;
- str = igt_sysfs_get(dir, "enable_guc_submission");
- active = str && atoi(str) > 0;
- free(str);
-
+ active = igt_sysfs_get_boolean(dir, "enable_guc_submission");
if (active) {
igt_info("Using GuC submission\n");
goto out;
}
- str = igt_sysfs_get(dir, "enable_execlists");
- active = str && atoi(str) > 0;
- free(str);
-
+ active = igt_sysfs_get_boolean(dir, "enable_execlists");
if (active) {
igt_info("Using Execlists submission\n");
goto out;
}
- str = igt_sysfs_get(dir, "semaphores");
- active = str && atoi(str) > 0;
- free(str);
-
+ active = igt_sysfs_get_boolean(dir, "semaphores");
igt_info("Using Legacy submission %s\n",
active ? ", with semaphores" : "");