From: "José Roberto de Souza" <jose.souza@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t v5 1/2] lib: Require drmModeResources()
Date: Thu, 13 Sep 2018 16:40:17 -0700 [thread overview]
Message-ID: <20180913234018.31478-1-jose.souza@intel.com> (raw)
From: Chris Wilson <chris@chris-wilson.co.uk>
If modesetting is not supported, the drmModeGetResources() call will
fail with -EINVAL (or -ENOTSUPP). As no displays are connected, skip.
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
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
next reply other threads:[~2018-09-13 23:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-13 23:40 José Roberto de Souza [this message]
2018-09-13 23:40 ` [igt-dev] [PATCH i-g-t v5 2/2] tests: Check and skip unhandled tests that needs display José Roberto de Souza
2018-09-14 9:28 ` [igt-dev] ✓ Fi.CI.IGT: success for series starting with [i-g-t,v5,1/2] lib: Require drmModeResources() Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180913234018.31478-1-jose.souza@intel.com \
--to=jose.souza@intel.com \
--cc=igt-dev@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).