From patchwork Mon Aug 4 09:22:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maarten Lankhorst X-Patchwork-Id: 4668851 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 5D156C0338 for ; Mon, 4 Aug 2014 09:22:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C0D08201E4 for ; Mon, 4 Aug 2014 09:22:41 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 07D0E2021A for ; Mon, 4 Aug 2014 09:22:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BE10A6E0D9; Mon, 4 Aug 2014 02:22:36 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by gabe.freedesktop.org (Postfix) with ESMTP id 5686F6E0D9 for ; Mon, 4 Aug 2014 02:22:35 -0700 (PDT) Received: from 5ed49945.cm-7-5c.dynamic.ziggo.nl ([94.212.153.69] helo=[192.168.1.128]) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1XEETS-0007Pe-66 for dri-devel@lists.freedesktop.org; Mon, 04 Aug 2014 09:22:34 +0000 Message-ID: <53DF50D9.3020307@canonical.com> Date: Mon, 04 Aug 2014 11:22:33 +0200 From: Maarten Lankhorst User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: "dri-devel@lists.freedesktop.org" Subject: [LIBDRM PATCH 1/3] omap: Use symbol visibility. X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP No changes to exported symbols. Signed-off-by: Maarten Lankhorst --- 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 #include +#include #include #include @@ -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,