aboutsummaryrefslogtreecommitdiffstats
path: root/libkms
Commit message (Collapse)AuthorAgeFilesLines
* Convert to Android.bpDan Willemsen2020-04-123-51/+53
| | | | | | | | | | | | 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
* libkms: convert to new symbols checkEric Engestrom2019-11-113-31/+15
| | | | Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
* Revert "Revert "libdrm: remove autotools support""Eric Engestrom2019-10-181-45/+0
| | | | | The external tooling issue has been fixed, so we can delete autotools again :)
* Revert "libdrm: remove autotools support"Marek Olšák2019-10-161-0/+45
| | | | This reverts commit f057dc91e93ae21e11ab48a26127d569972f3eae.
* libdrm: remove autotools supportEric Engestrom2019-10-141-45/+0
| | | | | Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
* *-symbols-check: let meson figure out how to execute the scriptsEric Engestrom2019-10-041-2/+2
| | | | Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
* *-symbols-check: use normal shell over bashEmil Velikov2019-10-041-1/+1
| | | | | | | | | | None of the tests are bash specific. Tested with bash, zsh, dash, mksh and ksh. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Tested-by: Niclas Zeising <zeising@daemonic.se> Reviewed-by: Niclas Zeising <zeising@daemonic.se> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
* fix various typosEric Engestrom2019-04-171-1/+1
| | | | | | | | | | | Saw a couple of typos fixes in the patch DragonFlyBSD carries [1], so I ran codespell (a spell checker for code) on the whole repo. [1] https://github.com/DragonFlyBSD/DPorts/blob/master/graphics/libdrm/files/patch-xf86drm.c Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
* libkms: update list of intel_drivers for Android buildTapani Pälli2019-03-111-1/+1
| | | | | | | Add new iris driver, remove deprecated ilo driver. Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
* *-symbols-check: error out when using unset variablesEmil Velikov2018-10-041-0/+2
| | | | | | | It will make bugs like the one fixed with previous patch dead obvious. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
* automake: set NM before running the testsEmil Velikov2018-10-041-0/+1
| | | | | | | | | Set/export the NM variable since it may not be set already. Fixes: 4f08bfe96da ("*-symbol-check: Don't hard-code nm executable") Cc: Heiko Becker <heirecka@exherbo.org> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
* autotools: make symbols hidden by defaultLucas De Marchi2018-09-191-0/+1
| | | | | | | | Now that symbols that should be exported are annotated accordingly, make all the rest hidden by default. Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Acked-by: Eric Engestrom <eric.engestrom@intel.com>
* meson: make symbols hidden by defaultLucas De Marchi2018-09-191-1/+1
| | | | | | | | | Now that symbols that should be exported are annotated accordingly, make all the rest hidden by default. Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
* libkms: annotate public functionsLucas De Marchi2018-09-191-8/+8
| | | | | | | | | | | | | | | | | | | | This was done with: nm --dynamic --defined-only build/libkms/libkms.so | \ grep kms_ | \ cut -d' ' -f3 > /tmp/a.txt while read sym; do read f func line _ <<<$(cscope -d -L -1 $sym) if [ ! -z "$f" ]; then sed -i "${line}s/^/drm_public /" $f fi done < /tmp/a.txt The idea here will be to switch the default visibility to hidden so we don't export symbols we shouldn't. Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Acked-by: Eric Engestrom <eric.engestrom@intel.com>
* meson,configure: include config.h automaticallyEric Engestrom2018-03-209-36/+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>
* *-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,configure: always define HAVE_{INTEL,VMWGFX,NOUVEAU,EXYNOS,VC4,RADEON}Eric Engestrom2018-01-291-5/+5
| | | | | | Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
* Add meson build systemDylan Baker2018-01-121-0/+74
| | | | | | | | | | 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>
* exynos: change the license to X11/MITInki Dae2017-11-071-4/+18
| | | | | | | | | | | | | | | | | | | | | | Change GPL license of Exynos related code to X11/MIT. I'd like to keep a consistent license across all Exynos code because License checker notices two more licenses exist in libdrm. For the license change I need to get your agree - all committers. So please give me Acked-by if you agree with me. Signed-off-by: Inki Dae <inki.dae@samsung.com> Acked-by: Hyungwon Hwang <human.hwang@samsung.com> Acked-by: SooChan Lim <sc1.lim@samsung.com> Acked-by: Sangjin LEE <lsj119@samsung.com> Acked-by: Boram Park <boram1288.park@samsung.com> Acked-by: Seung-Woo Kim <sw0312.kim@samsung.com> Acked-by: Joonyoung Shim <jy0922.shim@samsung.com> Acked-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Acked-by: Jan Vesely <jan.vesely@rutgers.edu>
* android: introduce Android.common.mk to reduce boilerplateEmil Velikov2017-01-271-3/+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>
* libkms/exynos: fix memory leak in error pathSeung-Woo Kim2016-12-141-1/+2
| | | | | | | | This patch fixes memory leak in error path of exynos_bo_create(). Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
* kms: remove commented out libudev codeEmil Velikov2016-12-052-98/+0
| | | | | Cc: Jakob Bornecrantz <wallbraker@gmail.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* 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>
* pull in sys/sysmacros.h when availableMike Frysinger2016-07-061-1/+4
| | | | | | | | | This header provides major/minor/makedev funcs under most Linux C libs. Pull it in to fix building with newer versions that drop the implicit include via sys/types.h. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94231 Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* 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>
* android: add virgl to be a valid driverChih-Wei Huang2016-02-251-0/+2
| | | | | | | | | To avoid the warning: external/libdrm/libkms/Android.mk:17: invalid GPU drivers: virgl Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* libkms: add libdrm to Requires.privateEmil Velikov2016-02-041-0/+1
| | | | | | | | Analogous to last two changes (amdgpu and radeon). Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jakob Bornecrantz <wallbraker@gmail.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
* libkms: use static const for good measureEmil Velikov2015-09-041-1/+1
| | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* remove usage of 'c_plusplus' preprocessor macroTapani Pälli2015-08-101-2/+2
| | | | | | | Use only __cplusplus which is supported by the C++ standard. Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
* include <sys/types.h> & <sys/mkdev.h> directly for major() and minor()Alan Coopersmith2015-07-131-0/+4
| | | | | | | | | | | | Linux seems to pick these up via another header, but Solaris needs them explicitly included, or we get undefined symbol errors for major & minor. v2: use headers documented in makedev(3C) man page instead of sysmacros.h Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> v3 [Emil Velikov]: include sys/mkdev.h only when available. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* drm: rename libdrm{,_macros}.hEmil Velikov2015-04-289-9/+9
| | | | | | Provide a more meaningful name, considering what it does. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* libkms: add symbols testEmil Velikov2015-04-282-1/+27
| | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* libkms: annotate private symbolsEmil Velikov2015-04-289-15/+23
| | | | | Cc: Jakob Bornecrantz <jakob@vmware.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* android: add the missing tag "optional" to libkmsEmil Velikov2015-03-201-0/+1
| | | | 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: simplify LOCAL_C_INCLUDESEmil Velikov2015-03-201-2/+0
| | | | | | | | | 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-0/+2
| | | | | | | | | | - 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>
* exynos: Don't use DRM_EXYNOS_GEM_{MAP_OFFSET/MMAP} ioctlsHyungwon Hwang2015-02-021-3/+4
| | | | | | | | | | | | | | | | | | | | The ioctl DRM_EXYNOS_GEM_MAP_OFFSET and DRM_EXYNOS_GEM_MMAP are removed from the linux kernel. This patch modifies libdrm and libkms to use drm generic ioctls instead of the removed ioctls. v2: The original patch was erroneous. In case the MODE_MAP_DUMB ioctl failed it would return the retvalue as a void-pointer. Users of libdrm would then happily use that ptr, eventually leading to a segfault. Change this to return NULL in that case and also restore the previous behaviour of logging to stderr. The other error was that 'bo->vaddr' was never filled with the mapped buffer address. Hence exynos_bo_map still returned NULL even if the buffer mapping succeeded. Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Signed-off-by: Rob Clark <robclark@freedesktop.org>
* libkms: use drm_mmap/drm_munmap wrappersEmil Velikov2014-09-285-18/+16
| | | | | | | ... for all by exynos. 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-1/+1
| | | | | | | | 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>
* libkms: add Android buildEmil Velikov2014-09-281-0/+53
| | | | | | Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
* libkms: move sources lists to makefile.sourcesEmil Velikov2014-09-282-11/+32
| | | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
* libkms: build the intel backend only when neededEmil Velikov2014-09-282-6/+15
| | | | | Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
* libkms: remove explicit define _FILE_OFFSET_BITS 64Emil Velikov2014-09-016-6/+0
| | | | | | | configure.ac has AC_SYS_LARGEFILE which provides the define and/or approapriate magic when required. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* all: include config.h only when available and use its definesEmil Velikov2014-09-018-6/+22
| | | | | | ... rather than explicitly redefining HAVE_STDINT_H and _GNU_SOURCE. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* tests/kmstest: support exynosHyungwon Hwang2014-01-124-0/+218
| | | | | | | | In this patch, to support exynos for KMS, Exynos KMS driver is newly added. Also, Exynos is added to the list of kmstest supported modules. Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com> Signed-off-by: Rob Clark <robclark@freedesktop.org>
* kms: Return a negative error code in kms_bo_create()Laurent Pinchart2013-04-181-1/+1
| | | | | | | | | | The function returns returns 0 on success or a negative value in case of an error, except when given invalid attributes in which case it returns the positive EINVAL value. Replace that with -EINVAL to allow the caller to detect errors with a < 0 check. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jakob Bornecrantz <wallbraker@gmail.com>
* kms: Make libkms.h usable in C++Laurent Pinchart2013-04-181-0/+8
| | | | | | | Wrap the header in extern "C" { ... };. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jakob Bornecrantz <wallbraker@gmail.com>
* libkms: return -EINVAL on fstat errorMaxime Villard2013-01-021-1/+1
| | | | | | | On error fstat return -1, instead return -EINVAL to caller Signed-off-by: Maxime Villard <rustyBSD@gmx.fr> Signed-off-by: Jerome Glisse <jglisse@redhat.com>