From patchwork Mon Aug 4 09:23:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maarten Lankhorst X-Patchwork-Id: 4668871 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 6037DC0338 for ; Mon, 4 Aug 2014 09:24:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C7C6D20218 for ; Mon, 4 Aug 2014 09:23:58 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 25C50201E4 for ; Mon, 4 Aug 2014 09:23:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8411D6E387; Mon, 4 Aug 2014 02:23:54 -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 7D4D96E387 for ; Mon, 4 Aug 2014 02:23:53 -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 1XEEUi-0007Sq-TO for dri-devel@lists.freedesktop.org; Mon, 04 Aug 2014 09:23:52 +0000 Message-ID: <53DF5128.7080607@canonical.com> Date: Mon, 04 Aug 2014 11:23:52 +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 3/3] exynos: Use symbol visibility. References: <53DF50D9.3020307@canonical.com> In-Reply-To: <53DF50D9.3020307@canonical.com> 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 --- 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 +#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 +#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)