All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomeu Vizoso <tomeu.vizoso@collabora.com>
To: Intel GFX discussion <intel-gfx@lists.freedesktop.org>
Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Subject: [PATCH i-g-t] lib/drmtest: Take DRIVER_ANY into account when opening the DRM device
Date: Thu, 27 Oct 2016 09:58:19 +0200	[thread overview]
Message-ID: <1477555099-2333-1-git-send-email-tomeu.vizoso@collabora.com> (raw)

__drm_open_driver was changed to bail out on VGEM devices unless they
are explicitly asked for (DRIVER_VGEM). But with that change we lost
support for DRIVER_ANY.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Fixes: 7ce63894854d ("lib: Support opening vGEM device")
Cc: Chris Wilson <chris@chris-wilson.co.uk>
---
 lib/drmtest.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/drmtest.c b/lib/drmtest.c
index 5d3aaa836735..786ffa1b1fae 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -269,6 +269,10 @@ int __drm_open_driver(int chipset)
 		    is_virtio_device(fd))
 			return fd;
 
+		/* Only VGEM-specific tests should be run on VGEM */
+		if (chipset & DRIVER_ANY && !is_vgem_device(fd))
+			return fd;
+
 		close(fd);
 	}
 
-- 
2.7.4

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

             reply	other threads:[~2016-10-27  7:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-27  7:58 Tomeu Vizoso [this message]
2016-10-27  8:06 ` [PATCH i-g-t] lib/drmtest: Take DRIVER_ANY into account when opening the DRM device Chris Wilson
2016-10-27  8:24   ` Tomeu Vizoso

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=1477555099-2333-1-git-send-email-tomeu.vizoso@collabora.com \
    --to=tomeu.vizoso@collabora.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.