summaryrefslogtreecommitdiffstats
path: root/src/gbm
Commit message (Collapse)AuthorAgeFilesLines
* 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 <[email protected]> Cc: Kristian Høgsberg <[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]>
* 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 <[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]>
* 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 <[email protected]> Reviewed-By: Gong, Zhigang <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gbm/dri: hide extension loader symbolsMaarten Lankhorst2013-11-251-2/+2
| | | | | | They should not be exposed. Cc: "10.0" <[email protected]>
* gbm: enable subdir-objects to prevent automake warningsEmil Velikov2013-11-161-0/+2
| | | | | Reviewed-by: Matt Turner <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* 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 <[email protected]> Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Jordan Justen <[email protected]> Tested-by: Jordan Justen <[email protected]> Cc: "10.0" <[email protected]>
* 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 <[email protected]> (v1) Reviewed-by: Chad Versace <[email protected]> (v1) Reviewed-by: Emil Velikov <[email protected]>
* 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 <[email protected]> (v1) Reviewed-by: Emil Velikov <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]> Tested-by: Pekka Paalanen <[email protected]> Tested-by: Kristian Høgsberg <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]> Signed-off-by: Jakob Bornecrantz <[email protected]>
* dri: Make query image WIDTH and HEIGHT be version 4Jakob Bornecrantz2012-08-261-0/+4
| | | | | Tested-by: Scott Moreau <[email protected]> Signed-off-by: Jakob Bornecrantz <[email protected]>
* 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 <[email protected]> Signed-off-by: Jakob Bornecrantz <[email protected]>
* 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 <[email protected]> Signed-off-by: Jakob Bornecrantz <[email protected]>
* gbm: Add shared usage on images createdJakob Bornecrantz2012-08-221-0/+3
| | | | | Tested-by: Scott Moreau <[email protected]> Signed-off-by: Jakob Bornecrantz <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* gbm: add gbm_bo_get_device() functionAnder Conselvan de Oliveira2012-04-302-0/+14
|
* gbm: update documentation to reflect current behaviorAnder Conselvan de Oliveira2012-04-301-8/+10
|
* gbm: add gbm_bo_get/set_user_data()Ander Conselvan de Oliveira2012-04-303-0/+41
| | | | | This allows the user to associate some data to a gbm_bo and get a callback when the bo is destroyed.
* gbm: remove unused fields from gbm_dri_surfaceAnder Conselvan de Oliveira2012-04-301-3/+0
|
* gbm: Create hooks for dri2_loader_extension in dri backendAnder Conselvan de Oliveira2012-03-282-2/+66
| | | | | | Pass a dri2_loader extension to the dri driver when gbm creates the dri screen. The implementation jumps through pointers in the gbm device so that an EGL on GBM implementation can provide the real implementations.
* gbm: Add gbm_surface interfaceAnder Conselvan de Oliveira2012-03-285-5/+186
| | | | | | | | | | | | The idea here is to be able to create an egl window surface from a gbm_surface. This avoids the need for the surfaceless extension and lets the EGL platform handle buffer allocation, while keeping the user in charge of somehow presenting the buffers (using kms page flipping, for example). gbm_surface_lock_front_buffer() locks a surface's front buffer and returns a gbm bo representing it. This bo should later be returned to the gbm surface using gbm_surface_release_buffer().
* egl_dri2: make flush extension useable by drm platformAnder Conselvan de Oliveira2012-03-272-0/+2
|
* Add Makefile.in to toplevel .gitignoreKenneth Graunke2012-03-201-1/+0
| | | | | | | To avoid redundancies, this patch also removes Makefile.in from the other .gitignore files. Acked-by: Eric Anholt <[email protected]>
* Add .deps/, .libs/, and *.la to toplevel .gitignorePaul Berry2012-03-201-4/+0
| | | | | | | To avoid redundancies, this patch also removes .deps, .libs, and *.la from .gitignore files in subdirectories. Reviewed-by: Kenneth Graunke <[email protected]>
* shared-glapi: Convert to automakeKristian Høgsberg2012-03-191-2/+2
| | | | | | | | | | This fixes a build problem where EGL links to libgbm.la, which encodes a relative path to it's libglapi.so dependency. The relative path breaks when the linker tries to resolve it from src/egl/main instead of src/gbm. Typically we silently fall back to the system libglapi.so, which is wrong and breaks when there isn't one. Morale of the story: don't mix mklib and libtool.
* gbm_dri: Fix DRIimage lookup callbackBenjamin Franzke2012-03-071-2/+2
| | | | | | | | | | | | | | | | | | | That is by making the dri extension variables static in gbm_dri.c. The image_lookup_extension is provided by egl_dri2 when using x11 or wayland platforms, when using the drm platform, gbm_dri has a wrapper for it. Both use the same variables name image_lookup_extension. Since -fvisibility=hidden was (probably by mistake) removed when converting to automake, the "image_lookup_extension" symbol from egl_dri2.c became exported in libEGL.so, so "image_lookup_extension" from gbm_dri.c was ignored. This resulted in calling incorrect callbacks. We cant make the image_lookup_extension static in egl_dri2.c right now, since its used across multiple files. Bugzilla: https://bugs.freedesktop.org/attachment.cgi?id=58099 Reviewed-by: Kristian Høgsberg <[email protected]>
* gbm: track buffer format through DRI driversJesse Barnes2012-02-224-5/+164
| | | | | | | | | | | | GBM needs the buffer format in order to communicate with DRM and clients for things like scanout. So track the DRI format requested in the various back ends and use it to return the DRI format back to GBM when requested. GBM will then map this into the GBM surface type (which is in turn based on the DRM fb format list). Signed-off-by: Jesse Barnes <[email protected]>
* gbm: Add back link flags for udev, dl and glapiBenjamin Franzke2012-01-261-1/+3
| | | | They were left out when migrating to automake.
* gbm: fix copy & paste error in gbm_bo_get_handle documentationAnder Conselvan de Oliveira2012-01-251-1/+1
|
* gbm: install libgbm.so into libMatt Turner2012-01-242-1/+5
| | | | This partially reverts commit 90e256853418eaaba3717f930cc6a331e4099056.
* targets/gbm: Fix install pathBenjamin Franzke2012-01-241-2/+2
| | | | | | GBM_BACKEND_INSTALL_DIR was deleted by commit 06ad64ad29e7aa9e2d001f6bd1f8c1c1f77050b8. Since we dont need this configurable, use $(INSTALL_LIB_DIR)/gbm now.
* gbm/Makefile.template: Remove builtin-compile pathBenjamin Franzke2012-01-241-10/+0
| | | | | Builtins are handled by the main gbm Makefile since 06ad64ad29e7aa9e2d001f6bd1f8c1c1f77050b8.
* egl,gbm_gallium: Fix linkage against gbm from automakeBenjamin Franzke2012-01-241-2/+2
| | | | | | Add src/gbm/.libs to ldflags. The gbm lib is src/gbm/.libs/ instead of lib/ as of commit 06ad64ad29e7aa9e2d001f6bd1f8c1c1f77050b8.
* automake: src/gbmMatt Turner2012-01-237-146/+46
| | | | | libgbm.so.1.0.0 (instead of libgbm.so.1.0) is installed now along with libgbm.so.1 (no change).
* gbm: Validate usage flags in gbm_bo_create_from_egl_image()Kristian Høgsberg2012-01-181-0/+11
| | | | | The entry point is supposed to validate that the EGLImage is suitable for the passed in usage flags, but that was never implemented.
* gbm: Add documentation for the public facing APIRob Bradford2012-01-133-2/+162
|
* gbm/dri: avoid crash in dri_screen_createRALOVICH, Kristóf2011-08-041-0/+2
|
* Make it possible to use gbm with c++Jørgen Lind2011-07-191-0/+9
| | | | NOTE: This is a candiate for 7.11