summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/pipe-loader
Commit message (Collapse)AuthorAgeFilesLines
* loader: remove loader_get_driver_for_fd() driver_typeEmil Velikov2016-10-181-1/+1
| | | | | | | | | | | | | | Reminiscent from the pre-loader days, were we had multiple instances of the loader logic in separate places and one could build a "GALLIUM_ONLY" version. Since that is no longer the case and the loaders (glx/egl/gbm) do not (and should not) require to know any classic/gallium specific we can drop the argument and the related code. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Axel Davy <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* pipe_loader_sw: Don't invoke Unix close() on Windows.Jose Fonseca2016-10-141-0/+2
| | | | Trivial.
* gallium: rename drm_driver_descriptor::{, driver_}nameEmil Velikov2016-10-141-15/+15
| | | | | | | | Historically we use "device name" for the name of the kernel module and "driver name" for the dri/other driver. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium: remove unused drm_driver_descriptor::driver_nameEmil Velikov2016-10-141-12/+0
| | | | | | | | | | | | Likely unused since day 1, although I've only checked back until the st/dri unification with commit 29ca7d2c948 ("st/dri: merge dri/drm and dri/sw backends") Based on the comment, referencing drmOpenByName it's not something we want to bring back. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* pipe_loader_sw: Fix fd leak when instantiated via pipe_loader_sw_probe_kmsHans de Goede2016-06-281-0/+7
| | | | | | | | | | | | Make pipe_loader_sw_probe_kms take ownership of the passed in fd, like pipe_loader_drm_probe_fd does. The only caller is dri_kms_init_screen which passes in a dupped fd, just like dri2_init_screen passes in a dupped fd to pipe_loader_drm_probe_fd. Signed-off-by: Hans de Goede <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* Android: move libdrm settings to top-level Android.common.mkRob Herring2016-06-131-3/+0
| | | | | | | | | | | | | | Fix warnings like these due to HAVE_LIBDRM being inconsistently defined: external/libdrm/include/drm/drm.h:839:30: warning: redefinition of typedef 'drm_clip_rect_t' is a C11 feature [-Wtypedef-redefinition] typedef struct drm_clip_rect drm_clip_rect_t; HAVE_LIBDRM needs to be set project wide to fix this. This change also harmlessly links libdrm with everything, but simplifies the makefiles a bit. Signed-off-by: Rob Herring <[email protected]> Acked-by: Emil Velikov <[email protected]>
* Treewide: Remove Elements() macroJan Vesely2016-05-171-1/+1
| | | | | Signed-off-by: Jan Vesely <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* scons: Eliminate MSVC2008 compatibility.Jose Fonseca2016-02-111-1/+1
| | | | | Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* pipe-loader: check if winsys.name is non-null prior to strcmpEmil Velikov2015-11-291-4/+4
| | | | | | | | | | | | In theory this wouldn't be an issue, as we'll find the correct name and break out of the loop before we hit the sentinel. Let's fix this and avoid issues in the future. Spotted by Coverity (CID 1339869, 1339870, 1339871) Cc: [email protected] Signed-off-by: Emil Velikov <[email protected]>
* targets: use the non-inline sw helpersEmil Velikov2015-11-251-1/+2
| | | | | | | | | | | | | | | | | | Previously (with the inline ones) things were embedded into the pipe-loader, which means that we cannot control/select what we want in each target. That also meant that at runtime we ended up with the empty sw_screen_create() as the GALLIUM_SOFTPIPE/LLVMPIPE were not set. v2: Cover all the targets, not just dri. Cc: "11.1" <[email protected]> Cc: Ilia Mirkin <[email protected]> Cc: Edward O'Callaghan <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Tested-by: Oded Gabbay <[email protected]> Tested-by: Nick Sarnie <[email protected]>
* pipe-loader: fix off-by one errorEmil Velikov2015-11-251-1/+1
| | | | | | | | | | | | | | | | With earlier commit we've dropped the manual iteration over the fixed size array and prepemtively set the variable storing the size, that is to be returned. Yet we forgot to adjust the comparison, as before we were comparing the index, now we're comparing the size. Fixes: ff9cd8a67ca "pipe-loader: directly use pipe_loader_sw_probe_null() at probe time" Cc: [email protected] Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93091 Reported-by: Tom Stellard <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Tested-by: Tom Stellard <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* pipe-loader: link against libloader regardless of libdrm presenceEmil Velikov2015-11-231-2/+2
| | | | | | | | | | | Whether or not the loader has libdrm support is up-to it. Anyone using the loader should just include it whenever they depend on it. Cc: [email protected] Fixes: 0f39f9cb7ad "pipe-loader: add a dummy 'static' pipe-loader" Reported-by: Jon TURNEY <[email protected]> Tested-by: Jon TURNEY <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* vc4: Take precedence over ilo when in simulator mode.Eric Anholt2015-11-221-8/+12
| | | | | | | | | | They're exclusive at build time, but the ilo entry is always present, so we'd try to use it and fail out. v2: Add comment in the code, from Emil. Cc: [email protected] Reviewed-by: Emil Velikov <[email protected]>
* pipe-loader: Fix PATH_MAX define on MSVC.Jose Fonseca2015-11-211-0/+5
|
* scons: Conditionally use DRM module on pipe-loader.Jose Fonseca2015-11-211-5/+4
| | | | | | Fixes non Linux builds. Trivial.
* pipe-loader: add preliminary Android supportEmil Velikov2015-11-211-0/+49
| | | | | | | | | Add a 'static' pipe-loader build, which will be used with follow-up commits. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Chih-Wei Huang <[email protected]> Acked-by: Rob Clark <[email protected]>
* pipe-loader: add preliminary scons supportEmil Velikov2015-11-212-0/+36
| | | | | | | | Add a 'static' pipe-loader build, which will be used with follow-up commits. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* pipe-loader: don't mix code and variable declarationsEmil Velikov2015-11-211-1/+2
| | | | | | | | We cannot use this C99 feature here quite yet, as the code needs to be build with MSVC prior to 2013. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* pipe-loader: wire up the 'static' sw pipe-loaderEmil Velikov2015-11-211-0/+47
| | | | | | | | | | | | | Analogous to previous commit with a small catch. As the sw inline helpers are mere wrappers, and the screen <> winsys split is more prominent (with the latter not being part of the final pipe-driver), things will just work. v2: rebase on top of earlier 'consolitate teardown' changes Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* pipe-loader: wire up the 'static' drm pipe-loaderEmil Velikov2015-11-211-3/+124
| | | | | | | | | | | | | | Add a list of driver descriptors and select one from the list, during probe time. As we'll need to have all the driver pipe_foo_screen_create() functions provided externally (i.e. from another static lib) we need a separate (non-inline) drm_helper, which contains the function declarations. v2: rebase on top of virgl support. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* pipe-loader: add a dummy 'static' pipe-loaderEmil Velikov2015-11-211-3/+20
| | | | | | | | | | | | It is to be used in contrast of the dynamic one. The state-tracker does not need to know if the pipe-driver is built into the final blob or a separate object. This will allow us to move the logic to the final step (in target) where the appropriate pipe-loader will be chosen. Cc: Tom Stellard <[email protected]> Cc: Francisco Jerez <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* gallium: rename libpipe_loader to libpipe_loader_dynamicEmil Velikov2015-11-211-4/+4
| | | | | | | | | With the next commits we'll introduce a 'static' version, which will essentially load the statically linked-in pipe-drivers, rather than the standalone pipe-$foo.so ones. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* pipe-loader: dlopen/dlsym the pipe-driver at probe timeEmil Velikov2015-11-211-27/+17
| | | | | | | | | | | Rather than giving false hopes that things might work, just check at probe time. This allows us to remove the duplication and consolidate the code wrt the upcomming static pipe-loader. 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: annotate the ops as const dataEmil Velikov2015-11-212-4/+4
| | | | | | | | | Already defined as such in struct pipe_loader_device::ops. 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: teardown the winsys, if create_screen failsEmil Velikov2015-11-211-1/+6
| | | | | | | | i.e. plug some (hard to hit) memory leaks. v2: fix rebase fallout - really teardown the winsys (Brian) Signed-off-by: Emil Velikov <[email protected]> Acked-by: Rob Clark <[email protected]>
* 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]>