From: Emil Velikov <emil.l.velikov@gmail.com>
To: dri-devel@lists.freedesktop.org
Cc: emil.l.velikov@gmail.com
Subject: [PATCH libdrm 5/5] tests/drmdevice: use drmGetDevice[s]2
Date: Wed, 30 Nov 2016 20:35:11 +0000 [thread overview]
Message-ID: <20161130203511.18910-5-emil.l.velikov@gmail.com> (raw)
In-Reply-To: <20161130203511.18910-1-emil.l.velikov@gmail.com>
From: Emil Velikov <emil.velikov@collabora.com>
... alongside the DRM_DEVICE_IGNORE_PCI_REVISION flag.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
---
tests/drmdevice.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/drmdevice.c b/tests/drmdevice.c
index 72e7066..dcad527 100644
--- a/tests/drmdevice.c
+++ b/tests/drmdevice.c
@@ -70,7 +70,7 @@ main(void)
drmDevicePtr device;
int fd, ret, max_devices;
- max_devices = drmGetDevices(NULL, 0);
+ max_devices = drmGetDevices2(DRM_DEVICE_IGNORE_PCI_REVISION, NULL, 0);
if (max_devices <= 0) {
printf("drmGetDevices() has returned %d\n", max_devices);
@@ -83,7 +83,7 @@ main(void)
return -1;
}
- ret = drmGetDevices(devices, max_devices);
+ ret = drmGetDevices2(DRM_DEVICE_IGNORE_PCI_REVISION, devices, max_devices);
if (ret < 0) {
printf("drmGetDevices() returned an error %d\n", ret);
free(devices);
@@ -102,7 +102,7 @@ main(void)
continue;
}
- if (drmGetDevice(fd, &device) == 0) {
+ if (drmGetDevice2(fd, DRM_DEVICE_IGNORE_PCI_REVISION, &device) == 0) {
print_device_info(device, i);
drmFreeDevice(&device);
}
--
2.10.2
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2016-11-30 20:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-30 20:35 [PATCH libdrm 1/5] xf86drm: use maj/min in drmParsePciDeviceInfo() Emil Velikov
2016-11-30 20:35 ` [PATCH libdrm 2/5] xf86drm: add plumbing to not retrieve PCI device revision Emil Velikov
2016-11-30 20:35 ` [PATCH libdrm 3/5] xf86drm: parse the separate sysfs files for vendor... info Emil Velikov
2016-11-30 20:35 ` [PATCH libdrm 4/5] xf86drm: introduce drmGetDevice[s]2 Emil Velikov
2016-12-01 3:09 ` Michel Dänzer
2016-12-01 3:56 ` Michel Dänzer
2016-12-01 13:35 ` Emil Velikov
2016-11-30 20:35 ` Emil Velikov [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-12-02 16:32 [PATCH libdrm 1/5] xf86drm: use maj/min in drmParsePciDeviceInfo() Emil Velikov
2016-12-02 16:32 ` [PATCH libdrm 5/5] tests/drmdevice: use drmGetDevice[s]2 Emil Velikov
2016-12-05 9:39 ` Michel Dänzer
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=20161130203511.18910-5-emil.l.velikov@gmail.com \
--to=emil.l.velikov@gmail.com \
--cc=dri-devel@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).