summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/etnaviv/drm/tests/etnaviv_bo_cache_test.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/etnaviv/drm/tests/etnaviv_bo_cache_test.c b/src/etnaviv/drm/tests/etnaviv_bo_cache_test.c
index 8bdacf97e32..256960115e1 100644
--- a/src/etnaviv/drm/tests/etnaviv_bo_cache_test.c
+++ b/src/etnaviv/drm/tests/etnaviv_bo_cache_test.c
@@ -83,10 +83,16 @@ int main(int argc, char *argv[])
drmVersionPtr version;
int fd, ret = 0;
+ const char *node = "/dev/dri/renderD128";
- fd = open(argv[1], O_RDWR);
- if (fd < 0)
+ if (argc > 1)
+ node = argv[1];
+
+ fd = open(node, O_RDWR);
+ if (fd < 0) {
+ fprintf(stderr, "Failed to open render node %s.\n", node);
return 1;
+ }
version = drmGetVersion(fd);
if (version) {