diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2018-11-01 08:23:22 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2018-11-01 08:23:22 +0000 |
commit | 151b82d100e6380d41996fb56cafcab4728d5149 (patch) | |
tree | 19af1b08d3b8f2d16fb28d5350bea0f0a7435027 /lib/libdrm/omap | |
parent | e33f6733f6eb02ee1097e1f4ef19735adea243a1 (diff) |
Import libdrm 2.4.96
Diffstat (limited to 'lib/libdrm/omap')
-rw-r--r-- | lib/libdrm/omap/Makefile.am | 2 | ||||
-rw-r--r-- | lib/libdrm/omap/meson.build | 2 | ||||
-rwxr-xr-x | lib/libdrm/omap/omap-symbol-check | 2 | ||||
-rw-r--r-- | lib/libdrm/omap/omap_drm.c | 36 |
4 files changed, 23 insertions, 19 deletions
diff --git a/lib/libdrm/omap/Makefile.am b/lib/libdrm/omap/Makefile.am index 599bb9ded..38a1007b1 100644 --- a/lib/libdrm/omap/Makefile.am +++ b/lib/libdrm/omap/Makefile.am @@ -1,5 +1,6 @@ AM_CFLAGS = \ $(WARN_CFLAGS) \ + -fvisibility=hidden \ -I$(top_srcdir) \ $(PTHREADSTUBS_CFLAGS) \ -I$(top_srcdir)/include/drm @@ -20,5 +21,6 @@ libdrm_omapinclude_HEADERS = omap_drmif.h pkgconfigdir = @pkgconfigdir@ pkgconfig_DATA = libdrm_omap.pc +AM_TESTS_ENVIRONMENT = NM='$(NM)' TESTS = omap-symbol-check EXTRA_DIST = $(TESTS) diff --git a/lib/libdrm/omap/meson.build b/lib/libdrm/omap/meson.build index e57b8f5da..54698c6a8 100644 --- a/lib/libdrm/omap/meson.build +++ b/lib/libdrm/omap/meson.build @@ -22,7 +22,7 @@ libdrm_omap = shared_library( 'drm_omap', [files('omap_drm.c'), config_file], include_directories : [inc_root, inc_drm], - c_args : warn_c_args, + c_args : libdrm_c_args, link_with : libdrm, dependencies : [dep_pthread_stubs, dep_atomic_ops], version : '1.0.0', diff --git a/lib/libdrm/omap/omap-symbol-check b/lib/libdrm/omap/omap-symbol-check index 0fb4a0f26..16da3c406 100755 --- a/lib/libdrm/omap/omap-symbol-check +++ b/lib/libdrm/omap/omap-symbol-check @@ -1,5 +1,7 @@ #!/bin/bash +set -u + # The following symbols (past the first five) are taken from the public headers. # A list of the latter should be available Makefile.am/libdrm_omap*HEADERS diff --git a/lib/libdrm/omap/omap_drm.c b/lib/libdrm/omap/omap_drm.c index 417d522c3..3aed4e0a2 100644 --- a/lib/libdrm/omap/omap_drm.c +++ b/lib/libdrm/omap/omap_drm.c @@ -88,7 +88,7 @@ static struct omap_device * omap_device_new_impl(int fd) return dev; } -struct omap_device * omap_device_new(int fd) +drm_public struct omap_device * omap_device_new(int fd) { struct omap_device *dev = NULL; @@ -111,13 +111,13 @@ struct omap_device * omap_device_new(int fd) return dev; } -struct omap_device * omap_device_ref(struct omap_device *dev) +drm_public struct omap_device * omap_device_ref(struct omap_device *dev) { atomic_inc(&dev->refcnt); return dev; } -void omap_device_del(struct omap_device *dev) +drm_public void omap_device_del(struct omap_device *dev) { if (!atomic_dec_and_test(&dev->refcnt)) return; @@ -128,7 +128,7 @@ void omap_device_del(struct omap_device *dev) free(dev); } -int +drm_public int omap_get_param(struct omap_device *dev, uint64_t param, uint64_t *value) { struct drm_omap_param req = { @@ -146,7 +146,7 @@ omap_get_param(struct omap_device *dev, uint64_t param, uint64_t *value) return 0; } -int +drm_public int omap_set_param(struct omap_device *dev, uint64_t param, uint64_t value) { struct drm_omap_param req = { @@ -226,7 +226,7 @@ fail: /* allocate a new (un-tiled) buffer object */ -struct omap_bo * +drm_public struct omap_bo * omap_bo_new(struct omap_device *dev, uint32_t size, uint32_t flags) { union omap_gem_size gsize = { @@ -239,7 +239,7 @@ omap_bo_new(struct omap_device *dev, uint32_t size, uint32_t flags) } /* allocate a new buffer object */ -struct omap_bo * +drm_public struct omap_bo * omap_bo_new_tiled(struct omap_device *dev, uint32_t width, uint32_t height, uint32_t flags) { @@ -255,7 +255,7 @@ omap_bo_new_tiled(struct omap_device *dev, uint32_t width, return omap_bo_new_impl(dev, gsize, flags); } -struct omap_bo *omap_bo_ref(struct omap_bo *bo) +drm_public struct omap_bo *omap_bo_ref(struct omap_bo *bo) { atomic_inc(&bo->refcnt); return bo; @@ -281,7 +281,7 @@ static int get_buffer_info(struct omap_bo *bo) } /* import a buffer object from DRI2 name */ -struct omap_bo * +drm_public struct omap_bo * omap_bo_from_name(struct omap_device *dev, uint32_t name) { struct omap_bo *bo = NULL; @@ -315,7 +315,7 @@ fail: * fd so caller should close() the fd when it is otherwise done * with it (even if it is still using the 'struct omap_bo *') */ -struct omap_bo * +drm_public struct omap_bo * omap_bo_from_dmabuf(struct omap_device *dev, int fd) { struct omap_bo *bo = NULL; @@ -347,7 +347,7 @@ fail: } /* destroy a buffer object */ -void omap_bo_del(struct omap_bo *bo) +drm_public void omap_bo_del(struct omap_bo *bo) { if (!bo) { return; @@ -380,7 +380,7 @@ void omap_bo_del(struct omap_bo *bo) } /* get the global flink/DRI2 buffer name */ -int omap_bo_get_name(struct omap_bo *bo, uint32_t *name) +drm_public int omap_bo_get_name(struct omap_bo *bo, uint32_t *name) { if (!bo->name) { struct drm_gem_flink req = { @@ -401,7 +401,7 @@ int omap_bo_get_name(struct omap_bo *bo, uint32_t *name) return 0; } -uint32_t omap_bo_handle(struct omap_bo *bo) +drm_public uint32_t omap_bo_handle(struct omap_bo *bo) { return bo->handle; } @@ -409,7 +409,7 @@ uint32_t omap_bo_handle(struct omap_bo *bo) /* caller owns the dmabuf fd that is returned and is responsible * to close() it when done */ -int omap_bo_dmabuf(struct omap_bo *bo) +drm_public int omap_bo_dmabuf(struct omap_bo *bo) { if (bo->fd < 0) { struct drm_prime_handle req = { @@ -428,7 +428,7 @@ int omap_bo_dmabuf(struct omap_bo *bo) return dup(bo->fd); } -uint32_t omap_bo_size(struct omap_bo *bo) +drm_public uint32_t omap_bo_size(struct omap_bo *bo) { if (!bo->size) { get_buffer_info(bo); @@ -436,7 +436,7 @@ uint32_t omap_bo_size(struct omap_bo *bo) return bo->size; } -void *omap_bo_map(struct omap_bo *bo) +drm_public void *omap_bo_map(struct omap_bo *bo) { if (!bo->map) { if (!bo->offset) { @@ -452,7 +452,7 @@ void *omap_bo_map(struct omap_bo *bo) return bo->map; } -int omap_bo_cpu_prep(struct omap_bo *bo, enum omap_gem_op op) +drm_public int omap_bo_cpu_prep(struct omap_bo *bo, enum omap_gem_op op) { struct drm_omap_gem_cpu_prep req = { .handle = bo->handle, @@ -462,7 +462,7 @@ int omap_bo_cpu_prep(struct omap_bo *bo, enum omap_gem_op op) DRM_OMAP_GEM_CPU_PREP, &req, sizeof(req)); } -int omap_bo_cpu_fini(struct omap_bo *bo, enum omap_gem_op op) +drm_public int omap_bo_cpu_fini(struct omap_bo *bo, enum omap_gem_op op) { struct drm_omap_gem_cpu_fini req = { .handle = bo->handle, |