Thread (4 messages) 4 messages, 2 authors, 2018-09-13

[igt-dev] [PATCH i-g-t v4 1/2] lib: Require drmModeResources()

From: José Roberto de Souza <hidden>
Date: 2018-09-13 20:39:40
Subsystem: library code, the rest · Maintainers: Andrew Morton, Linus Torvalds

From: Chris Wilson <redacted>

If modesetting is not supported, the drmModeGetResources() call will
fail with -EINVAL (or -ENOTSUPP). As no displays are connected, skip.

Signed-off-by: Chris Wilson <redacted>
---
 lib/igt_kms.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 4563bfd9..c20cf1eb 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -1857,7 +1857,7 @@ void igt_display_init(igt_display_t *display, int drm_fd)
 	display->drm_fd = drm_fd;
 
 	resources = drmModeGetResources(display->drm_fd);
-	igt_assert(resources);
+	igt_require(resources);
 
 	/*
 	 * We cache the number of pipes, that number is a physical limit of the
-- 
2.19.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help