aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'freedesktop/master' into aosp/masterJohn Stultz2018-04-136-17/+60
|\ | | | | | | | | | | | | This merges the freedesktop/master branch into aosp/master Change-Id: I3104d45924f67d37808154d04c15518394204478 Signed-off-by: John Stultz <john.stultz@linaro.org>
| * meson,configure: include config.h automaticallyEric Engestrom2018-03-204-16/+0
| | | | | | | | | | | | | | | | | | This will prevent any more missing `#include "config.h"` bug, at the cost of having to recompile some files that didn't need to be when changing build options. Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
| * meson: use pkg-config to detect libatomic_opsEric Engestrom2018-03-091-1/+1
| | | | | | | | | | Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
| * *-symbol-check: Don't hard-code nm executableHeiko Becker2018-02-232-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | Helpful if your nm executable has a prefix based on the architecture, for example. Signed-off-by: Heiko Becker <heirecka@exherbo.org> Cc: Timo Gurr <timo.gurr@gmail.com> [Eric: v2: rebase and add Meson support] Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
| * meson: fix libdrm_nouveau pkgconfig include directoriesDylan Baker2018-01-311-1/+1
| | | | | | | | | | Signed-off-by: Dylan Baker <dylan.c.baker@intel.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
| * Add meson build systemDylan Baker2018-01-121-0/+58
| | | | | | | | | | | | | | | | | | | | This patch adds a complete meson build system, including tests and install. It has the necessary hooks to allow it be used as a subproject for other meson based builds such as mesa. Signed-off-by: Dylan Baker <dylan.c.baker@intel.com> Reviewed-and-tested-by: Igor Gnatenko <i.gnatenko.brain@gmail.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
* | Convert to Android.bpDan Willemsen2017-10-233-15/+22
| | | | | | | | | | | | | | | | | | | | | | | | See build/soong/README.md for more information about Soong. Removes BOARD_GPU_DRIVERS, which wasn't affecting anything, since none of the HAVE_* macros are defined. Even if they were, we'd prefer to compile all of them so that a single library can support multiple boards. Test: mmma external/libdrm Change-Id: Ie01736bce6cf41e3da5040fe5341ade0634b5111
* | Build libdrm* modules with BOARD_VNDK_VERSIONJiyong Park2017-10-191-0/+1
|/ | | | | | | | | | | | | | | | | They are marked as vendor module since they all are depending on libdrm, which is a vendor lib. Also, libdrm_platform is newly introduced as the platform version of libdrm. Bug: 37342627 Bug: 63741047 Test: BOARD_VNDK_VERSION=current m -j libdrm_amdgpu libdrm_etnaviv libdrm_freedreno libdrm_intel libdrm_nouveau libdrm_radeon libdrm_rockchip libdrm_tegra libkms modetest atomictest planetest Change-Id: Ic1ff6fb616f406f1c5e005d3e6f6039758d62315 Merged-In: Ic1ff6fb616f406f1c5e005d3e6f6039758d62315
* android: introduce Android.common.mk to reduce boilerplateEmil Velikov2017-01-271-5/+2
| | | | | | | | | | | | | | | | ... across the makefiles. Currently this isn't much but that will change shortly. As an added bonus this fixes all present and future cases where we've forgotten to strip out the headers from LOCAL_SRC_FILES. In a couple of cases (the tests) we start setting LOCAL_EXPORT_C_INCLUDE_DIRS, which shouldn't be an issue. Cc: Chih-Wei Huang <cwhuang@android-x86.org> Cc: Rob Herring <robh@kernel.org> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Rob Herring <robh@kernel.org>
* android: remove LOCAL_MODULE_TAGS := optional tagEmil Velikov2017-01-271-1/+0
| | | | | | | | | | | | Seems to be the default option since ~2009 with commit 2f31293ba78 "auto import from //branches/cupcake/...@137197". Fleshed out from a larger commit in the AOSP repo/fork. Cc: Dan Willemsen <dwillemsen@google.com> Cc: Chih-Wei Huang <cwhuang@android-x86.org> Cc: Rob Herring <robh@kernel.org> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Rob Herring <robh@kernel.org>
* automake: Don't include Android Makefiles in the release tarballAndreas Boll2016-07-231-1/+1
| | | | | | | | | | | | | | Currently only some Android Makefiles are included in the release tarball. To be more consistent one could either add the remaining files or don't ship Android Makefiles altogether. According to Emil the Android folk doesn't use our release tarballs. Thus it makes sense to remove those files from distribution which also means less work for maintenance in the future. Suggested-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Andreas Boll <andreas.boll.dev@gmail.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* Android: strip out header files from sources listRob Herring2016-07-061-1/+1
| | | | | | | AOSP master now errors if LOCAL_SRC_FILES contains headers, so filter out header files from the source lists. Signed-off-by: Rob Herring <robh@kernel.org>
* nouveau: clean up nouveau.h, noting deprecated members/functionsBen Skeggs2015-12-211-113/+114
| | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* nouveau: add support for newer kernel interfacesBen Skeggs2015-12-212-7/+155
| | | | | | | | | v2. - leave client-provided pointer unmodified on sclass_get() failure Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* nouveau: add new interface to create a nouveau_deviceBen Skeggs2015-12-213-47/+89
| | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* nouveau: remove nouveau_object_find()Ben Skeggs2015-12-213-13/+0
| | | | | | | | No more internal users, and there's never been external users. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* nouveau: make use of nouveau_drm::fd instead of nouveau_device::fdBen Skeggs2015-12-213-31/+40
| | | | | | | | | | | The latter is deprecated, and will not be valid for newer clients. v2. - split out nouveau_object_find removal Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* nouveau: stack legacy nouveau_device on top of nouveau_drmBen Skeggs2015-12-211-25/+21
| | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* nouveau: introduce object to represent the kernel clientBen Skeggs2015-12-213-0/+55
| | | | | | | | | | | | | | | | | | Because NVIF intentionally lacks some of the paths necessary to be compatible with various mistakes we've made over the years, libdrm needs to know whether a client has been updated and that it's safe to make use of the new kernel interfaces. Clients still using nouveau_device_open()/wrap() will be forced to make use of ABI16 instead of NVIF. v2. - remove lib_version, nothing used it - leave client-provided pointer unmodified on failure Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* nouveau: add interfaces to query information about supported classesBen Skeggs2015-12-215-1/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | This will expose functionality supported by newer kernel interfaces. Current userspace uses the chipset to determine which classes are likely exposed, which generally works pretty well, but isn't as flexible as it could be. Unfortunately, the G98:GF100 video code in Mesa is still relying on the kernel exposing incorrect vdec classes on some chipsets. The ABI16 kernel interfaces have a workaround for this in place, but that will no longer be available once libdrm supports NVIF. To prevent a regression when NVIF support is added, if there's no kernel support for NVIF, libdrm will magic up a class list containing correct vdec classes anyway instead of failing with -ENODEV. v2. - add description of abi16/vdec workaround - add description of sclass/mclass - leave client-provided pointer unmodified on abi16_sclass() failure Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* nouveau: add interface to call an object's methodsBen Skeggs2015-12-213-0/+10
| | | | | | | | | This will expose functionality supported by newer kernel interfaces, giving access to things such as ZBC controls, perfmon, etc. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* nouveau: make it possible to init object in pre-allocated memoryBen Skeggs2015-12-211-16/+48
| | | | | | | | Required for an upcoming patch, not exposed to library clients. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* nouveau: move object functions up, to avoid future foward declsBen Skeggs2015-12-211-56/+56
| | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* nouveau: move more abi16-specific logic into abi16.cBen Skeggs2015-12-213-58/+93
| | | | | | | | | | | | v2. - add a comment about the (ab)use of nouveau_object::length - add a comment about abi16_object() return values v3. - handle new client + old kernel for sw classes Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* nouveau: import and install a selection of nvif headers from the kernelBen Skeggs2015-12-219-2/+472
| | | | | | | | | This commit also modifies the install path of the main libdrm_nouveau header to be under a nouveau/ subdirectory. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Tested-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* nouveau: use designated initializersEmil Velikov2015-09-042-6/+13
| | | | | Cc: nouveau@lists.freedesktop.org Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* nouveau: add asserts to make sure krefs are thereIlia Mirkin2015-06-211-0/+4
| | | | | | | This should help catch odd bugs at the callsites rather than much later on with completely bogus bo indices. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
* nouveau: add coherent BO attributeAlexandre Courbot2015-05-212-0/+4
| | | | | | | | | | | Add a flag allowing Nouveau to specify that an object should be coherent at allocation time. This is required for some class of objects like fences which are randomly-accessed by both the CPU and GPU. This flag instructs the kernel driver to make sure the object remains coherent even on architectures for which coherency is not guaranteed by the bus. Reviewed-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
* nouveau: restore check that avoids multiple user bos per kernel boBen Skeggs2015-05-051-0/+10
| | | | | | | | | | Lost in 5ea6f1c32628887c9df0c53bc8c199eb12633fec, triggering fdo#89842. Unlike the PRIME fd->handle interfaces, the GEM_OPEN interface doesn't do anything at the kernel level to prevent this situation occuring, and we end up with multiple GEM handles for a single kernel buffer. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
* Add missing <strings.h> includesGreg Hackmann2015-04-281-0/+1
| | | | | | | | | A couple of files use ffs() without explicitly including strings.h. Some systems will pull in ffs()'s declaration through another header anyway, but not when compiling against bionic in AOSP master. Signed-off-by: Greg Hackmann <ghackmann@google.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* drm: remove drm_public macroEmil Velikov2015-04-283-35/+35
| | | | | | | | | | | | | | | Some compilers (like the Oracle Studio), require that the function declaration must be annotated with the same visibility attribute as the definition. As annotating functions with drm_public is no longer required just remove the macro. Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Damien Lespiau <damien.lespiau@intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: Michel Dänzer <michel.daenzer@amd.com> Cc: Rob Clark <robdclark@gmail.com> Cc: Thierry Reding <treding@nvidia.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* drm: remove no longer needed VISIBILITY_CFLAGSEmil Velikov2015-04-281-1/+0
| | | | | | | | | | | | | With earlier commits we've annotated the private symbols, thus we no longer require the -fvisibility=hidden CFLAGS. Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Damien Lespiau <damien.lespiau@intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: Michel Dänzer <michel.daenzer@amd.com> Cc: Rob Clark <robdclark@gmail.com> Cc: Thierry Reding <treding@nvidia.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* drm: rename libdrm{,_macros}.hEmil Velikov2015-04-282-2/+2
| | | | | | Provide a more meaningful name, considering what it does. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* nouveau: add symbols testEmil Velikov2015-04-282-1/+54
| | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* nouveau: annotate the private symbolsEmil Velikov2015-04-283-17/+17
| | | | | | | | | They are less and easier to track than the public ones. The macro drm_public will be going away by the end of the series. Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* autotools: remove ${srcdir} from the includesEmil Velikov2015-03-201-1/+0
| | | | | | | | Already handled by the build system. v2: s/compiler/build system/ Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* android: remove LOCAL_COPY_HEADERS* variablesEmil Velikov2015-03-201-3/+0
| | | | | | | | | With earlier changes we've implicitly add the relevant directories to the includes list, via LOCAL_EXPORT_C_INCLUDES_DIRS. v2: Update the top Android.mk as well. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* android: remove ${srcdir} from the includesEmil Velikov2015-03-201-3/+0
| | | | | | | | Already handled by the build system. v2: s/compiler/build system/. Spotted by Chih-Wei. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* android: simplify LOCAL_C_INCLUDESEmil Velikov2015-03-201-3/+1
| | | | | | | | | Each of the libdrm_${hw} modules pull libdrm for linking as such: libdrm's LOCAL_EXPORT_C_INCLUDE_DIRS are added to the includes list. The former of which is already set to ${top} and ${top}/include/drm. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* android: correcly set LOCAL_EXPORT_C_INCLUDE_DIRSEmil Velikov2015-03-201-2/+1
| | | | | | | | | | - Don't add ${hw}/${hw}, but ${hw} to the includes path. The former does not exist. - Set the variable for libkms. Inspired by the work of from Chih-Wei from the Android-x86 project. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* nouveau: Do not add most bo's to the global bo list.Maarten Lankhorst2015-03-131-24/+22
| | | | | | | | | Only add wrapped bo's and bo's that have been exported through flink or dma-buf. This avoids a lock in the common case, and decreases traversal needed for importing a dma-buf or flink. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com> Tested-By: Emil Velikov <emil.l.velikov@gmail.com>
* nouveau: make nouveau importing global buffers completely thread-safe, with ↵Maarten Lankhorst2015-03-131-37/+32
| | | | | | | | | | | | | | | | | | tests While I've closed off most races in a previous patch, a small race still existed where importing then unreffing cound cause an invalid bo. Add a test for this case. Racing sequence fixed: - thread 1 releases bo, refcount drops to zero, blocks on acquiring nvdev->lock. - thread 2 increases refcount to 1. - thread 2 decreases refcount to zero, blocks on acquiring nvdev->lock. At this point the 2 threads will clean up the same bo. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com> Reviewed-By: Emil Velikov <emil.l.velikov@gmail.com>
* android: remove duplicate libdrm in LOCAL_SHARED_LIBRARIESChih-Wei Huang2015-02-231-3/+0
| | | | | | | | v2: Fold libpciaccess and libdrm into a single local_shared_libraries Acked-by: Jan Vesely <jan.vesely@rutgers.edu> Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* nouveau: fix unlock nouveau_bo_name_ref()Jerome Glisse2015-02-161-1/+1
| | | | Signed-off-by: Jérôme Glisse <jglisse@redhat.com>
* nouveau: Remove unused static function.Thomas Klausner2015-01-261-6/+0
| | | | | Signed-off-by: Thomas Klausner <wiz@NetBSD.org> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
* fix compile error on 32bit systemsRob Clark2014-09-281-0/+4
| | | | | | | | | | | | 4c2766b (drm_mmap/drm_unmap) brought this error for every .c file that was not #including config.h: In file included from private.h:4:0, from abi16.c:29: ../libdrm.h: In function 'drm_munmap': ../libdrm.h:81:4: error: size of unnamed array is negative Signed-off-by: Rob Clark <robdclark@gmail.com>
* nouveau: use drm_mmap/drm_munmap wrappersEmil Velikov2014-09-281-3/+3
| | | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
* automake: pick up all files for distribution.Emil Velikov2014-09-281-0/+2
| | | | | | | | Autotools is already smart enough to pick the *.pc.in files but it needs some help with the Android.mk ones. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
* nouveau: add Android build supportEmil Velikov2014-09-011-0/+30
| | | | | | v2 Rename the headers variable(s) to *_H_FILES. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* libdrm, freedreno, intel, nouveau, radeon: add Makefile.sourcesEmil Velikov2014-09-012-7/+13
| | | | | | | | | | | Will be used to consolidate the required sources lists as well as the install-able headers. This is turn will help us to avoid the duplication with the upcoming Android build support. v2: Rename the headers variable to *_H_FILES. v3: Rebase on top of symbol visibility patches. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>