summaryrefslogtreecommitdiff
path: root/tests/gem_exec_nop.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/gem_exec_nop.c')
-rw-r--r--tests/gem_exec_nop.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/tests/gem_exec_nop.c b/tests/gem_exec_nop.c
index dc7f5143..9b892607 100644
--- a/tests/gem_exec_nop.c
+++ b/tests/gem_exec_nop.c
@@ -200,35 +200,25 @@ static void all(int fd, uint32_t handle, int timeout)
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" : "");