summaryrefslogtreecommitdiffstats
path: root/src/gbm
Commit message (Collapse)AuthorAgeFilesLines
* gbm: gbm_bo_get_handle_for_plane fallback to nonplanar handleAlex Villacís Lasso2019-05-151-0/+6
| | | | | | | | | | | | | | | | | | Commit f9567ab435217a72cbae628336ead84dc0b2a803 (gbm: Export a getter for per plane handles) contains an API version check that fails on i915 (API version 7 vs. check for minimum API version 13). Any client that migrates to the planar API will start failing on i915 (see https://gitlab.gnome.org/GNOME/mutter/issues/127 for mutter, and https://bugs.freedesktop.org/show_bug.cgi?id=108487 for weston). This commit adds a fallback for plane 0 when the API check fails and returns the non-planar handle in this scenario, making the call equivalent to gbm_bo_get_handle(). This is enough for weston 6.0.0 to start working again on an i915 system. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=108487 Signed-off-by: Alex Villacís Lasso <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* meson: make nm binary optionalDylan Baker2019-05-031-1/+1
| | | | | | | | | | | This makes nm not required, but used if found. In general I imagine that this means that on windows nm wont be found, and on other platforms it will. v2: - fix gbm and egl symbols check tests to only be run if nm is found - reword commit message to reflect the code change Reviewed-by: Eric Anholt <[email protected]>
* gbm: Improve documentation of BO importHeinrich2019-05-021-3/+5
| | | | | | | | | | | | | - Add GBM_BO_IMPORT_FD_MODIFIER to documentation of supported foreign object types - Add newline before documentation block - Improve language Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* delete autotools input filesEric Engestrom2019-04-291-12/+0
| | | | | | | Leftovers from when autotools was deleted. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* gbm: don't return voidcoypu2019-04-261-1/+1
| | | | | Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* Delete autotoolsDylan Baker2019-04-151-56/+0
| | | | | | | | | | Acked-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Acked-by: Marek Olšák <[email protected]> Acked-by: Jason Ekstrand <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Matt Turner <[email protected]>
* gbm: drop duplicate #definesEric Engestrom2019-02-141-8/+0
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* drm-uapi: use local files, not system libdrmEric Engestrom2019-02-141-1/+1
| | | | | | | | | There was an issue recently caused by the system header being included by mistake, so let's just get rid of this include path and always explicitly #include "drm-uapi/FOO.h" Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
* meson: Add tests to suitesDylan Baker2018-11-201-1/+2
| | | | | | | | | | | | | | | | Meson test has a concepts of suites, which allow tests to be grouped together. This allows for a subtest of tests to be run only (say only the tests for nir). A test can be added to more than one suite, but for the most part I've only added a test to a single suite, though I've added a compiler group that includes nir, glsl, and glcpp tests. To use this you'll need to invoke meson test directly, instead of ninja test (which always runs all targets). it can be invoked as: `meson test -C builddir --suite $suitename` (meson test has addition options that are pretty useful). Tested-By: Gert Wollny <[email protected]> Acked-by: Eric Engestrom <[email protected]>
* gbm: add missing comma between stringsEric Engestrom2018-11-191-1/+1
| | | | | | | Fixes: d971a4230d54069c996bc "loader: Factor out the common driver opening logic from each loader." Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* loader: Factor out the common driver opening logic from each loader.Eric Anholt2018-11-163-74/+12
| | | | | | | | | | | | | I copied the code from egl_dri2.c, but the functionality was equivalent between all the loaders other than their particular environment variables. v2: Drop the logging function equivalent to loader_default_logger() (requested by Eric, Emil). Move the SCons workaround across. Drop the now-unused driGetDriverExtensions() declaration that was lost in a rebase. Reviewed-by: Eric Engestrom <[email protected]> (v1) Reviewed-by: Emil Velikov <[email protected]> (v1)
* gbm: Clarify acceptable formats for gbm_boDaniel Stone2018-11-161-2/+2
| | | | | | | | | | | | | | | gbm_bo_create() was presumably meant to originally accept gbm_bo_format enums, but it's accepted GBM_FORMAT_* tokens since the dawn of time. This is good, since gbm_bo_format is rarely used and covers a lot less ground than GBM_FORMAT_*. Change the documentation to refer to both; this involves removing a 'see also' for gbm_bo_format, since we can't also use \sa to refer to a family of anonymous #defines. Signed-off-by: Daniel Stone <[email protected]> Reported-by: Pekka Paalanen <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* gbm: add new entrypoint to symbols checkEric Engestrom2018-11-151-0/+1
| | | | | | | Fixes: 6328536ff28ca26f2ad4e "gbm: Introduce a helper function for printing GBM format names." Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* gbm: remove unnecessary meson includeEric Engestrom2018-11-131-1/+0
| | | | | | | | | | `inc_wayland_drm` is only used if wayland is built, and it's already added in that case a few lines below. Fixes: a29869e8720b385d3692f "gbm: Don't traverse backwards for includes" Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* gbm: Introduce a helper function for printing GBM format names.Eric Anholt2018-11-122-0/+26
| | | | | | | | | | This requires that the caller make a little (stack) allocation to store the string. v2: Use gbm_format_canonicalize (suggested by Daniel) Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* gbm: Move gbm_format_canonicalize() to the core.Eric Anholt2018-11-123-16/+19
| | | | | | | I want it for the format name debugging code. Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* gbm: Add GBM_FORMAT_ARGB1555 supportMichel Dänzer2018-10-091-0/+4
| | | | Reviewed-by: Marek Olšák <[email protected]>
* gbm: Add support for 10bpp BGR formatsDaniel Stone2018-08-011-0/+8
| | | | | | | | | | Add support for XBGR2101010 and ABGR2101010 formats. Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Mario Kleiner <[email protected]> Tested-by: Mario Kleiner <[email protected]> Tested-by: Ilia Mirkin <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* meson: Remove various completed todosDylan Baker2018-06-131-2/+0
| | | | | | | | v3: - Remove "won't do" todos, so only completed todo's are now removed. Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Matt Turner <[email protected]> (v2)
* gbm: remove never-implemented functionEric Engestrom2018-03-282-3/+0
| | | | | | | | | | I assume this was implemented in a previous version of that commit, but was removed in the version that actually landed. Fixes: 8430af5ebe1ee8119e14 "Add support for swrast to the DRM EGL platform" Cc: Giovanni Campagna <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* meson: Use include directory variables instead of traversingDylan Baker2018-03-071-1/+1
| | | | | | | | Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Jon Turney <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Tested-by: Julien Isorce <[email protected]> Tested-by: Karol Herbst <[email protected]>
* gbm: give a name to rgba fieldsEric Engestrom2018-03-051-1/+6
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* *-symbol-check: use correct `nm` path when cross-compilingEric Engestrom2018-02-262-2/+2
| | | | | | Inspired-by: a similar patch for libdrm by Heiko Becker Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gbm: Fix the alpha masks in the GBM format table.Eric Anholt2018-02-231-2/+2
| | | | | | | | | Once GBM started looking at the values of the alpha masks, ARGB/ABGR wouldn't match any more because we had both A and R in the low bits. Fixes: 2ed344645d65 ("gbm/dri: Add RGBA masks to GBM format table") Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* dri: fromPlanar() can return NULL as a valid resultLouis-Francis Ratté-Boulianne2018-02-151-0/+1
| | | | | | | | | | | | | It was assumed that fromPlanar() could return NULL to mean that the planar image is the same as the parent DRI image. That assumption wasn't made everywhere though. Let's fix things and make sure that all callers understand a NULL result Signed-off-by: Louis-Francis Ratté-Boulianne <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* gbm/dri: Expose visuals table through gbm_dri_deviceDaniel Stone2018-02-092-11/+19
| | | | | | Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Tested-by: Ilia Mirkin <[email protected]>
* gbm/dri: Add RGBA masks to GBM format tableDaniel Stone2018-02-091-9/+37
| | | | | | | | | Eventually, we can replace the visuals list inside GBM EGL driver with this one. Signed-off-by: Daniel Stone <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Tested-by: Ilia Mirkin <[email protected]>
* meson: Don't confuse the install and search paths for dri driversDylan Baker2018-02-021-1/+1
| | | | | | | | | | | | | | | | | | | | | Currently there is not a separate option for setting the search path of DRI drivers in meson, like there is in scons and autotools. This is an oversight and needs to be fixed. This adds an extra option `dri-search-path`, which will default to the value of `dri-drivers-path`, like autotools does. v2: - Split input list before joining. v3: - use : instead of ; as the delimiter. The autotools help string incorrectly says ; but the code uses : v4: - Take list in pre : delimited form (Ilia) - Ensure that the dri-search-path is absolute when using dri_drivers_path Fixes: db9788420d4bc7b4 ("meson: Add support for configuring dri drivers directory.") Reported-by: Ilia Mirkin <[email protected]> Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]> (v2) Reviewed-by: Eric Engestrom <[email protected]> (v3)
* autotools: include meson build files in tarballDylan Baker2018-01-191-1/+1
| | | | | | | | | | | | This adds the meson.build, meson_options.txt, and a few scripts that are used exclusively by the meson build. v2: - Remove accidentally included changes needed to test make dist with LLVM > 3.9 Signed-off-by: Dylan Baker <[email protected]> Acked-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* mesa: remove unneeded semicolonsGrazvydas Ignotas2018-01-171-1/+1
| | | | | | Trivial. Found by Coccinelle. Reviewed-by: Eric Engestrom <[email protected]>
* meson: Use consistent style for testsDylan Baker2018-01-111-1/+2
| | | | | | | Don't use intermediate variables, use consistent whitespace. Acked-by: Eric Engestrom <[email protected]> Signed-off-by: Dylan Baker <[email protected]>
* meson: add dep_thread to every lib that includes threads.hEric Engestrom2017-12-071-1/+1
| | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104141 Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* wayland-drm: static inline wayland_drm_buffer_getEmil Velikov2017-11-082-4/+2
| | | | | | | | | | | | | | | | | | | | The function is effectively a direct function call into libwayland-server.so. Thus GBM no longer depends on the wayland-drm static library, making the build more straight forward. And the resulting binary is a bit smaller. Note: we need to move struct wayland_drm_callbacks further up, otherwise we'll get an error since the type is incomplete. v2: Rebase, beef-up commit message, update meson, move struct wayland_drm_callbacks. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]> (v1) Reviewed-by: Eric Engestrom <[email protected]> # meson bit only Acked-by: Eric Engestrom <[email protected]> # for the rest Reviewed-by: Dylan Baker <[email protected]> # meson
* meson: standardize .so version to major.minor.patchEric Engestrom2017-11-071-1/+1
| | | | | | | | | | | | | | This `version` field defines the filename for the .so. The plan .so as well as .so.$major are always symlinks to this. Unless I'm mistaken, only the major is ever used, so this shouldn't matter, but for consistency with autotools (and in case it does matter), let's always have all 3 major.minor.patch components. (The soname isn't affected, and is always .so.$major) Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* gbm: Don't traverse backwards for includesDylan Baker2017-11-023-5/+10
| | | | | | | | | | | | | | This is just a bad idea and should be avoided. Instead, make the #include flat and fix the build systems to pass the proper -I flags v2: - add an inc_wayland_drm instead passing a path to include_directories (Emil) - update commit message (Emil) Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]> (v1) Reviewed-by: Eric Engestrom <[email protected]> (v1)
* meson: pass correct args to gbm symbol testEric Engestrom2017-10-311-2/+4
| | | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gbm: fail symbol check if lib is missingEric Engestrom2017-10-311-1/+10
| | | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* meson: set visibility flags on gbmDylan Baker2017-10-311-1/+1
| | | | | | | | | This is done in autotools, and is an oversight in the meson build. Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Tested-by: Eric Engestrom <[email protected]>
* meson: Don't link gbm with threadsDylan Baker2017-10-311-1/+1
| | | | | | | | | | It's supposed to be linked with pthread-stubs (if the platform needs pthread-stubs). Pthread stubs support isn't (yet) implemented in the meson build, so add a TODO. Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* meson: build libEGLDylan Baker2017-10-201-2/+10
| | | | | | | | | | | | | | | | | | This is based heavily on Daniel Stone's work for the same, rebased on master and with a number of TODO's fixed. This does not implement glvnd (which is coming in a later patch) Meson builds egl slightly differently than autotools, namely it doesn't build an intermediate shared library. It doesn't do this because meson doesn't have problems with the name of the library being dynamically generated, so the glvnd and non-glvnd code can follow the same path. v2: - Don't reuse variable (Eric E.) Signed-off-by: Dylan Baker <[email protected]> Tested-by: Eric Engestrom <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* meson: build gbmDylan Baker2017-10-091-0/+67
| | | | | | | | | | | | | This doesn't include egl support, just dri support. v2: - when gbm is set to 'auto', only build if a dri driver is also enabled - Fix conditional to check for x11 modules with vulkan as well as with dri drivers v3: - Set pkgconfig libraries.private value Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* configure.ac: split the wayland client/server confusionEmil Velikov2017-09-191-2/+2
| | | | | | | | | | | | | | | | | | | | At the moment wayland-clients, such as the Vulkan drivers were over-linking against libwayland-server.so. That went unnoticed, since both client and server code uses the wl*interface symbols, which are present in both libwayland-client.so and libwayland-server.so. I've looked at correcting that, although that's orthogonal to this fix. Note: wayland-egl does _not_ depend on wayland-client, although it does need wayland-egl.h. There's no distinct package that provides it (I have a WIP on the topic) so current solution will do for now. v2: Rebase with the "...inline wayland_drm_buffer_get" patch removed. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* gbm: Add gbm_device_get_format_modifier_plane_count to testGert Wollny2017-09-171-0/+1
| | | | | | | | | | | | | Adding gbm_device_get_format_modifier_plane_count made the test gbm-symbols-check fail, this patch adds the according function name to the test. Fixes: 8824141b8d48d9120ddbf542d6fb661046c41c62 (gbm: Add a gbm_device_get_format_modifier_plane_count function) Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Andres Gomez <[email protected]>
* gbm: Add a gbm_device_get_format_modifier_plane_count functionJason Ekstrand2017-09-144-0/+48
| | | | | | | | This allows the user to query the number of planes required by a given format+modifier combination without having to create a bo or surface. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* gbm: turn GBM_ALWAYS_SOFTWARE into a booleanEric Engestrom2017-09-123-3/+9
| | | | | | | Instead of setting based on set/unset, allow users to use boolean values. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* loader: rework xmlconfig dependencyEmil Velikov2017-08-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | Currently xmlconfig is conditionally used, only when --enable-dri is available. As the library has moved to src/util and has wider wisebase, this guard is no longer correct. Strictly speaking - it wasn't since the introduction of xmlconfig into st/nine a while ago. Unconditionally enable xmlconfig and drop the linking. As said before there's other users of the library, so depending on the configure options we will get multiple definitions of said symbols. NOTE: To avoid breaking other combinations, this commit adds the xmlconfig link to the required places - throughout gallium and the DRI loaders. Cc: Aaron Watry <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* gbm: add gbm_bo_get_bpp()Eric Engestrom2017-08-013-0/+70
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gbm: fix typoEric Engestrom2017-07-191-1/+1
| | | | Signed-off-by: Eric Engestrom <[email protected]>
* gbm: fix typo in doxygen commentGwan-gyeong Mun2017-07-191-2/+2
| | | | | | | This fixes the misspelling of gbm_bo_import api param. Signed-off-by: Mun Gwan-gyeong <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gbm: Remove is_planar_format dead codeDaniel Stone2017-07-181-30/+0
| | | | | | | | | | This was only used in create_dumb() to blacklist planar formats. However, the start of the function already whitelists ARGB8888 (cursor) and XRGB8888 (scanout), and nothing else. So this entire function can be removed. Reviewed-by: Lucas Stach <[email protected]> Reviewed-by: Emil Velikov <[email protected]>