All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Daniel Vetter <daniel.vetter@intel.com>
Subject: [PATCH i-g-t] lib/drmtest: Decode driver flags on failure
Date: Tue, 25 Jul 2017 13:37:08 +0200	[thread overview]
Message-ID: <20170725113708.30020-1-daniel.vetter@ffwll.ch> (raw)

I spent too much time going wtf why does this test not run until
realizing that vgem is missing. This should help a lot for tests that
need multiple different drm drivers.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 lib/drmtest.c | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/lib/drmtest.c b/lib/drmtest.c
index 480bd0b132cd..944c6e02fd31 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -341,6 +341,24 @@ static void quiescent_gpu_at_exit_render(int sig)
 	at_exit_drm_render_fd = -1;
 }
 
+static const char *chipset_to_str(int chipset)
+{
+	switch (chipset) {
+	case DRIVER_INTEL:
+		return "intel";
+	case DRIVER_VC4:
+		return "vc4";
+	case DRIVER_VGEM:
+		return "vgem";
+	case DRIVER_VIRTIO:
+		return "virtio";
+	case DRIVER_AMDGPU:
+		return "amdgpu";
+	default:
+		return "any";
+	}
+}
+
 /**
  * drm_open_driver:
  * @chipset: OR'd flags for each chipset to search, eg. #DRIVER_INTEL
@@ -356,7 +374,8 @@ int drm_open_driver(int chipset)
 	int fd;
 
 	fd = __drm_open_driver(chipset);
-	igt_skip_on_f(fd<0, "No known gpu found\n");
+	igt_skip_on_f(fd<0, "No known gpu found for chipset flags 0x%u (%s)\n",
+		      chipset, chipset_to_str(chipset));
 
 	/* For i915, at least, we ensure that the driver is idle before
 	 * starting a test and we install an exit handler to wait until
-- 
2.13.3

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

             reply	other threads:[~2017-07-25 11:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-25 11:37 Daniel Vetter [this message]
2017-07-25 11:49 ` [PATCH i-g-t] lib/drmtest: Decode driver flags on failure Chris Wilson
2017-07-25 12:19   ` Daniel Vetter

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=20170725113708.30020-1-daniel.vetter@ffwll.ch \
    --to=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=intel-gfx@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.