All of lore.kernel.org
 help / color / mirror / Atom feed
* [LIBDRM PATCH 1/3] omap: Use symbol visibility.
@ 2014-08-04  9:22 Maarten Lankhorst
  2014-08-04  9:23 ` [LIBDRM PATCH 2/3] freedreno: " Maarten Lankhorst
  2014-08-04  9:23 ` [LIBDRM PATCH 3/3] exynos: " Maarten Lankhorst
  0 siblings, 2 replies; 3+ messages in thread
From: Maarten Lankhorst @ 2014-08-04  9:22 UTC (permalink / raw)
  To: dri-devel@lists.freedesktop.org

No changes to exported symbols.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
---
 omap/Makefile.am |  1 +
 omap/omap_drm.c  | 46 ++++++++++++++++++++++++++--------------------
 2 files changed, 27 insertions(+), 20 deletions(-)

diff --git a/omap/Makefile.am b/omap/Makefile.am
index c77520b..0778bdd 100644
--- a/omap/Makefile.am
+++ b/omap/Makefile.am
@@ -1,5 +1,6 @@
 AM_CFLAGS = \
 	$(WARN_CFLAGS) \
+	$(VISIBILITY_CFLAGS) \
 	-I$(top_srcdir) \
 	-I$(top_srcdir)/omap \
 	$(PTHREADSTUBS_CFLAGS) \
diff --git a/omap/omap_drm.c b/omap/omap_drm.c
index 89f1491..8b4ec46 100644
--- a/omap/omap_drm.c
+++ b/omap/omap_drm.c
@@ -39,6 +39,7 @@
 #include <unistd.h>
 #include <pthread.h>
 
+#include <libdrm.h>
 #include <xf86drm.h>
 #include <xf86atomic.h>
 
@@ -91,7 +92,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;
 
@@ -114,13 +115,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;
@@ -131,7 +132,8 @@ void omap_device_del(struct omap_device *dev)
 	free(dev);
 }
 
-int omap_get_param(struct omap_device *dev, uint64_t param, uint64_t *value)
+drm_public int
+omap_get_param(struct omap_device *dev, uint64_t param, uint64_t *value)
 {
 	struct drm_omap_param req = {
 			.param = param,
@@ -148,7 +150,8 @@ int omap_get_param(struct omap_device *dev, uint64_t param, uint64_t *value)
 	return 0;
 }
 
-int omap_set_param(struct omap_device *dev, uint64_t param, uint64_t value)
+drm_public int
+omap_set_param(struct omap_device *dev, uint64_t param, uint64_t value)
 {
 	struct drm_omap_param req = {
 			.param = param,
@@ -226,8 +229,8 @@ fail:
 
 
 /* allocate a new (un-tiled) buffer object */
-struct omap_bo * omap_bo_new(struct omap_device *dev,
-		uint32_t size, uint32_t flags)
+drm_public struct omap_bo *
+omap_bo_new(struct omap_device *dev, uint32_t size, uint32_t flags)
 {
 	union omap_gem_size gsize = {
 			.bytes = size,
@@ -239,8 +242,9 @@ struct omap_bo * omap_bo_new(struct omap_device *dev,
 }
 
 /* allocate a new buffer object */
-struct omap_bo * omap_bo_new_tiled(struct omap_device *dev,
-		uint32_t width, uint32_t height, uint32_t flags)
+drm_public struct omap_bo *
+omap_bo_new_tiled(struct omap_device *dev, uint32_t width,
+		  uint32_t height, uint32_t flags)
 {
 	union omap_gem_size gsize = {
 			.tiled = {
@@ -254,7 +258,7 @@ struct omap_bo * omap_bo_new_tiled(struct omap_device *dev,
 	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;
@@ -280,7 +284,8 @@ static int get_buffer_info(struct omap_bo *bo)
 }
 
 /* import a buffer object from DRI2 name */
-struct omap_bo * omap_bo_from_name(struct omap_device *dev, uint32_t name)
+drm_public struct omap_bo *
+omap_bo_from_name(struct omap_device *dev, uint32_t name)
 {
 	struct omap_bo *bo = NULL;
 	struct drm_gem_open req = {
@@ -313,7 +318,8 @@ 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 * omap_bo_from_dmabuf(struct omap_device *dev, int fd)
+drm_public struct omap_bo *
+omap_bo_from_dmabuf(struct omap_device *dev, int fd)
 {
 	struct omap_bo *bo = NULL;
 	struct drm_prime_handle req = {
@@ -344,7 +350,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;
@@ -377,7 +383,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 = {
@@ -398,7 +404,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;
 }
@@ -406,7 +412,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) {
 		struct drm_prime_handle req = {
@@ -425,7 +431,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);
@@ -433,7 +439,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) {
@@ -449,7 +455,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,
@@ -459,7 +465,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,
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [LIBDRM PATCH 2/3] freedreno: Use symbol visibility.
  2014-08-04  9:22 [LIBDRM PATCH 1/3] omap: Use symbol visibility Maarten Lankhorst
@ 2014-08-04  9:23 ` Maarten Lankhorst
  2014-08-04  9:23 ` [LIBDRM PATCH 3/3] exynos: " Maarten Lankhorst
  1 sibling, 0 replies; 3+ messages in thread
From: Maarten Lankhorst @ 2014-08-04  9:23 UTC (permalink / raw)
  To: dri-devel@lists.freedesktop.org

Hiding fd_device_del_locked, and fd_cleanup_bo_cache.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
---
 freedreno/Makefile.am            |  1 +
 freedreno/freedreno_bo.c         | 26 +++++++++++++-------------
 freedreno/freedreno_device.c     |  8 ++++----
 freedreno/freedreno_pipe.c       | 11 ++++++-----
 freedreno/freedreno_priv.h       |  5 +++++
 freedreno/freedreno_ringbuffer.c | 38 ++++++++++++++++++++------------------
 freedreno/kgsl/kgsl_bo.c         |  4 ++--
 7 files changed, 51 insertions(+), 42 deletions(-)

diff --git a/freedreno/Makefile.am b/freedreno/Makefile.am
index 7903e5b..49471e9 100644
--- a/freedreno/Makefile.am
+++ b/freedreno/Makefile.am
@@ -2,6 +2,7 @@ AUTOMAKE_OPTIONS=subdir-objects
 
 AM_CFLAGS = \
 	$(WARN_CFLAGS) \
+	$(VISIBILITY_CFLAGS) \
 	-I$(top_srcdir) \
 	-I$(top_srcdir)/freedreno \
 	$(PTHREADSTUBS_CFLAGS) \
diff --git a/freedreno/freedreno_bo.c b/freedreno/freedreno_bo.c
index 8cea4de..3a2e464 100644
--- a/freedreno/freedreno_bo.c
+++ b/freedreno/freedreno_bo.c
@@ -163,8 +163,8 @@ static struct fd_bo *find_in_bucket(struct fd_device *dev,
 }
 
 
-struct fd_bo * fd_bo_new(struct fd_device *dev,
-		uint32_t size, uint32_t flags)
+drm_public struct fd_bo *
+fd_bo_new(struct fd_device *dev, uint32_t size, uint32_t flags)
 {
 	struct fd_bo *bo = NULL;
 	struct fd_bo_bucket *bucket;
@@ -197,8 +197,8 @@ struct fd_bo * fd_bo_new(struct fd_device *dev,
 	return bo;
 }
 
-struct fd_bo *fd_bo_from_handle(struct fd_device *dev,
-		uint32_t handle, uint32_t size)
+drm_public struct fd_bo *
+fd_bo_from_handle(struct fd_device *dev, uint32_t handle, uint32_t size)
 {
 	struct fd_bo *bo = NULL;
 
@@ -209,7 +209,7 @@ struct fd_bo *fd_bo_from_handle(struct fd_device *dev,
 	return bo;
 }
 
-struct fd_bo * fd_bo_from_name(struct fd_device *dev, uint32_t name)
+drm_public struct fd_bo * fd_bo_from_name(struct fd_device *dev, uint32_t name)
 {
 	struct drm_gem_open req = {
 			.name = name,
@@ -242,13 +242,13 @@ out_unlock:
 	return bo;
 }
 
-struct fd_bo * fd_bo_ref(struct fd_bo *bo)
+drm_public struct fd_bo * fd_bo_ref(struct fd_bo *bo)
 {
 	atomic_inc(&bo->refcnt);
 	return bo;
 }
 
-void fd_bo_del(struct fd_bo *bo)
+drm_public void fd_bo_del(struct fd_bo *bo)
 {
 	struct fd_device *dev = bo->dev;
 
@@ -307,7 +307,7 @@ static void bo_del(struct fd_bo *bo)
 	bo->funcs->destroy(bo);
 }
 
-int fd_bo_get_name(struct fd_bo *bo, uint32_t *name)
+drm_public int fd_bo_get_name(struct fd_bo *bo, uint32_t *name)
 {
 	if (!bo->name) {
 		struct drm_gem_flink req = {
@@ -330,17 +330,17 @@ int fd_bo_get_name(struct fd_bo *bo, uint32_t *name)
 	return 0;
 }
 
-uint32_t fd_bo_handle(struct fd_bo *bo)
+drm_public uint32_t fd_bo_handle(struct fd_bo *bo)
 {
 	return bo->handle;
 }
 
-uint32_t fd_bo_size(struct fd_bo *bo)
+drm_public uint32_t fd_bo_size(struct fd_bo *bo)
 {
 	return bo->size;
 }
 
-void * fd_bo_map(struct fd_bo *bo)
+drm_public void * fd_bo_map(struct fd_bo *bo)
 {
 	if (!bo->map) {
 		uint64_t offset;
@@ -362,12 +362,12 @@ void * fd_bo_map(struct fd_bo *bo)
 }
 
 /* a bit odd to take the pipe as an arg, but it's a, umm, quirk of kgsl.. */
-int fd_bo_cpu_prep(struct fd_bo *bo, struct fd_pipe *pipe, uint32_t op)
+drm_public int fd_bo_cpu_prep(struct fd_bo *bo, struct fd_pipe *pipe, uint32_t op)
 {
 	return bo->funcs->cpu_prep(bo, pipe, op);
 }
 
-void fd_bo_cpu_fini(struct fd_bo *bo)
+drm_public void fd_bo_cpu_fini(struct fd_bo *bo)
 {
 	bo->funcs->cpu_fini(bo);
 }
diff --git a/freedreno/freedreno_device.c b/freedreno/freedreno_device.c
index c34963c..2d3aa33 100644
--- a/freedreno/freedreno_device.c
+++ b/freedreno/freedreno_device.c
@@ -76,7 +76,7 @@ init_cache_buckets(struct fd_device *dev)
 	}
 }
 
-struct fd_device * fd_device_new(int fd)
+drm_public struct fd_device * fd_device_new(int fd)
 {
 	struct fd_device *dev;
 	drmVersionPtr version;
@@ -115,7 +115,7 @@ struct fd_device * fd_device_new(int fd)
 /* like fd_device_new() but creates it's own private dup() of the fd
  * which is close()d when the device is finalized.
  */
-struct fd_device * fd_device_new_dup(int fd)
+drm_public struct fd_device * fd_device_new_dup(int fd)
 {
 	struct fd_device *dev = fd_device_new(dup(fd));
 	if (dev)
@@ -123,7 +123,7 @@ struct fd_device * fd_device_new_dup(int fd)
 	return dev;
 }
 
-struct fd_device * fd_device_ref(struct fd_device *dev)
+drm_public struct fd_device * fd_device_ref(struct fd_device *dev)
 {
 	atomic_inc(&dev->refcnt);
 	return dev;
@@ -146,7 +146,7 @@ void fd_device_del_locked(struct fd_device *dev)
 	fd_device_del_impl(dev);
 }
 
-void fd_device_del(struct fd_device *dev)
+drm_public void fd_device_del(struct fd_device *dev)
 {
 	if (!atomic_dec_and_test(&dev->refcnt))
 		return;
diff --git a/freedreno/freedreno_pipe.c b/freedreno/freedreno_pipe.c
index 805bf00..f55aaa4 100644
--- a/freedreno/freedreno_pipe.c
+++ b/freedreno/freedreno_pipe.c
@@ -29,7 +29,8 @@
 #include "freedreno_drmif.h"
 #include "freedreno_priv.h"
 
-struct fd_pipe * fd_pipe_new(struct fd_device *dev, enum fd_pipe_id id)
+drm_public struct fd_pipe *
+fd_pipe_new(struct fd_device *dev, enum fd_pipe_id id)
 {
 	struct fd_pipe *pipe = NULL;
 
@@ -54,18 +55,18 @@ fail:
 	return NULL;
 }
 
-void fd_pipe_del(struct fd_pipe *pipe)
+drm_public void fd_pipe_del(struct fd_pipe *pipe)
 {
 	pipe->funcs->destroy(pipe);
 }
 
-int fd_pipe_get_param(struct fd_pipe *pipe, enum fd_param_id param,
-		uint64_t *value)
+drm_public int fd_pipe_get_param(struct fd_pipe *pipe,
+				 enum fd_param_id param, uint64_t *value)
 {
 	return pipe->funcs->get_param(pipe, param, value);
 }
 
-int fd_pipe_wait(struct fd_pipe *pipe, uint32_t timestamp)
+drm_public int fd_pipe_wait(struct fd_pipe *pipe, uint32_t timestamp)
 {
 	return pipe->funcs->wait(pipe, timestamp);
 }
diff --git a/freedreno/freedreno_priv.h b/freedreno/freedreno_priv.h
index 7438485..6bd1dec 100644
--- a/freedreno/freedreno_priv.h
+++ b/freedreno/freedreno_priv.h
@@ -29,6 +29,10 @@
 #ifndef FREEDRENO_PRIV_H_
 #define FREEDRENO_PRIV_H_
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #include <stdlib.h>
 #include <errno.h>
 #include <string.h>
@@ -41,6 +45,7 @@
 #include <stdio.h>
 #include <assert.h>
 
+#include "libdrm.h"
 #include "xf86drm.h"
 #include "xf86atomic.h"
 
diff --git a/freedreno/freedreno_ringbuffer.c b/freedreno/freedreno_ringbuffer.c
index b9849c5..def869f 100644
--- a/freedreno/freedreno_ringbuffer.c
+++ b/freedreno/freedreno_ringbuffer.c
@@ -32,8 +32,8 @@
 #include "freedreno_priv.h"
 #include "freedreno_ringbuffer.h"
 
-struct fd_ringbuffer * fd_ringbuffer_new(struct fd_pipe *pipe,
-		uint32_t size)
+drm_public struct fd_ringbuffer *
+fd_ringbuffer_new(struct fd_pipe *pipe, uint32_t size)
 {
 	struct fd_ringbuffer *ring;
 
@@ -51,7 +51,7 @@ struct fd_ringbuffer * fd_ringbuffer_new(struct fd_pipe *pipe,
 	return ring;
 }
 
-void fd_ringbuffer_del(struct fd_ringbuffer *ring)
+drm_public void fd_ringbuffer_del(struct fd_ringbuffer *ring)
 {
 	ring->funcs->destroy(ring);
 }
@@ -60,13 +60,13 @@ void fd_ringbuffer_del(struct fd_ringbuffer *ring)
  * the IB source) as it's parent before emitting reloc's, to ensure
  * the bookkeeping works out properly.
  */
-void fd_ringbuffer_set_parent(struct fd_ringbuffer *ring,
-		struct fd_ringbuffer *parent)
+drm_public void fd_ringbuffer_set_parent(struct fd_ringbuffer *ring,
+					 struct fd_ringbuffer *parent)
 {
 	ring->parent = parent;
 }
 
-void fd_ringbuffer_reset(struct fd_ringbuffer *ring)
+drm_public void fd_ringbuffer_reset(struct fd_ringbuffer *ring)
 {
 	uint32_t *start = ring->start;
 	if (ring->pipe->id == FD_PIPE_2D)
@@ -77,30 +77,32 @@ void fd_ringbuffer_reset(struct fd_ringbuffer *ring)
 }
 
 /* maybe get rid of this and use fd_ringmarker_flush() from DDX too? */
-int fd_ringbuffer_flush(struct fd_ringbuffer *ring)
+drm_public int fd_ringbuffer_flush(struct fd_ringbuffer *ring)
 {
 	return ring->funcs->flush(ring, ring->last_start);
 }
 
-uint32_t fd_ringbuffer_timestamp(struct fd_ringbuffer *ring)
+drm_public uint32_t fd_ringbuffer_timestamp(struct fd_ringbuffer *ring)
 {
 	return ring->last_timestamp;
 }
 
-void fd_ringbuffer_reloc(struct fd_ringbuffer *ring,
-		const struct fd_reloc *reloc)
+drm_public void fd_ringbuffer_reloc(struct fd_ringbuffer *ring,
+				    const struct fd_reloc *reloc)
 {
 	ring->funcs->emit_reloc(ring, reloc);
 }
 
-void fd_ringbuffer_emit_reloc_ring(struct fd_ringbuffer *ring,
-		struct fd_ringmarker *target, struct fd_ringmarker *end)
+drm_public void
+fd_ringbuffer_emit_reloc_ring(struct fd_ringbuffer *ring,
+			      struct fd_ringmarker *target,
+			      struct fd_ringmarker *end)
 {
 	assert(target->ring == end->ring);
 	ring->funcs->emit_reloc_ring(ring, target, end);
 }
 
-struct fd_ringmarker * fd_ringmarker_new(struct fd_ringbuffer *ring)
+drm_public struct fd_ringmarker * fd_ringmarker_new(struct fd_ringbuffer *ring)
 {
 	struct fd_ringmarker *marker = NULL;
 
@@ -117,23 +119,23 @@ struct fd_ringmarker * fd_ringmarker_new(struct fd_ringbuffer *ring)
 	return marker;
 }
 
-void fd_ringmarker_del(struct fd_ringmarker *marker)
+drm_public void fd_ringmarker_del(struct fd_ringmarker *marker)
 {
 	free(marker);
 }
 
-void fd_ringmarker_mark(struct fd_ringmarker *marker)
+drm_public void fd_ringmarker_mark(struct fd_ringmarker *marker)
 {
 	marker->cur = marker->ring->cur;
 }
 
-uint32_t fd_ringmarker_dwords(struct fd_ringmarker *start,
-		struct fd_ringmarker *end)
+drm_public uint32_t fd_ringmarker_dwords(struct fd_ringmarker *start,
+					 struct fd_ringmarker *end)
 {
 	return end->cur - start->cur;
 }
 
-int fd_ringmarker_flush(struct fd_ringmarker *marker)
+drm_public int fd_ringmarker_flush(struct fd_ringmarker *marker)
 {
 	struct fd_ringbuffer *ring = marker->ring;
 	return ring->funcs->flush(ring, marker->cur);
diff --git a/freedreno/kgsl/kgsl_bo.c b/freedreno/kgsl/kgsl_bo.c
index 19a1008..c868097 100644
--- a/freedreno/kgsl/kgsl_bo.c
+++ b/freedreno/kgsl/kgsl_bo.c
@@ -171,8 +171,8 @@ struct fd_bo * kgsl_bo_from_handle(struct fd_device *dev,
 	return bo;
 }
 
-struct fd_bo * fd_bo_from_fbdev(struct fd_pipe *pipe,
-		int fbfd, uint32_t size)
+drm_public struct fd_bo *
+fd_bo_from_fbdev(struct fd_pipe *pipe, int fbfd, uint32_t size)
 {
 	struct fd_bo *bo;
 
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [LIBDRM PATCH 3/3] exynos: Use symbol visibility.
  2014-08-04  9:22 [LIBDRM PATCH 1/3] omap: Use symbol visibility Maarten Lankhorst
  2014-08-04  9:23 ` [LIBDRM PATCH 2/3] freedreno: " Maarten Lankhorst
@ 2014-08-04  9:23 ` Maarten Lankhorst
  1 sibling, 0 replies; 3+ messages in thread
From: Maarten Lankhorst @ 2014-08-04  9:23 UTC (permalink / raw)
  To: dri-devel@lists.freedesktop.org

No changes to exported symbols.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
---
 exynos/Makefile.am     |  1 +
 exynos/exynos_drm.c    | 37 ++++++++++++++++++++-----------------
 exynos/exynos_fimg2d.c | 19 ++++++++++++-------
 3 files changed, 33 insertions(+), 24 deletions(-)

diff --git a/exynos/Makefile.am b/exynos/Makefile.am
index 0a2663a..06bee00 100644
--- a/exynos/Makefile.am
+++ b/exynos/Makefile.am
@@ -1,5 +1,6 @@
 AM_CFLAGS = \
 	$(WARN_CFLAGS) \
+	$(VISIBILITY_CFLAGS) \
 	-I$(top_srcdir) \
 	-I$(top_srcdir)/exynos \
 	$(PTHREADSTUBS_CFLAGS) \
diff --git a/exynos/exynos_drm.c b/exynos/exynos_drm.c
index 5fff259..4c7dd13 100644
--- a/exynos/exynos_drm.c
+++ b/exynos/exynos_drm.c
@@ -38,6 +38,7 @@
 
 #include <xf86drm.h>
 
+#include "libdrm.h"
 #include "exynos_drm.h"
 #include "exynos_drmif.h"
 
@@ -48,7 +49,7 @@
  *
  * if true, return the device object else NULL.
  */
-struct exynos_device * exynos_device_create(int fd)
+drm_public struct exynos_device * exynos_device_create(int fd)
 {
 	struct exynos_device *dev;
 
@@ -69,7 +70,7 @@ struct exynos_device * exynos_device_create(int fd)
  *
  * @dev: exynos drm device object.
  */
-void exynos_device_destroy(struct exynos_device *dev)
+drm_public void exynos_device_destroy(struct exynos_device *dev)
 {
 	free(dev);
 }
@@ -87,8 +88,8 @@ void exynos_device_destroy(struct exynos_device *dev)
  *
  * if true, return a exynos buffer object else NULL.
  */
-struct exynos_bo * exynos_bo_create(struct exynos_device *dev,
-						size_t size, uint32_t flags)
+drm_public struct exynos_bo * exynos_bo_create(struct exynos_device *dev,
+					       size_t size, uint32_t flags)
 {
 	struct exynos_bo *bo;
 	struct drm_exynos_gem_create req = {
@@ -141,8 +142,8 @@ fail:
  *
  * if true, return 0 else negative.
  */
-int exynos_bo_get_info(struct exynos_device *dev, uint32_t handle,
-			size_t *size, uint32_t *flags)
+drm_public int exynos_bo_get_info(struct exynos_device *dev, uint32_t handle,
+				  size_t *size, uint32_t *flags)
 {
 	int ret;
 	struct drm_exynos_gem_info req = {
@@ -167,7 +168,7 @@ int exynos_bo_get_info(struct exynos_device *dev, uint32_t handle,
  *
  * @bo: a exynos buffer object to be destroyed.
  */
-void exynos_bo_destroy(struct exynos_bo *bo)
+drm_public void exynos_bo_destroy(struct exynos_bo *bo)
 {
 	if (!bo)
 		return;
@@ -199,7 +200,8 @@ void exynos_bo_destroy(struct exynos_bo *bo)
  * if true, return a exynos buffer object else NULL.
  *
  */
-struct exynos_bo * exynos_bo_from_name(struct exynos_device *dev, uint32_t name)
+drm_public struct exynos_bo *
+exynos_bo_from_name(struct exynos_device *dev, uint32_t name)
 {
 	struct exynos_bo *bo;
 	struct drm_gem_open req = {
@@ -241,7 +243,7 @@ err_free_bo:
  *
  * if true, return 0 else negative.
  */
-int exynos_bo_get_name(struct exynos_bo *bo, uint32_t *name)
+drm_public int exynos_bo_get_name(struct exynos_bo *bo, uint32_t *name)
 {
 	if (!bo->name) {
 		struct drm_gem_flink req = {
@@ -264,7 +266,7 @@ int exynos_bo_get_name(struct exynos_bo *bo, uint32_t *name)
 	return 0;
 }
 
-uint32_t exynos_bo_handle(struct exynos_bo *bo)
+drm_public uint32_t exynos_bo_handle(struct exynos_bo *bo)
 {
 	return bo->handle;
 }
@@ -277,7 +279,7 @@ uint32_t exynos_bo_handle(struct exynos_bo *bo)
  *
  * if true, user pointer mmaped else NULL.
  */
-void *exynos_bo_map(struct exynos_bo *bo)
+drm_public void *exynos_bo_map(struct exynos_bo *bo)
 {
 	if (!bo->vaddr) {
 		struct exynos_device *dev = bo->dev;
@@ -309,8 +311,8 @@ void *exynos_bo_map(struct exynos_bo *bo)
  *
  * @return: 0 on success, -1 on error, and errno will be set
  */
-int exynos_prime_handle_to_fd(struct exynos_device *dev, uint32_t handle,
-					int *fd)
+drm_public int
+exynos_prime_handle_to_fd(struct exynos_device *dev, uint32_t handle, int *fd)
 {
 	return drmPrimeHandleToFD(dev->fd, handle, 0, fd);
 }
@@ -324,8 +326,8 @@ int exynos_prime_handle_to_fd(struct exynos_device *dev, uint32_t handle,
  *
  * @return: 0 on success, -1 on error, and errno will be set
  */
-int exynos_prime_fd_to_handle(struct exynos_device *dev, int fd,
-					uint32_t *handle)
+drm_public int
+exynos_prime_fd_to_handle(struct exynos_device *dev, int fd, uint32_t *handle)
 {
 	return drmPrimeFDToHandle(dev->fd, fd, handle);
 }
@@ -347,8 +349,9 @@ int exynos_prime_fd_to_handle(struct exynos_device *dev, int fd,
  *
  * if true, return 0 else negative.
  */
-int exynos_vidi_connection(struct exynos_device *dev, uint32_t connect,
-				uint32_t ext, void *edid)
+drm_public int
+exynos_vidi_connection(struct exynos_device *dev, uint32_t connect,
+		       uint32_t ext, void *edid)
 {
 	struct drm_exynos_vidi_connection req = {
 		.connection	= connect,
diff --git a/exynos/exynos_fimg2d.c b/exynos/exynos_fimg2d.c
index fc281b6..ce1ba1e 100644
--- a/exynos/exynos_fimg2d.c
+++ b/exynos/exynos_fimg2d.c
@@ -24,6 +24,7 @@
 
 #include <xf86drm.h>
 
+#include "libdrm.h"
 #include "exynos_drm.h"
 #include "fimg2d_reg.h"
 #include "fimg2d.h"
@@ -184,7 +185,7 @@ static int g2d_flush(struct g2d_context *ctx)
  *
  * fd: a file descriptor to drm device driver opened.
  */
-struct g2d_context *g2d_init(int fd)
+drm_public struct g2d_context *g2d_init(int fd)
 {
 	struct drm_exynos_g2d_get_ver ver;
 	struct g2d_context *ctx;
@@ -212,7 +213,7 @@ struct g2d_context *g2d_init(int fd)
 	return ctx;
 }
 
-void g2d_fini(struct g2d_context *ctx)
+drm_public void g2d_fini(struct g2d_context *ctx)
 {
 	if (ctx)
 		free(ctx);
@@ -223,7 +224,7 @@ void g2d_fini(struct g2d_context *ctx)
  *
  * @ctx: a pointer to g2d_context structure.
  */
-int g2d_exec(struct g2d_context *ctx)
+drm_public int g2d_exec(struct g2d_context *ctx)
 {
 	struct drm_exynos_g2d_exec exec;
 	int ret;
@@ -255,7 +256,8 @@ int g2d_exec(struct g2d_context *ctx)
  * @w: width value to buffer filled with given color data.
  * @h: height value to buffer filled with given color data.
  */
-int g2d_solid_fill(struct g2d_context *ctx, struct g2d_image *img,
+drm_public int
+g2d_solid_fill(struct g2d_context *ctx, struct g2d_image *img,
 			unsigned int x, unsigned int y, unsigned int w,
 			unsigned int h)
 {
@@ -315,7 +317,8 @@ int g2d_solid_fill(struct g2d_context *ctx, struct g2d_image *img,
  * @w: width value to source and destination buffers.
  * @h: height value to source and destination buffers.
  */
-int g2d_copy(struct g2d_context *ctx, struct g2d_image *src,
+drm_public int
+g2d_copy(struct g2d_context *ctx, struct g2d_image *src,
 		struct g2d_image *dst, unsigned int src_x, unsigned int src_y,
 		unsigned int dst_x, unsigned dst_y, unsigned int w,
 		unsigned int h)
@@ -414,7 +417,8 @@ int g2d_copy(struct g2d_context *ctx, struct g2d_image *src,
  * @negative: indicate that it uses color negative to source and
  *	destination buffers.
  */
-int g2d_copy_with_scale(struct g2d_context *ctx, struct g2d_image *src,
+drm_public int
+g2d_copy_with_scale(struct g2d_context *ctx, struct g2d_image *src,
 				struct g2d_image *dst, unsigned int src_x,
 				unsigned int src_y, unsigned int src_w,
 				unsigned int src_h, unsigned int dst_x,
@@ -526,7 +530,8 @@ int g2d_copy_with_scale(struct g2d_context *ctx, struct g2d_image *src,
  * @h: height value to source and destination buffer.
  * @op: blend operation type.
  */
-int g2d_blend(struct g2d_context *ctx, struct g2d_image *src,
+drm_public int
+g2d_blend(struct g2d_context *ctx, struct g2d_image *src,
 		struct g2d_image *dst, unsigned int src_x,
 		unsigned int src_y, unsigned int dst_x, unsigned int dst_y,
 		unsigned int w, unsigned int h, enum e_g2d_op op)
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-08-04  9:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-04  9:22 [LIBDRM PATCH 1/3] omap: Use symbol visibility Maarten Lankhorst
2014-08-04  9:23 ` [LIBDRM PATCH 2/3] freedreno: " Maarten Lankhorst
2014-08-04  9:23 ` [LIBDRM PATCH 3/3] exynos: " Maarten Lankhorst

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.