summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/pipe-loader
Commit message (Collapse)AuthorAgeFilesLines
* pipe-loader: rework the sw backendEmil Velikov2015-11-211-36/+91
| | | | | | | | | | | | Move the winsys into the pipe-target, similar to the hardware pipe-driver. v2: - move int declaration outside of loop (Brian) - fold the teardown into a goto + separate function. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* pipe-loader: directly use pipe_loader_sw_probe_null() at probe timeEmil Velikov2015-11-211-13/+4
| | | | | | | | | | | Due to the nature of the other sw winsys' we cannot use them during the generic probe stage. As such there is little point in keeping the abstraction layer. Cc: Tom Stellard <[email protected]> Cc: Francisco Jerez <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* pipe-loader: add pipe_loader_sw_probe_init_common() helperEmil Velikov2015-11-211-20/+18
| | | | | | | | | Allows us to fold the duplication in pipe_loader_sw_probe_*(). Cc: Tom Stellard <[email protected]> Cc: Francisco Jerez <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* gallium: remove library_path argument from pipe_loader_create_screen()Emil Velikov2015-11-216-16/+9
| | | | | | | | | | | | | | | Currently the location is determined at configure/build time and consistently copied across gallium. Just remove the extra argument, and use PIPE_SEARCH_DIR where appropriate. This will allow us to remove the duplication in the *configuration and *screen_create APIs by moving util_dl_get_proc_address() and friends to probe time. v2: rebase on top of vl_winsys_drm.c addition Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* pipe-loader: remove HAVE_DRM_LOADER_GALLIUM and HAVE_PIPE_LOADER_DRMEmil Velikov2015-11-212-2/+2
| | | | | | | | | | | ... in favour of HAVE_LIBDRM. After all we solely want to build the code when the latter is available. In the not too distant future we will remove the libudev/sysfs dependency and simplify configure.ac even further. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* pipe-loader: add pipe_loader_sw_probe_kms() implementationEmil Velikov2015-11-212-0/+34
| | | | | | | | Will be used as a counterpart for target-helpers' kms_swrast_create_screen(). Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* pipe-loader: remove HAVE_PIPE_LOADER_foo function prototype guardsEmil Velikov2015-11-211-8/+0
| | | | | | | | | | They serve little to no purpose, as we don't need any additional dependencies (headers and/or symbols). On the other hand dropping them will allow us to use GALLIUM_PIPE_LOADER_DEFINES in only one single place - the pipe-loader. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* Revert "pipe-loader: simplify pipe_loader_drm_probe"Francisco Jerez2015-07-291-4/+9
| | | | | | | | | This reverts commit a27ec5dc460b91dc44675f48cddbbb2631ee824f. It breaks the intended behaviour of pipe_loader_probe() with ndev==0 as relied upon by clover to query the number of devices available to the pipe loader in the system. Acked-by: Emil Velikov <[email protected]>
* pipe-loader: use loader_open_device() rather than open()Emil Velikov2015-07-131-1/+1
| | | | | | | The former handles O_CLOEXEC (and the lack of it) appropriately. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* pipe-loader: remove pipe_loader_sw_probe_xlibEmil Velikov2015-07-132-46/+0
| | | | | | | | | It was only useful for st/egl, although I've never got to merging the pipe-loader and inline-helpers before it was removed. There are no users for it ATM. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* automake: remove empty GALLIUM_PIPE_LOADER_LIBSEmil Velikov2015-07-131-3/+0
| | | | | | Cc: Rob Clark <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* automake: pipe-loader: remove the 'client' pipe-loaderEmil Velikov2015-07-131-24/+18
| | | | | | | | | | Was only around as opencl's pipe-loader wanted to link against xcb in some cases. Cc: Rob Clark <[email protected]> Cc: Tom Stellard <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* pipe-loader: remove pipe_loader_drm_probe_fd() x_auth argumentEmil Velikov2015-07-132-86/+3
| | | | | | | | No longer used by anyone, as of last commit. Cc: Tom Stellard <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* pipe-loader: simplify pipe_loader_drm_probeEmil Velikov2015-07-131-9/+4
| | | | | | | | Do not iterate and (attempt to) open the render device, if we're over the requested number of devices. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* pipe-loader: drop support for non-render node devicesEmil Velikov2015-07-131-59/+1
| | | | | | | | | | | | | | | | | Render nodes have been around for quite some time. Removing support via the master/primary node allows us to clean up the conditional compilation and simplify the build greatly. For example currently we the pipe-loader, which explicitly links against xcb and friends (for X auth) if found at compile-time. That would cause problems as one will be forced to use X/xcb, even if it's a headless system that is used for opencl. v2: Clarify the linking topic in the commit message. Cc: Tom Stellard <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* gallium: add include path to fix building of pipe-loader codeBrian Paul2014-12-011-0/+1
| | | | | | The pipe-loader code wasn't finding util/u_atomic.h Reviewed-by: Matt Turner <[email protected]>
* gallium/auxiliary: implement sw_probe_wrapped (v2)Christoph Bumiller2014-11-182-0/+34
| | | | | | | | | | | | | Implement pipe_loader_sw_probe_wrapped which allows to use the wrapped software renderer backend when using the pipe loader. v2: - remove unneeded ifdef - use GALLIUM_PIPE_LOADER_WINSYS_LIBS - check for CALLOC_STRUCT thanks to Emil Velikov Acked-by: Jose Fonseca <[email protected]> Signed-off-by: David Heidelberg <[email protected]>
* pipe-loader: consolidate sources into Makefile.sourcesEmil Velikov2014-11-162-8/+10
| | | | | | Drop the unneeded subdir-objects. Signed-off-by: Emil Velikov <[email protected]>
* pipe-loader: Include unistd.h in pipe_loader_drm.c for close function.Vinson Lee2014-09-101-0/+1
| | | | | | | | | | | This patch fixes a build error on DragonFly. CC libpipe_loader_la-pipe_loader_drm.lo pipe_loader_drm.c: In function 'pipe_loader_drm_probe': pipe_loader_drm.c:207:10: error: implicit declaration of function 'close' [-Werror=implicit-function-declaration] Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* automake: remove obsolete NEED_GALLIUM_LOADEREmil Velikov2014-09-091-6/+1
| | | | | | | Superseded by HAVE_LOADER_GALLIUM. The latter has a *DRM* brethren making the whose easier on which one to keep. Signed-off-by: Emil Velikov <[email protected]>
* pipe-loader: use the correct screen indexMarek Olšák2014-09-011-2/+18
|
* pipe-loader: Fix memory leak v2Tom Stellard2014-08-212-2/+2
| | | | | | | | v2: - Change driver_name to char* Reviewed-by: Emil Velikov <[email protected]> CC: "10.2" <[email protected]>
* pipe-loader: add pipe_loader_ops::configuration()Emil Velikov2014-06-195-0/+53
| | | | | | | | | Required for the dri state-tracker. Will be used to retrieve driver specific configuration parameters: - share_fd (dmabuf) capability - throttle Signed-off-by: Emil Velikov <[email protected]>
* pipe-loader: note that we leak pipe_loader_drm_device->base->driver_nameEmil Velikov2014-06-191-0/+1
| | | | | | The string is malloc'd (strdup) in loader_get_driver_for_fd(). Signed-off-by: Emil Velikov <[email protected]>
* pipe-loader: Don't destroy the winsys in the sw loaderTom Stellard2014-05-091-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" <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* pipe-loader: conditionally build and use pipe_loader_sw_probe_driEmil Velikov2014-04-252-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 <[email protected]> Reported-by: Brian Paul <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* pipe-loader: wrap pipe_loader_sw_probe_xlib within HAVE_PIPE_LOADER_XLIBEmil Velikov2014-02-243-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 <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75356 Signed-off-by: Emil Velikov <[email protected]>
* pipe-loader: introduce pipe_loader_sw_probe_null helper functionEmil Velikov2014-02-222-0/+31
| | | | | | | v2: Handle null_sw_create failure, add missing function return type Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]> (v1)
* pipe-loader: introduce pipe_loader_sw_probe_dri helperEmil Velikov2014-02-222-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 <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]> (v2)
* pipe-loader: introduce pipe_loader_sw_probe_xlib helperEmil Velikov2014-02-223-3/+45
| | | | | | | | | Will be used in the upcoming patches. v2: handle xlib_create_sw_winsys failure, drop unneeded header Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]> (v1)
* pipe-loader: use bool type for pipe_loader_drm_probe_fd()Emil Velikov2014-02-222-5/+5
| | | | | | | | v2: Rebase on top of the rendernode changes. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]> (v1) Reviewed-by: Francisco Jerez <[email protected]> (v1)
* winsys/xlib: move xlib_create_sw_winsys within the winsysEmil Velikov2014-02-221-1/+1
| | | | | | v2: Rebase on top of vl_winsys_xsp.c removal Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]> (v1)
* pipe-loader: handle memory allocation failureEmil Velikov2014-02-222-0/+4
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]>
* pipe-loader: build pipe_loader_drm_x_auth whenever HAVE_PIPE_LOADER_XCB is ↵Emil Velikov2014-02-221-1/+1
| | | | | | | | | | defined Currently HAVE_PIPE_LOADER_XCB is defined, rather than being set to 1/0. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* pipe-loader: destroy sw_winsys on sw_releaseEmil Velikov2014-02-221-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 <[email protected]> Reviewed-by: Jakob Bornecrantz <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
* pipe-loader: split out "client" versionRob Clark2014-02-161-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 <[email protected]>
* pipe-loader: Add support for render nodes v2Tom Stellard2014-02-131-3/+77
| | | | | | | v2: - Add missing call to pipe_loader_drm_release() - Fix render node macros - Drop render-node configure option
* pipe-loader: Add auth_x parameter to pipe_loader_drm_probe_fd()Tom Stellard2014-02-132-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.
* auxiliary/pipe-loader: automake: avoid exporting all symbolsEmil Velikov2014-02-111-0/+1
| | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* pipe-loader: drop obsolete libudev.h includeEmil Velikov2014-02-111-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 <[email protected]>
* pipe-loader: Fix buildArmin K2014-01-191-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 <[email protected]>
* pipe-loader: add support for non-pci (platform) devicesEmil Velikov2014-01-182-0/+3
| | | | | | | | | Culled out of the "loader: refactor duplicated code into loader util lib" patch by Rob Clark. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Rob Clark <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
* pipe-loader: use loader util libEmil Velikov2014-01-182-81/+14
| | | | | | Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Rob Clark <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
* loader: introduce the loader util libEmil Velikov2014-01-181-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 <[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]>
* s/Tungsten Graphics/VMware/José Fonseca2014-01-175-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/[email protected]/[email protected]/ s/[email protected]/[email protected]/g s/jrfonseca-at-tungstengraphics-dot-com/jfonseca-at-vmware-dot-com/ s/jrfonseca\[email protected]/[email protected]/g s/keithw\[email protected]/[email protected]/g s/[email protected]/[email protected]/g s/thomas-at-tungstengraphics-dot-com/thellstom-at-vmware-dot-com/ s/[email protected]/[email protected]/ # 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 <[email protected]>
* pipe_loader/sw: close dev->lib when initialization failsAaron Watry2013-12-231-1/+4
| | | | | | | | Prevents a memory leak. Reviewed-by: Tom Stellard <[email protected]> CC: "10.0" <[email protected]>
* gallium/pipe_loader: un-reference udev resources when we're done with them.Aaron Watry2013-11-151-0/+3
| | | | | | Reviewed-by: Tom Stellard <[email protected]> CC: "10.0" <[email protected]>
* build: Remove HAVE_PIPE_LOADER_SW.Matt Turner2013-04-301-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 <[email protected]> Tested-by: Aaron Watry <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* build: Rename PIPE_LOADER_HAVE_XCB to HAVE_PIPE_LOADER_XCB.Matt Turner2013-04-301-2/+2
| | | | | | | | For consistency, since we already have HAVE_PIPE_LOADER_{SW,DRM}. Tested-by: Tom Stellard <[email protected]> Tested-by: Aaron Watry <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* Remove hacks for static MakefilesMatt Turner2013-01-131-11/+0
| | | | | | | | | | | v2: Andreas Boll <[email protected]> - don't remove compatibility with scripts for the old build system v3: Andreas Boll <[email protected]> - remove more obsolete hacks v4: Andreas Boll <[email protected]> - add a previously removed TOP variable to fix vgapi build