path: root/src/loader/loader.h
AgeCommit message (Collapse)AuthorFilesLines
2015-06-23loader: Rename drm_open_device() to loader_open_device() and share itDerek Foreman1-0/+3
This is already our common idiom for opening files with CLOEXEC and it's a little ugly, so let's share this one implementation. Signed-off-by: Derek Foreman <> Reviewed-by: Kristian Høgsberg <> Reviewed-by: Emil Velikov <>
2015-05-14egl: Add needed extern "C" for C++ accessAlexander von Gluck IV1-0/+9
* Haiku's egl driver is C++ due to the interface natively being C++ Reviewed-⁠by: Brian Paul <>
2015-04-27Fix a few typosZoë Blade1-1/+1
Reviewed-by: Francisco Jerez <>
2014-07-01loader: add gpu selection code via DRI_PRIME.Axel Davy1-0/+7
v2: Fix the leak of device_name v3: Rebased It enables to use the DRI_PRIME env var to specify which gpu to use. Two syntax are supported: If DRI_PRIME is 1 it means: take any other gpu than the default one. If DRI_PRIME is the ID_PATH_TAG of a device: choose this device if possible. The ID_PATH_TAG is a tag filled by udev. You can check it with 'udevadm info' on the device node. For example it can be "pci-0000_01_00_0". Render-nodes need to be enabled to choose another gpu, and they need to have the ID_PATH_TAG advertised. It is possible for not very recent udev that the tag is not advertised for render-nodes, then ones need to add a file containing: SUBSYSTEM=="drm", IMPORT{builtin}="path_id" in /etc/udev/rules.d/ Signed-off-by: Axel Davy <> Reviewed-by: Emil Velikov <> Signed-off-by: Dave Airlie <>
2014-01-18loader: introduce the loader util libEmil Velikov1-0/+57
All the various window system integration layers duplicate roughly the same code for figuring out device and driver name, pci-id's, etc. Which is sad. So extract it out into a loader util lib. v2 (Emil) * Separate the introduction of libloader from the code de-duplication. * Strip out non-pci devices support. * Add scons + Android build system support. * Add VISIBILITY_CFLAGS to avoid exporting the loader funcs. v3 (Emil) * PIPE_OS_ANDROID is undefined at this scope, use ANDROID * Make sure we define _EGL_NO_DRM when building only swrast Signed-off-by: Rob Clark <> Signed-off-by: Emil Velikov <> Reviewed-by: Rob Clark <> Reviewed-by: Kristian Høgsberg <> Reviewed-by: Ian Romanick <>