summaryrefslogtreecommitdiffstats
path: root/graphics/libGL/files/patch-src__gallium__auxiliary__pipe-loader__pipe_loader_drm.c
diff options
context:
space:
mode:
authorkwm <kwm@058c260c-8361-11dd-a0ac-aa2bafec7d09>2014-09-30 05:36:10 +0800
committerkwm <kwm@058c260c-8361-11dd-a0ac-aa2bafec7d09>2014-09-30 05:36:10 +0800
commit108bf5e85323b80898eaced852f4235bfcf6025b (patch)
tree5f3ed89a129a3bbc45cd1cd39e653744f050d896 /graphics/libGL/files/patch-src__gallium__auxiliary__pipe-loader__pipe_loader_drm.c
parent4d2819f479f4e41168035284eea614b5a5ed9dab (diff)
downloadxorg-devel-ports-108bf5e85323b80898eaced852f4235bfcf6025b.tar
xorg-devel-ports-108bf5e85323b80898eaced852f4235bfcf6025b.tar.gz
xorg-devel-ports-108bf5e85323b80898eaced852f4235bfcf6025b.tar.bz2
xorg-devel-ports-108bf5e85323b80898eaced852f4235bfcf6025b.tar.lz
xorg-devel-ports-108bf5e85323b80898eaced852f4235bfcf6025b.tar.xz
xorg-devel-ports-108bf5e85323b80898eaced852f4235bfcf6025b.tar.zst
xorg-devel-ports-108bf5e85323b80898eaced852f4235bfcf6025b.zip
"Merge" the gbm work from experimental to trunk. next gen gnome3 needs gbm.
git-svn-id: https://trillian.chruetertee.ch/svn/ports/trunk@1517 058c260c-8361-11dd-a0ac-aa2bafec7d09
Diffstat (limited to 'graphics/libGL/files/patch-src__gallium__auxiliary__pipe-loader__pipe_loader_drm.c')
-rw-r--r--graphics/libGL/files/patch-src__gallium__auxiliary__pipe-loader__pipe_loader_drm.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/graphics/libGL/files/patch-src__gallium__auxiliary__pipe-loader__pipe_loader_drm.c b/graphics/libGL/files/patch-src__gallium__auxiliary__pipe-loader__pipe_loader_drm.c
new file mode 100644
index 0000000..071391b
--- /dev/null
+++ b/graphics/libGL/files/patch-src__gallium__auxiliary__pipe-loader__pipe_loader_drm.c
@@ -0,0 +1,43 @@
+--- ./src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c.orig 2014-02-03 18:42:39.000000000 +0100
++++ ./src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c 2014-02-15 21:11:55.000000000 +0100
+@@ -32,7 +32,14 @@
+
+ #include <fcntl.h>
+ #include <stdio.h>
++
++#if defined(HAVE_LIBUDEV)
+ #include <libudev.h>
++#elif defined(HAVE_LIBDEVQ)
++#include <libdevq.h>
++#include <stdlib.h>
++#endif
++
+ #include <xf86drm.h>
+
+ #ifdef HAVE_PIPE_LOADER_XCB
+@@ -62,6 +69,7 @@
+ static boolean
+ find_drm_pci_id(struct pipe_loader_drm_device *ddev)
+ {
++#if defined(HAVE_LIBUDEV)
+ struct udev *udev = NULL;
+ struct udev_device *parent, *device = NULL;
+ struct stat stat;
+@@ -100,6 +108,17 @@
+ udev_unref(udev);
+
+ return FALSE;
++#elif defined(HAVE_LIBDEVQ)
++ int ret;
++
++ ret = devq_device_get_pciid_from_fd(ddev->fd,
++ &ddev->base.u.pci.vendor_id,
++ &ddev->base.u.pci.chip_id);
++ if (ret < 0)
++ return FALSE;
++
++ return TRUE;
++#endif
+ }
+
+ static boolean