summaryrefslogtreecommitdiff
path: root/src/egl/main/egldriver.c
AgeCommit message (Collapse)Author
2010-05-13egl: Allow a prioritized list of default driversKristian Høgsberg
When there is no user driver or any matching display drivers we fall back to the default driver. This patch lets us have a list of default drivers instead of just one. The drivers are loaded in turn and we attempt to initialize the display. If it fails we unload the driver and move on to the next one. Compared to the display driver mechanism, this avoids loading a number of drivers and then only using one. Also, we call Initialize to see if the driver will work instead of relying on Probe. To know for sure that a driver will work, Probe really have to do a full Initialize, so we will just use Initialize directly.
2010-05-13egl: Drop broken _EGL_PLATFORM_NO_OS codeKristian Høgsberg
It would do strlen(library_suffix()) in _eglLoaderFile(), with library_suffix() returning NULL. So obviuosly not used or tested.
2010-05-13egl: Don't try to load driver basename if the platform needs a suffixKristian Høgsberg
That is, don't dlopen(egl_glx) when we know we need to append .so.
2010-05-08egl: Add _eglSearchPathForEach.Chia-I Wu
The function can be used by a driver to check each search path of EGL.
2010-02-19egl: Silence warnings when compiled with -pedantic.Chia-I Wu
Just follow gcc's advices here.
2010-02-17egl: Revisit global data locking.Chia-I Wu
Lock the global mutex in _eglPreloadDrivers and _eglAllocScreenHandle. Add comments to why certain pathes do not need locking.
2010-02-04egl: fix wrong argument. Use loader_data instead of loaderIgor Oliveira
2010-02-03egl: Rename _eglPreloadForEach callbacks.Chia-I Wu
Rename _eglPreloadFile to _eglLoaderFile, and _eglPreloadFile to _eglLoaderFile. There are several _eglPreload* functions. The callbacks do not belong to them and it should be better to give them a different prefix.
2010-02-03egl: Fix a potential segfault in driver suffix matching.Chia-I Wu
The driver suffix might be NULL on some platforms. Perform the matching only when there is a suffix.
2010-02-03egl: Remove unnecessary #ifdef's.Chia-I Wu
There were some refactorings with the addition of EGL_DRIVERS_PATH. They made some platform #ifdef's unnecessary.
2010-02-03egl: Ignore certain environment variables when setuid/setgid.Chia-I Wu
Specifically, ignore EGL_DRIVERS_PATH when an application is setuid/setgid. And ignore EGL_DRIVER when there is a slash in it.
2010-02-03egl: Add EGL_DRIVERS_PATH environment variable.Chia-I Wu
EGL_DRIVERS_PATH gives a list of colon-separated directories. The given directories will be searched when preloading drivers. This is based on Mike Stroyan's patch, which honors the variable in _eglPreloadDisplayDrivers. It is extended to honor the variable also in _eglPreloadUserDriver and _eglPreloadDefaultDriver in this version.
2010-01-31egl: Remove unnecessary headers.Vinson Lee
2010-01-30egl: Clean up header inclusions.Chia-I Wu
Mainly to remove eglcurrent.h and egldisplay.h from eglglobals.h.
2010-01-26egl: Remove _eglOpenDriver and _eglCloseDriver.Chia-I Wu
_eglCloseDriver is no-op and _eglOpenDriver does nothing but call _eglMatchDriver. Export _eglMatchDriver directly.
2010-01-25egl: Add support for EGL_KHR_image.Chia-I Wu
Individual drivers still need to implement the API hooks.
2010-01-24egl: Add and use make_library_path.Chia-I Wu
Add a platform specific function to turn a library name to a library path. It is used to convert EGL_DRIVER or the default driver to a library path that can be loaded.
2010-01-24egl: Remove _eglFindAPIs.Chia-I Wu
This function is not used and should have been removed by last commit. My mistake.
2010-01-22egl: Remove egl_softpipe.Chia-I Wu
With the addition egl_x11_swrast, egl_softpipe is sort of deprecated. The new driver serves the same purpose as egl_softpipe does. It is based on egl_g3d and provides more features.
2010-01-20egl: Add a simple cache for driver probe.Chia-I Wu
In current design, multiple drivers will probe the same display and the best driver is determined. The cache can be used by the drivers to store and share the probed data.
2010-01-20egl: Improve driver matching.Chia-I Wu
Make drv->Probe return a score so that the matching can be done by finding the driver with the highest score.
2010-01-20egl: Rename _EGL_PLATFORM_X to _EGL_PLATFORM_POSIX.Chia-I Wu
The macro is used to determine if dlfcn.h or dirent.h is available. POSIX is a better name than X in such case.
2010-01-20egl: Remove unused driver and display functions.Chia-I Wu
Remove _eglPreloadDriver, _eglLookupDriver, and _eglSplitDisplayString.
2010-01-20egl: Add _eglPreloadDrivers.Chia-I Wu
It can be used to load the user driver specified by EGL_DRIVER, or a set of drivers specified by EGL_DISPLAY, or the default driver, and in that order.
2009-10-15egl: Rework the synchronization primitives.Chia-I Wu
This adds error checking to the synchronization primitives. And eglWaitGL is now implemented by eglWaitClient. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-10-13egl: Add support for driver built-in.Chia-I Wu
This allows an EGL driver to be compiled together with libEGL.so. It eliminates the need to specify a driver, or support module loading on new platforms. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-21egl: Make _eglChooseDriver return the filename of the driver.Chia-I Wu
The real difference is that the driver suffix is now appended. This also fixes an annoying bug that EGL_DRIVER could not specify the path to a driver because a suffix was always appended. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-21egl: Remove dependency on libX11.Chia-I Wu
libX11 is used to determine the screen number, which is in turned used to determine the DRI driver. However, the sysfs interface for determining the DRI driver is gone, and no working driver depends on this mechanism. Display string parsing is moved to a new function, _eglSplitDisplayString. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-18egl: _eglCloseDriver should be no-op.Chia-I Wu
Move drv->API.Terminate call to eglTerminate. Remove _eglReleaseDisplayResource as drivers are doing it. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-18egl: Some per-driver data should be per-display.Chia-I Wu
Move some fields of _EGLDriver to _EGLDisplay. It also becomes unnecessary to pass _EGLDisplay to drivers when _eglMain is called. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-18egl: Change the way drivers are loaded.Chia-I Wu
Driver is chosen and preloaded when eglGetDisplay is called. Later when eglInitialize is called, the same driver is matched to initialize the display. Also, add new, but unused, hooks to EGLDriver to allow a driver to probe a display or unload itself. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-08-18egl: Overhaul driver API.Chia-I Wu
The motivation is so that drivers do not need to look up and check for bad display, context, and etc. It also becomes unnecessary for drivers to call the link functions. This commit makes eglapi.[ch] do the lookup and check. As a result, the driver API is overhauled, and almost all sources and drivers need update. The updates are mainly find and replace with human brains. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2009-07-17egl: Destroy display's resources upon termination.Chia-I Wu
eglTerminate should destroy the contexts and surfaces of the display. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2008-08-06egl: fixes for WindowsJonathan White
2008-08-05egl: changes for WindowsJonathan White
2008-06-19egl: clean up prototype code, new _eglFindAPIs() function.Brian Paul
2008-06-18egl: use RTLD_LAZYBrian Paul
2008-06-11egl: some prototype Windows code (eq for dlopen,dlsym)Brian Paul
2008-06-06egl: make _eglChooseDRMDriver() non-staticBrian Paul
2008-05-30egl: new eglGetProcAddress() codeBrian Paul
The idea is to pass the call down to the device driver where an API-specific query can be made. Untested.
2008-05-30egl: clean-up re-org of the client API stateBrian Paul
2008-05-30egl: check for EGL_DRIVER env var to override normal driver selection processBrian Paul
2008-05-28egl: remove unused Display fieldBrian Paul
2008-05-28egl: move a few small functions into new eglmisc.[ch] filesBrian Paul
2008-05-28egl: make sure EGL_VERSION_STRING query returns same version as eglInitialize()Brian Paul
2008-05-28egl: include egldefines.hBrian Paul
2008-05-28egl: bring card->driver lookup code into egldriver.cBrian Paul
2008-05-28egl: added args string to _eglMain()Brian Paul
2008-05-28egl: Temporarily disable eglx.[c|h] buildingJakob Bornecrantz
2008-05-27minor overhaul/re-org of driver selection/loading codeBrian Paul