summaryrefslogtreecommitdiffstats
path: root/src/loader
Commit message (Collapse)AuthorAgeFilesLines
* loader: add special logic to distinguish nouveau from nouveau_vieuxIlia Mirkin2014-03-194-2/+146
| | | | | | | | | | | There are a lot of different pci ids supported by nouveau, and more are added all the time. The relevant distinguisher between drivers is the chipset id. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Cc: "10.1" <[email protected]>
* dri: Add a useful error message if someone's packages missed libudev deps.Eric Anholt2014-02-011-0/+5
| | | | Reviewed-by: Matt Turner <[email protected]>
* dri: Also support the loader with libudev.so.0.Eric Anholt2014-02-011-0/+10
| | | | | | | | | As far as I know, this should be safe. If not, we have to decide whether to have variable lookup of the functions, or just drop support for .so.0 (which is a year and a half old it looks like) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74127 Reviewed-by: Matt Turner <[email protected]>
* loader: do not print the pci id during normal operationEmil Velikov2014-01-291-1/+1
| | | | | | | | | | | | Spamming the pci id is not beneficial. Make sure it's printed only when needed. v2: Change severity to _LOADER_DEBUG, rather than removing the message. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* loader: print WARNING and FATAL messages using the default loggerEmil Velikov2014-01-291-1/+1
| | | | | | | | Lower values are used for more severe cases. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* loader: include dlfcn.h when building with HAVE_LIBUDEVEmil Velikov2014-01-281-0/+2
| | | | | | | | | | | | | The code depending on the definitions is already wrapped in the same conditional so go ahead and wrap the include. Otherwise we'll brake compilation on platforms that are missing the header. Add assert.h in there as well, as it is introduced and used in the same fashon. Cc: Eric Anholt <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74122 Signed-off-by: Emil Velikov <[email protected]>
* loader: Add missing \n on message printingEmil Velikov2014-01-271-12/+11
| | | | | | | | Cover both loader and glx/dri_glx Drop \n from the default loader logger Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* loader: Use dlsym to get our udev symbols instead of explicit linking.Eric Anholt2014-01-272-4/+43
| | | | | | | | | | | | | | | | Steam links against libudev.so.0, while we're linking against libudev.so.1. The result is that the symbol names (which are the same in the two libraries) end up conflicting, and some of the usage of .so.1 calls the .so.0 bits, which have different internal structures, and segfaults happen. By using a dlopen() with RTLD_LOCAL, we can explicitly look for the symbols we want, while they get the symbols they want. Reviewed-by: Keith Packard <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Tested-by: Alexandre Demers <[email protected]> Tested-by: Mike Lothian <[email protected]>
* logger: Remove unused variable.José Fonseca2014-01-201-1/+0
| | | | | | Silences gcc "unused variable ‘buf’" warning. Trivial.
* logger: s/\<log\>/log_/José Fonseca2014-01-201-13/+13
| | | | | | | | | Currently the MSVC build is broken because of conflicting definitions of 'log' function. I didn't investigate thoroughly, but I suspect the it is conflicting standard math.h's log. log_ is admittedly not a great name, but it is better than a broken build. A better one can be used in a follow-on build.
* loader: ifdef libdrm specific code and includeEmil Velikov2014-01-194-8/+19
| | | | | | | | | | | | | | | | | | | | | | | | | Mesa provides the flexibility of building without the need to have libdrm present on the system. The situation has regressed with the recent commit commit 8c2e7fd8460750543367053b1be9368cc38e1d6a Author: Emil Velikov <[email protected]> Date: Fri Jan 10 23:36:16 2014 +0000 loader: introduce the loader util lib By isolating libdrm code by #ifndef __NOT_HAVE_DRM_H we can have libdrm-less builds on across all build systems. This patch converts Android's _EGL_NO_DRM to __NOT_HAVE_DRM_H to provide consistency with the other cases within mesa, allows compilation of libloader on libdrm-less scons and conditionally links against libdrm if present under automake. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73776 BUgzilla: https://bugs.freedesktop.org/show_bug.cgi?id=73777 Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* loader: fallback to drmGetVersion() for non-pci devicesRob Clark2014-01-181-2/+14
| | | | | | | | | | | | Use the kernel driver name are returned by drmGetVersion() for non-pci(platform) devices. Signed-off-by: Rob Clark <[email protected]> v2 (Emil): Rebased and weaked commit message. Reviewed-by: Rob Clark <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* pci_ids: no not include loader.hEmil Velikov2014-01-181-1/+0
| | | | | | | | | | | | | | As per original approach by Rob, each user of the loader lib should include loader.h and the pci_id_driver_map.h header will be used exclusively by the loader. Add back the include guard __IS_LOADER and remove no longer needed include folder in the scons build. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Rob Clark <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* loader: introduce the loader util libEmil Velikov2014-01-186-0/+476
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 <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Rob Clark <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Reviewed-by: Ian Romanick <[email protected]>