aboutsummaryrefslogtreecommitdiffstats
path: root/omap
Commit message (Collapse)AuthorAgeFilesLines
* libdrm: Switch to Android.bp for omap driverJohn Stultz2020-04-123-13/+20
| | | | | | | | | The omap driver got missed in forward porting the change to the Android.bp make files, so fix that. Change-Id: I94dee0852f418090f861a0930c862512083a46ee Signed-off-by: John Stultz <john.stultz@linaro.org>
* omap: convert to new symbols checkEric Engestrom2019-11-113-41/+25
| | | | Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
* Revert "Revert "libdrm: remove autotools support""Eric Engestrom2019-10-181-26/+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/+26
| | | | This reverts commit f057dc91e93ae21e11ab48a26127d569972f3eae.
* libdrm: remove autotools supportEric Engestrom2019-10-141-26/+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>
* libdrm: omap: Add DRM_RDWR flag to dmabuf exportHemant Hariyani2019-04-251-1/+1
| | | | | | | | | | | | | | | | | | | Allows mmap on dmabuf fd with MAP_SHARED and PROT_WRITE. This fixes boot failures with Android (likely w/ closed source user-space drivers) that were caused due to mmap() returning error. Cc: Sean Paul <seanpaul@chromium.org> Cc: Alistair Strachan <astrachan@google.com> Cc: Marissa Wall <marissaw@google.com> Acked-by: Emil Velikov <emil.velikov@collabora.com> Signed-off-by: Hemant Hariyani <hemanthariyani@ti.com> [picked and updated commitmsg from http://git.ti.com/cgit/cgit.cgi/android/external-libdrm.git/] Signed-off-by: Praneeth Bajjuri <praneeth@ti.com> Signed-off-by: Alistair Strachan <astrachan@google.com> [jstultz: Tweaked commit message] Signed-off-by: John Stultz <john.stultz@linaro.org>
* *-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>
* omap: fix symbol annotationsEric Engestrom2018-09-201-12/+12
| | | | | | | Fixes: f3f7266d94e0354bfd97 "omap: annotate public functions" Cc: Lucas De Marchi <lucas.demarchi@intel.com> Signed-off-by: Eric Engestrom <eric.engestrom@intel.com> Reviewed-by: Lucas De Marchi <lucas.demarchi@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>
* omap: annotate public functionsLucas De Marchi2018-09-191-18/+18
| | | | | | | | | | | | | | | | 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 In which /tmp/a.txt contains the public symbols from omap-symbol-check. 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>
* omap: add Android build supportGowtham Tammana2018-03-221-0/+13
| | | | | | | Add Android.mk file to build libdrm_omap library. Signed-off-by: Gowtham Tammana <g-tammana@ti.com> Signed-off-by: Andrew F. Davis <afd@ti.com>
* meson,configure: include config.h automaticallyEric Engestrom2018-03-201-4/+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>
* Add meson build systemDylan Baker2018-01-121-0/+53
| | | | | | | | | | 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>
* omap: Initialize DMA BUF file descriptor to -1Thierry Reding2015-08-261-0/+1
| | | | | | | | | | | | | | | | | | | Commit c86dabfc9f04 ("omap: zero is a valid fd number, treat it as such") corrected checks for valid file descriptors, but the OMAP buffer object code initializes the DMA-BUF file descriptor to 0 (as a result of calloc()'ing the structure). Obviously this isn't going to work because subsequent code will try to use file descriptor 0 (most likely stdin at that point) as a DMA-BUF. It may also try and close stdin when a buffer object is destroyed. Fix this by initializing the DMA-BUF file descriptor to -1, properly marking it as an invalid file descriptor. Fixes: c86dabfc9f04 ("omap: zero is a valid fd number, treat it as such") Reported-by: Robert Nelson <robertcnelson@gmail.com> Tested-by: Robert Nelson <robertcnelson@gmail.com> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
* omap: zero is a valid fd number, treat it as suchEmil Velikov2015-07-161-2/+2
| | | | | | | | | Equivalent to the previous patch. Cc: Rob Clark <robdclark@gmail.com> Suggested-by: Thierry Reding <thierry.reding@gmail.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Thierry Reding <treding@nvidia.com>
* drm: remove drm_public macroEmil Velikov2015-04-281-18/+18
| | | | | | | | | | | | | | | 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-281-1/+1
| | | | | | Provide a more meaningful name, considering what it does. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
* omap: add symbols testEmil Velikov2015-04-282-0/+38
| | | | 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>
* omap: Use symbol visibility.Maarten Lankhorst2014-08-142-20/+27
| | | | | | No changes to exported symbols. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
* omap: release lock also on error pathsVincent Penquerc'h2012-10-091-0/+2
| | | | Signed-off-by: Rob Clark <rob@ti.com>
* omap: include omap_drm.h independentlyVíctor Manuel Jáquez Leal2012-08-231-1/+2
| | | | | | | | | | | | | omap_drm.h uses data type defined in stdint.h, but that header was not included. omap_drm.h includes drm.h as a local file when it is part of the compiler c flags. This two issues are fixed. New code can include omap_drm.h alone. Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> Signed-off-by: Rob Clark <rob@ti.com>
* omap: add refcnting and handle trackingRob Clark2012-07-132-26/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There can be scenarios, especially when re-importing an existing buffer, where you end up with multiple 'struct omap_bo's wrapping a single GEM object handle. Which causes badness when the first of the evil-clones is omap_bo_del()'d. To do this, introduce reference counting and a hashtable to track the handles per fd. First, to avoid bo's slipping through the crack if multiple 'struct omap_device's are created for one drm fd, a hashtable mapping drm fd to omap_device, and the omap_device itself is reference counted. Per omap_device, we keep a handle_table mapping GEM handle to omap_bo. When buffers are imported from flink name or dmabuf fd, the handle table is consulted, and if an omap_bo already exists, it's refcnt is incremented and it is returned. For good measure, to avoid the handle_table being deleted before the omap_bo is freed, the omap_bo holds a reference to the omap_device. TODO: check the overhead of the hashtable. If too much we could maybe get away with only tracking exported and imported bo's in the table. TODO: all the import/export flink/dmabuf operations are generic DRM ioctls. Really all this functionality could be handled by a generic drm_bo and drm_device "base class" that could be extended by omap, exynos, etc. That would also allow more common userspace code by avoiding artificial libdrm_omap dependencies. Signed-off-by: Rob Clark <rob@ti.com>
* omap: add API to import bo's from dmabuf fd'sRob Clark2012-07-132-0/+33
| | | | Signed-off-by: Rob Clark <rob@ti.com>
* omap: clarify dmabuf file descriptor ownershipRob Clark2012-07-131-1/+9
| | | | Signed-off-by: Rob Clark <rob@ti.com>
* omap: add dmabuf supportRob Clark2012-04-112-0/+22
| | | | Signed-off-by: Rob Clark <rob@ti.com>
* omap: fix compiler warningVíctor Manuel Jáquez Leal2012-04-031-1/+1
| | | | | | | | | | | | | When compiling with linaro toolchain version 4.6.2 got this warning. CC omap_drm.lo omap_drm.c: In function 'omap_bo_new_impl': omap_drm.c:139:6: warning: 'bo' may be used uninitialized in this function [-Wuninitialized] This patch initialize bo to NULL avoiding the warning. Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com> Signed-off-by: Rob Clark <rob@ti.com>
* omap: fix license headerRob Clark2012-04-031-12/+21
| | | | | | | | | In syncing with the corresponding kernel header, the wrong license header was inadvertantly copied over. The intention was for the userspace headers to have a MIT license following the convention of the rest of libdrm, xorg, etc. Signed-off-by: Rob Clark <rob@ti.com>
* omap: add omapdrm supportRob Clark2012-03-285-0/+529
This adds libdrm_omap helper layer (as used by xf86-video-omap, omapdrmtest, etc). Signed-off-by: Rob Clark <rob@ti.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> [danvet: pushed for Rob, he doesn't yet have commit access.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>