summaryrefslogtreecommitdiffstats
path: root/src/gbm
Commit message (Collapse)AuthorAgeFilesLines
...
* gbm: Set errno on errorsAnder Conselvan de Oliveira2014-04-252-15/+41
| | | | | | | | | This should give the caller some information of what called the error. For the gbm_bo_import() case, for instance, it is possible to know if the import is not supported or the error was caused by an invalid parameter. Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* gbm/dri: Fix out-of-memory error path in dri_device_create()Ander Conselvan de Oliveira2014-04-251-0/+2
| | | | | Cc: "10.0" "10.1" <mesa-stable@lists.freedesktop.org> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* gbm/build: Add headers to distribution.Matt Turner2014-04-071-2/+8
| | | | Acked-by: Emil Velikov <emil.l.velikov@gmail.com>
* automake: don't enable -Wl,--no-undefined on OpenBSDJonathan Gray2014-04-051-1/+1
| | | | | | | | | | | | | | | | OpenBSD does not have DT_NEEDED entries for libc by design, over concerns how the symbols would be referenced after changing the major version of the library. So avoid -no-undefined checks on OpenBSD as they will fail. v2: don't include the -no-undefined libtool option in the variable and change -Wl,--no-undefined references in Automake.inc as well. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76856 Signed-off-by: Jonathan Gray <jsg@jsg.id.au> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
* gbm: Add gbm_bo_get_fd to gbm-symbols-check scriptKristian Høgsberg2014-04-011-0/+1
|
* gbm: Add import from fdKristian Høgsberg2014-04-013-2/+29
| | | | | | | Add a new import type that lets us create a gbm bo from a DMA-BUF file descriptor. Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
* gbm: Add gbm_bo_get_fd()Kristian Høgsberg2014-04-014-0/+37
| | | | | | Add gbm function to get a DMA-BUF file descriptor for a gbm bo. Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
* automake: ask the linker to do garbage collectionEmil Velikov2014-03-311-0/+1
| | | | | | | | | | | | | | By doing GC the linker removes all the symbols that are not referenced and/or used by the final library. This results in a saving of ~100K up-to ~600K per (stripped) binary (classic vs gallium drivers). If interested one can ask the compiler to print the sections that are removed using -Wl,--print-gc-sections. v2: Check if ld supports the flag before using it. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Matt Turner <mattst88@gmail.com> (v1)
* automake: add -Wl,--no-undefined to all librariesEmil Velikov2014-03-311-1/+3
| | | | | | | | | ... apart from the dri drivers. With this final change we can build mesa without fear that the resulting libraries will have unresolved symbols. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
* automake: consistently use -no-undefinedEmil Velikov2014-03-311-1/+3
| | | | | | | | | | | | | Set the flag for all but the dri targets. They have missing glapi symbols which are required for the normal operation with the X server. Jon, I fear that you'll need to carry the "no-undefined" hunk locally when building the dri drivers under cygwin. Cc: Jon TURNEY <jon.turney@dronecode.org.uk> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
* gbm: make 'devices' array staticJulien Cristau2014-03-081-1/+1
| | | | | | | It's only used in this one file as far as I can tell, and exporting a symbol named 'devices' from a shared library is a recipe for trouble. Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* gbm/dri: Fixed buffer object memory leak in case of failure.Siavash Eliasi2014-02-281-2/+6
| | | | Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
* gbm: export gbm_device_is_format_supportedMarek Chalupa2014-02-281-1/+1
| | | | | | | | Probably depending on compiler settings, the definition can be hidden, so undefined reference error can be encountred during linking. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75528 Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* gbm: explicitly set __DRIimageLoaderExtension membersEmil Velikov2014-02-231-3/+4
| | | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* gbm: explicitly set __DRIdri2LoaderExtension membersEmil Velikov2014-02-231-4/+5
| | | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>y
* automake: remove leftover XORG and LIBKMS variablesEmil Velikov2014-02-181-2/+0
| | | | | | | No longer set or used since the removal of st/xorg. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
* gbm: automake: add symbol testsEmil Velikov2014-02-112-0/+35
| | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* gbm: do not export _gbm_mesa_get_deviceEmil Velikov2014-02-112-2/+2
| | | | | | | | | | This symbol is internal and was never part of the API. Unused by any of the gbm backends, it makes sense to simply not export it. Cc: Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
* gbm: automake: addEmil Velikov2014-02-111-1/+2
| | | | | | | | | | | | | | VISIBILITY_CFLAGS Currently the library exports every symbol imaginable, rather than the ones defined by the API. Note: This may cause issues for libraries that are linking agaist libgbm's internals. Cc: Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
* gbm: drop unneeded dependency of libudevEmil Velikov2014-02-111-2/+0
| | | | | | | As of recently we dlopen the library, additionally the only code that is including the libudev.h header, is the loader. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* build: Share the all-local rule for linking libraries into the build dirKristian Høgsberg2014-01-291-4/+1
| | | | | | | | | | This consolidates how we link the libraries into the build directory. It works for lib_LTLIBRARIES but not custom shared libraries like DRI drivers or gallium state trackers which needs special casing (cf dri mega drivers, for example) Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Matt Turner <mattst88@gmail.com>
* gbm: Make libgbm.so.1 symlink.Matt Turner2014-01-281-0/+1
| | | | Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
* gbm: use the loader util libEmil Velikov2014-01-187-229/+5
| | | | | | | | | | | | | | | | | | | Additionally this commit removes the following exported functions _gbm_udev_device_new_from_fd() _gbm_fd_get_device_name() _gbm_log() All three were erroneously marked as exported since their inception. Neither of them has ever been a part of the API thus there should be no users of them. Cc: Chad Versace <chad.versace@linux.intel.com> Cc: Kristian Høgsberg <krh@bitplanet.net> 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>
* loader: introduce the loader util libEmil Velikov2014-01-181-1/+5
| | | | | | | | | | | | | | | | | | | | | | 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>
* egl: break instead of looping after driver is foundQuanxian Wang2013-12-191-2/+3
| | | | | | | | Stop searching for a driver after success. Signed-off-by: Quanxian Wang <quanxian.wang@intel.com> Reviewed-By: Gong, Zhigang <zhigang.gong@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
* gbm/dri: hide extension loader symbolsMaarten Lankhorst2013-11-251-2/+2
| | | | | | They should not be exposed. Cc: "10.0" <mesa-stable@lists.freedesktop.org>
* gbm: enable subdir-objects to prevent automake warningsEmil Velikov2013-11-161-0/+2
| | | | | Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* gbm: Add support for __DRIimage based getBuffers when availableKristian Høgsberg2013-11-122-2/+34
| | | | | | | | | | | | | | | | | | This lets us allocate color buffers as __DRIimages and pass them into the driver instead of having to create a __DRIbuffer with the flink that requires. With this patch, we can now run gbm on render-nodes. A render-node is a drm device that doesn't support modesetting and all the legacy DRI ioctls. flink is also not supported, but now that gbm doesn't need flink, we can run piglit on head-less gbm or head-less GPGPU. Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Chad Versace <chad.versace@linux.intel.com> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Tested-by: Jordan Justen <jordan.l.justen@intel.com> Cc: "10.0" <mesa-stable@lists.freedesktop.org>
* dri: Pass in the dlsym()ed driver extension to screen creation.Eric Anholt2013-10-242-4/+12
| | | | | | | | | | | This will allow a megadrivers build to reference the actual driver being loaded from the shared dri_util screen creation code. v2: Fix indentation, fallback case in EGL (review by Emil). Reviewed-by: Matt Turner <mattst88@gmail.com> (v1) Reviewed-by: Chad Versace <chad.versace@linux.intel.com> (v1) Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* gbm: Add support for the new __driDriverGetExtensions interface.Eric Anholt2013-10-241-2/+15
| | | | | | | v2: Fix uninitialized variable use in the old-ABI case. Reviewed-by: Chad Versace <chad.versace@linux.intel.com> (v1) Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* gbm-dri: Support importing RGB565 buffersKristian Høgsberg2013-10-211-0/+3
|
* gbm: Add support for gbm bos and surfaces using GBM_FORMAT_ARGB2101010Kristian Høgsberg2013-10-151-0/+6
| | | | | | | | We can now add GBM support for the 10 bit/channel formats which lets us create a gbm surface that we can use with KMS for display hardware that support the format. Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
* wayland: Don't rely on static variable for identifying wl_drm buffersKristian Høgsberg2013-10-112-1/+6
| | | | | | | | | | | | Now that libEGL has been fixed to not leak all kinds of symbols, gbm links to its own copy of the libwayland-drm.a helper library. That means we can't rely on comparing the addresses of a static vtable symbol in that library to determine if a wl_buffer is a wl_drm_buffer. Instead, we move the vtable into the wl_drm struct and use that for comparing. https://bugs.freedesktop.org/show_bug.cgi?id=69437 Cc: 9.2 <mesa-stable@lists.freedesktop.org>
* gbm: Link to libwayland-drm if Wayland EGL platform is enabledArmin K2013-08-121-1/+2
| | | | | | | | We were relying on libEGL to pull in libwayland-client symbols, but with commit 2c2e64edaba0f6aeb181ca5b51eb8dea8e9b39f9 cleaned up the symbol leak. https://bugs.freedesktop.org/show_bug.cgi?id=67962
* egl: Update to Wayland 1.2 server APIAnder Conselvan de Oliveira2013-08-071-2/+3
| | | | | | | | | | Since Wayland 1.2, struct wl_buffer and a few functions are deprecated. References to wl_buffer are replaced with wl_resource and some getter functions and calls to deprecated functions are replaced with the proper new API. The latter changes are related to resource versioning. Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
* gbm: Remember to init format on gbm_dri_bo_create.Daniel van Vugt2013-02-071-0/+2
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=60143
* Clean up .gitignore filesMatt Turner2013-01-101-1/+0
|
* Remove gbm's unused Makefile.templateMatt Turner2013-01-101-55/+0
|
* gbm: Use the kms dumb ioctls for cursor instead of libkmsKristian Høgsberg2012-10-212-48/+77
| | | | | | We need to create bos suitable for cursor usage that we can map and write data into. The kms dumb ioctls is all we need for this, so drop the dependency on libkms.
* gbm: Reject buffers that are not wl_drm buffers in gbm_bo_import()Kristian Høgsberg2012-10-151-0/+3
| | | | Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
* dri: Rework planar image interfaceJakob Bornecrantz2012-08-311-20/+13
| | | | | | | | | | | | | | | | | | | | | | As discussed with Kristian on #wayland. Pushes the decision of components into the dri driver giving it greater freedom to allow t to implement YUV samplers in hardware, and which mode to use. This interface will also allow drivers like SVGA to implement YUV surfaces without the need to sub-allocate and instead send 3 seperate buffers for each channel, currently not implemented. I have tested these changes on Gallium Svga. Scott tested them on both intel and Gallium Radeon. Kristan and Pekka tested them on intel. v2: Fix typo in dri2_from_planar. v3: Merge in intel changes. Tested-by: Scott Moreau <oreaus@gmail.com> Tested-by: Pekka Paalanen <ppaalanen@gmail.com> Tested-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
* dri: Make query image WIDTH and HEIGHT be version 4Jakob Bornecrantz2012-08-261-0/+4
| | | | | Tested-by: Scott Moreau <oreaus@gmail.com> Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
* dri: Remove image write functionJakob Bornecrantz2012-08-261-2/+0
| | | | | | | | Since its not used by anything anymore and no release has gone out where it was being used. Tested-by: Scott Moreau <oreaus@gmail.com> Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
* gbm: Use libkms to replace DRI cursor imagesJakob Bornecrantz2012-08-263-12/+64
| | | | | | | | | | | | | | Uses libkms instead of dri image cursor. Since this is the only user of the DRI cursor and write interface we can remove cursor surfaces entirely from the DRI interface and as a consequence also from the Gallium interface as well. Tho to make everybody happy with this it would probably should add a kms_bo_write function, but that is probably wise in anyways. The only downside is that it adds a dependancy on libkms, this could how ever be replaced with the dumb_bo drm ioctl interface. Tested-by: Scott Moreau <oreaus@gmail.com> Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
* gbm: Add shared usage on images createdJakob Bornecrantz2012-08-221-0/+3
| | | | | Tested-by: Scott Moreau <oreaus@gmail.com> Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
* gbm: Fix build for wayland includeElvis Lee2012-07-301-0/+1
| | | | | | backends/gbm_dri.c fails to find wayland-server.h. Signed-off-by: Elvis Lee <kwangwoong.lee@lge.com>
* gbm: Rename gbm_bo_get_pitch to gbm_bo_get_strideKristian Høgsberg2012-07-164-7/+7
| | | | | We use pitch for 'pixels per row' and stride for 'bytes per row' pretty consistently in mesa and most other places, so rename the gbm API.
* gbm: Add new gbm_bo_import entry pointKristian Høgsberg2012-07-165-48/+95
| | | | | This generalizes and replaces gbm_bo_create_for_egl_image. gbm_bo_import will create a gbm_bo from either an EGLImage or a struct wl_buffer.
* gbm: Add gbm_bo_write entry pointKristian Høgsberg2012-05-034-0/+47
| | | | | | | | | | | | | | | | This new gbm entry point allows writing data into a gbm bo. The bo has to be created with the GBM_BO_USE_WRITE flag, and it's only required to work for GBM_BO_USE_CURSOR_64X64 bos. The gbm API is designed to be the glue layer between EGL and KMS, but there was never a mechanism initialize a buffer suitable for use with KMS hw cursors. The hw cursor bo is typically not compatible with anything EGL can render to, and thus there's no way to get data into such a bo. gbm_bo_write() fills that gap while staying out of the efficient cpu->gpu pixel transfer business. Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com>
* gbm: add gbm_bo_get_device() functionAnder Conselvan de Oliveira2012-04-302-0/+14
|