path: root/omap
Commit message (Collapse)AuthorAgeFilesLines
* omap: Add DRM_RDWR flag to dmabuf exportHemant Hariyani2018-06-051-1/+1
| | | | | | | | | | | | | Allows mmap on dmabuf fd with MAP_SHARED and PROT_WRITE. This fixes boot failures caused due to mmap() returning error Signed-off-by: Hemant Hariyani <hemanthariyani@ti.com> [picked and updated commitmsg from http://git.ti.com/cgit/cgit.cgi/android/external-libdrm.git/] Bug: 74437007 Change-Id: I8ed3ed3ecb8a5005b3aa69a852e3c0f29ef9f43d Signed-off-by: Praneeth Bajjuri <praneeth@ti.com> Signed-off-by: Alistair Strachan <astrachan@google.com>
* libdrm: Switch to Android.bp for omap driverJohn Stultz2018-05-013-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: 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>