summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/pipe-loader
AgeCommit message (Collapse)AuthorFilesLines
2014-05-09pipe-loader: Don't destroy the winsys in the sw loaderTom Stellard1-3/+0
The screen takes ownership of the winsys, and is responsible for destroying it. Users of pipe-loader should make sure they destory and screens they've created to avoid memory leaks. This fixes a crash in clover introduced by ce6c17c0833032e91a2d1b34f9eb80c738a854a2 where the pipe-loader was destroying the winsys while a screen was still using it. Cc: "10.2" <mesa-stable@lists.freedesktop.org> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-04-25pipe-loader: conditionally build and use pipe_loader_sw_probe_driEmil Velikov2-0/+6
The function relies on the sw/dri winsys which is build only when --enable-dri is set. Fixes build issues with the following config ./configure --disable-dri --with-gallium-drivers=svga --enable-xa Issue can be reproduced with any hw gallium driver + st that uses the pipe-loader. Cc: Brian Paul <brianp@vmware.com> Reported-by: Brian Paul <brianp@vmware.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-02-24pipe-loader: wrap pipe_loader_sw_probe_xlib within HAVE_PIPE_LOADER_XLIBEmil Velikov3-7/+6
The above function implies using the the xlib winsys, which has additional library dependencies that should not be forced. Make the software xlib pipe loader optional thus avoid all the dependency hell. A user that wishes to use the particular pipe-loader would need to set the following within configure.ac. enable_gallium_xlib_loader=yes v2: - Wrap sw/xlib/xlib_sw_winsys.h to handle compilation on systems lacking X11 headers. Spotted by Christian Prochaska. Tested-by: Tom Stellard <thomas.stellard@amd.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75356 Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-02-22pipe-loader: introduce pipe_loader_sw_probe_null helper functionEmil Velikov2-0/+31
v2: Handle null_sw_create failure, add missing function return type Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> (v1)
2014-02-22pipe-loader: introduce pipe_loader_sw_probe_dri helperEmil Velikov2-0/+36
Will be used in the following commits. v2: Link gallium tests against the library. v3: Handle dri_create_sw_winsys failure v4: Rebase on top of the targets/xa changes Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> (v2)
2014-02-22pipe-loader: introduce pipe_loader_sw_probe_xlib helperEmil Velikov3-3/+45
Will be used in the upcoming patches. v2: handle xlib_create_sw_winsys failure, drop unneeded header Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> (v1)
2014-02-22pipe-loader: use bool type for pipe_loader_drm_probe_fd()Emil Velikov2-5/+5
v2: Rebase on top of the rendernode changes. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> (v1) Reviewed-by: Francisco Jerez <currojerez@riseup.net> (v1)
2014-02-22winsys/xlib: move xlib_create_sw_winsys within the winsysEmil Velikov1-1/+1
v2: Rebase on top of vl_winsys_xsp.c removal Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> (v1)
2014-02-22pipe-loader: handle memory allocation failureEmil Velikov2-0/+4
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2014-02-22pipe-loader: build pipe_loader_drm_x_auth whenever HAVE_PIPE_LOADER_XCB is ↵Emil Velikov1-1/+1
defined Currently HAVE_PIPE_LOADER_XCB is defined, rather than being set to 1/0. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2014-02-22pipe-loader: destroy sw_winsys on sw_releaseEmil Velikov1-0/+3
The sw pipe-loader implicitly handles winsys_create, thus we it would make sense to implicitly destroy it upon releasing the loader. Currently we leak the sw_winsys when releasing the pipe-loader. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com> Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2014-02-16pipe-loader: split out "client" versionRob Clark1-4/+19
Build two versions of pipe-loader, with only the client version linking in x11 client side dependencies. This will allow the XA state tracker to use pipe-loader. Signed-off-by: Rob Clark <robclark@freedesktop.org>
2014-02-13pipe-loader: Add support for render nodes v2Tom Stellard1-3/+77
v2: - Add missing call to pipe_loader_drm_release() - Fix render node macros - Drop render-node configure option
2014-02-13pipe-loader: Add auth_x parameter to pipe_loader_drm_probe_fd()Tom Stellard2-4/+10
The caller can use this boolean parameter to tell the pipe-loader to authenticate with the X server when probing a file descriptor.
2014-02-11auxiliary/pipe-loader: automake: avoid exporting all symbolsEmil Velikov1-0/+1
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
2014-02-11pipe-loader: drop obsolete libudev.h includeEmil Velikov1-1/+0
All the udev code is in the loader, so there is no reason for us to include this header. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-01-19pipe-loader: Fix buildArmin K1-0/+1
pipe_loader_drm.c: In function 'pipe_loader_drm_probe_fd': pipe_loader_drm.c:120:4: error: implicit declaration of function 'loader_get_pci_id_for_fd' [-Werror=implicit-function-declaration] Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
2014-01-18pipe-loader: add support for non-pci (platform) devicesEmil Velikov2-0/+3
Culled out of the "loader: refactor duplicated code into loader util lib" patch by Rob Clark. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
2014-01-18pipe-loader: use loader util libEmil Velikov2-81/+14
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
2014-01-18loader: introduce the loader util libEmil Velikov1-0/+1
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 <robclark@freedesktop.org> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2014-01-17s/Tungsten Graphics/VMware/José Fonseca5-5/+5
Tungsten Graphics Inc. was acquired by VMware Inc. in 2008. Leaving the old copyright name is creating unnecessary confusion, hence this change. This was the sed script I used: $ cat tg2vmw.sed # Run as: # # git reset --hard HEAD && find include scons src -type f -not -name 'sed*' -print0 | xargs -0 sed -i -f tg2vmw.sed # # Rename copyrights s/Tungsten Gra\(ph\|hp\)ics,\? [iI]nc\.\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./g /Copyright/s/Tungsten Graphics\(,\? [iI]nc\.\)\?\(, Cedar Park\)\?\(, Austin\)\?\(, \(Texas\|TX\)\)\?\.\?/VMware, Inc./ s/TUNGSTEN GRAPHICS/VMWARE/g # Rename emails s/alanh@tungstengraphics.com/alanh@vmware.com/ s/jens@tungstengraphics.com/jowen@vmware.com/g s/jrfonseca-at-tungstengraphics-dot-com/jfonseca-at-vmware-dot-com/ s/jrfonseca\?@tungstengraphics.com/jfonseca@vmware.com/g s/keithw\?@tungstengraphics.com/keithw@vmware.com/g s/michel@tungstengraphics.com/daenzer@vmware.com/g s/thomas-at-tungstengraphics-dot-com/thellstom-at-vmware-dot-com/ s/zack@tungstengraphics.com/zackr@vmware.com/ # Remove dead links s@Tungsten Graphics (http://www.tungstengraphics.com)@Tungsten Graphics@g # C string src/gallium/state_trackers/vega/api_misc.c s/"Tungsten Graphics, Inc"/"VMware, Inc"/ Reviewed-by: Brian Paul <brianp@vmware.com>
2013-12-23pipe_loader/sw: close dev->lib when initialization failsAaron Watry1-1/+4
Prevents a memory leak. Reviewed-by: Tom Stellard <thomas.stellard@amd.com> CC: "10.0" <mesa-stable@lists.freedesktop.org>
2013-11-15gallium/pipe_loader: un-reference udev resources when we're done with them.Aaron Watry1-0/+3
Reviewed-by: Tom Stellard <thomas.stellard@amd.com> CC: "10.0" <mesa-stable@lists.freedesktop.org>
2013-04-30build: Remove HAVE_PIPE_LOADER_SW.Matt Turner1-4/+0
It guarded the function prototype of pipe_loader_sw_probe, whose use (in pipe_loader.c) and definition (in pipe_loader_sw.c) were not guarded. Both are built into libpipe_loader.la if HAVE_LOADER_GALLIUM, which is enable_gallium_loader in configure.ac. Tested-by: Tom Stellard <thomas.stellard@amd.com> Tested-by: Aaron Watry <awatry@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2013-04-30build: Rename PIPE_LOADER_HAVE_XCB to HAVE_PIPE_LOADER_XCB.Matt Turner1-2/+2
For consistency, since we already have HAVE_PIPE_LOADER_{SW,DRM}. Tested-by: Tom Stellard <thomas.stellard@amd.com> Tested-by: Aaron Watry <awatry@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2013-01-13Remove hacks for static MakefilesMatt Turner1-11/+0
v2: Andreas Boll <andreas.boll.dev@gmail.com> - don't remove compatibility with scripts for the old build system v3: Andreas Boll <andreas.boll.dev@gmail.com> - remove more obsolete hacks v4: Andreas Boll <andreas.boll.dev@gmail.com> - add a previously removed TOP variable to fix vgapi build
2013-01-10Clean up .gitignore filesMatt Turner1-1/+0
2013-01-10Remove MESA_PIC_FLAGS macroMatt Turner1-3/+1
2012-09-21pipe-loader: Remove a few debug_printfsTom Stellard2-4/+0
On debug builds these were always being printed. Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2012-07-23pipe_loader: Try to connect with the X server before probing pciids v2Tom Stellard1-0/+61
When X is running it is neccesary for pipe_loader to authenticate with DRM, in order to be able to use the device. This makes it possible to run OpenCL programs while X is running. v2: - Fix C++ style comments - Drop Xlib-xcb dependency - Close the X connection when done - Split auth code into separate function Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2012-05-16gallium/auxiliary/pipe-loader: Fix usage of anonymous union.Francisco Jerez2-7/+7
Anonymous unions aren't part of the C99 standard. Fixes build on GCC versions older than 4.6. https://bugs.freedesktop.org/show_bug.cgi?id=50001 Reported-by: Michael Lange <michaell@gmx.org>
2012-05-15Add .gitignore files for recently-added gallium projectsPaul Berry1-0/+1
This patch adds .gitignore files to ignore the makefiles generated by the gallium pipe loader and the clover OpenCL state tracker. Reviewed-by: Francisco Jerez <currojerez@riseup.net>
2012-05-11gallium: Add pipe loader for device enumeration and driver multiplexing.Francisco Jerez6-0/+656
The goal is to have a uniform interface to create winsys and pipe_screen instances for any driver, exposing the device enumeration capabilities that might be supported by the operating system (for now there's a "drm" back-end using udev and a "sw" back-end that always returns the same built-in devices). The typical use case of this library will be: > > struct pipe_loader_device devs[n]; > struct pipe_screen *screen; > > pipe_loader_probe(&devs, n); >[pick some device from the array...] > > screen = pipe_loader_create_screen(dev, library_search_path); >[do something with screen...] > > screen->destroy(screen); > pipe_loader_release(&devs, N); > A part of the code was taken from targets/gbm/pipe_loader.c, which will be removed and replaced with calls into this library by a future commit.