hide library symbols by default
v2 cover hide library symbols by default
Rely on -fvisibility=hidden to hide the symbols. Previous version of this series applying only to drm_intel.so is
but it's not included here since I changed the approach for the build system change.
drm_private can also be removed from other symbols but it proved to be a lot of manual work to re-align all the fields, so I decided to leave it to be done on top as a cleanup.
There were lots of changes to param alignement that had to be done manually, I may have missed some.
Changes from v1:
- Include changes for all other sub-libraries
- Include changes to autotools
- Make main Makefil.am and meson.build define the required flag
This is build-tested locally and on gitlab:
https://gitlab.freedesktop.org/demarchi/drm/pipelines/4339
Lucas De Marchi (13):
intel: annotate public functions
libkms: annotate public functions
nouveau: annotate public functions
libkms: annotate public functions
libdrm: annotate public functions
etnaviv: annotate public functions
freedreno: annotate public functions
omap: annotate public functions
radeon: annotate public functions
tegra: annotate public functions
exynos: annotate public functions
meson: make symbols hidden by default
autotools: make symbols hidden by default
Makefile.am | 1 + amdgpu/Makefile.am | 1 + amdgpu/amdgpu_bo.c | 104 ++++++------ amdgpu/amdgpu_cs.c | 137 +++++++-------- amdgpu/amdgpu_device.c | 19 ++- amdgpu/amdgpu_gpu_info.c | 51 +++--- amdgpu/amdgpu_vamgr.c | 24 +-- amdgpu/amdgpu_vm.c | 5 +- amdgpu/meson.build | 2 +- etnaviv/Makefile.am | 1 + etnaviv/etnaviv_bo.c | 25 +-- etnaviv/etnaviv_cmd_stream.c | 21 ++- etnaviv/etnaviv_device.c | 10 +- etnaviv/etnaviv_gpu.c | 6 +- etnaviv/etnaviv_perfmon.c | 8 +- etnaviv/etnaviv_pipe.c | 8 +- etnaviv/meson.build | 2 +- exynos/Makefile.am | 1 + exynos/exynos_drm.c | 30 ++-- exynos/exynos_fimg2d.c | 20 +-- exynos/meson.build | 2 +- freedreno/Makefile.am | 1 + freedreno/freedreno_bo.c | 32 ++-- freedreno/freedreno_device.c | 12 +- freedreno/freedreno_pipe.c | 14 +- freedreno/freedreno_ringbuffer.c | 40 ++--- freedreno/meson.build | 2 +- intel/Makefile.am | 1 + intel/intel_bufmgr.c | 64 +++---- intel/intel_bufmgr_fake.c | 10 +- intel/intel_bufmgr_gem.c | 73 ++++---- intel/intel_decode.c | 14 +- intel/meson.build | 4 +- libdrm_macros.h | 2 + libkms/Makefile.am | 1 + libkms/api.c | 16 +- libkms/meson.build | 2 +- meson.build | 5 +- nouveau/Makefile.am | 1 + nouveau/bufctx.c | 10 +- nouveau/meson.build | 2 +- nouveau/nouveau.c | 50 +++--- nouveau/pushbuf.c | 18 +- omap/Makefile.am | 1 + omap/meson.build | 2 +- omap/omap_drm.c | 36 ++-- radeon/Makefile.am | 1 + radeon/meson.build | 2 +- radeon/radeon_bo.c | 24 +-- radeon/radeon_bo_gem.c | 16 +- radeon/radeon_cs.c | 24 +-- radeon/radeon_cs_gem.c | 4 +- radeon/radeon_cs_space.c | 6 +- radeon/radeon_surface.c | 8 +- tegra/Makefile.am | 3 +- tegra/meson.build | 2 +- tegra/tegra.c | 26 +-- tests/Makefile.am | 1 + tests/amdgpu/Makefile.am | 1 + tests/etnaviv/Makefile.am | 1 + tests/exynos/Makefile.am | 1 + tests/exynos/meson.build | 6 +- tests/kms/Makefile.am | 3 +- tests/kms/meson.build | 2 +- tests/kmstest/Makefile.am | 1 + tests/kmstest/meson.build | 2 +- tests/meson.build | 8 +- tests/modeprint/Makefile.am | 1 + tests/modeprint/meson.build | 2 +- tests/modetest/Makefile.am | 1 + tests/modetest/meson.build | 2 +- tests/nouveau/Makefile.am | 1 + tests/nouveau/meson.build | 2 +- tests/proptest/Makefile.am | 1 + tests/proptest/meson.build | 2 +- tests/radeon/Makefile.am | 1 + tests/radeon/meson.build | 2 +- tests/tegra/Makefile.am | 4 +- tests/tegra/meson.build | 2 +- tests/vbltest/Makefile.am | 1 + tests/vbltest/meson.build | 2 +- vc4/Makefile.am | 1 + xf86drm.c | 276 ++++++++++++++++--------------- xf86drmHash.c | 15 +- xf86drmMode.c | 158 ++++++++++-------- xf86drmRandom.c | 9 +- xf86drmSL.c | 23 +-- 87 files changed, 803 insertions(+), 736 deletions(-)
Signature · 6 lines
2.17.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v2 1/13 intel: annotate public functions
This was done with:
while read sym; do
read f func line _ <<<$(cscope -d -L -1 $sym)
if [ ! -z "$f" ]; then
line=$((line-1))
sed -i "${line}s/^/drm_public /" $f
fidone < /tmp/a.txt
Then some corner cases were manually fixed. "a.txt" above contains the symbols collected from intel/intel-symbol-check. The idea here will be to switch the default visibility to hidden so we don't export symbols we shouldn't.
--- intel/intel_bufmgr.c | 64 +++++++++++++++++----------------- intel/intel_bufmgr_fake.c | 10 +++--- intel/intel_bufmgr_gem.c | 73 +++++++++++++++++++-------------------- intel/intel_decode.c | 14 ++++---- libdrm_macros.h | 2 ++ 5 files changed, 82 insertions(+), 81 deletions(-)
intel/intel_bufmgr.c +32 -32
@@ -45,21 +45,21 @@* Convenience functions for buffer management methods. */ -drm_intel_bo * +drm_public drm_intel_bo *drm_intel_bo_alloc (drm_intel_bufmgr *bufmgr,const char *name,unsigned long size,unsigned int alignment) {return bufmgr->bo_alloc (bufmgr, name, size, alignment); } -drm_intel_bo * +drm_public drm_intel_bo *drm_intel_bo_alloc_for_render (drm_intel_bufmgr *bufmgr,const char *name,unsigned long size,unsigned int alignment) {return bufmgr->bo_alloc_for_render (bufmgr, name, size, alignment); } -drm_intel_bo * +drm_public drm_intel_bo * drm_intel_bo_alloc_userptr(drm_intel_bufmgr *bufmgr, const char *name, void *addr, uint32_t tiling_mode,
@@ -73,7 +73,7 @@ drm_intel_bo_alloc_userptr(drm_intel_bufmgr *bufmgr,return NULL ; } -drm_intel_bo * +drm_public drm_intel_bo *drm_intel_bo_alloc_tiled (drm_intel_bufmgr *bufmgr,const char *name,int x,int y,int cpp,uint32_t *tiling_mode,unsigned long *pitch,unsigned long flags)
@@ -82,13 +82,13 @@ drm_intel_bo_alloc_tiled(drm_intel_bufmgr *bufmgr, const char *name, tiling_mode, pitch, flags); } -void +drm_public voiddrm_intel_bo_reference (drm_intel_bo *bo) { bo->bufmgr->bo_reference (bo); } -void +drm_public voiddrm_intel_bo_unreference (drm_intel_bo *bo) {if (bo ==NULL )
@@ -97,26 +97,26 @@ drm_intel_bo_unreference(drm_intel_bo *bo) bo->bufmgr->bo_unreference (bo); } -int +drm_public intdrm_intel_bo_map (drm_intel_bo *buf,int write_enable) {return buf->bufmgr->bo_map (buf, write_enable); } -int +drm_public intdrm_intel_bo_unmap (drm_intel_bo *buf) {return buf->bufmgr->bo_unmap (buf); } -int +drm_public intdrm_intel_bo_subdata (drm_intel_bo *bo,unsigned long offset,unsigned long size,const void *data) {return bo->bufmgr->bo_subdata (bo, offset, size, data); } -int +drm_public intdrm_intel_bo_get_subdata (drm_intel_bo *bo,unsigned long offset,unsigned long size,void *data) {
@@ -135,26 +135,26 @@ drm_intel_bo_get_subdata(drm_intel_bo *bo, unsigned long offset,return 0 ; } -void +drm_public voiddrm_intel_bo_wait_rendering (drm_intel_bo *bo) { bo->bufmgr->bo_wait_rendering (bo); } -void +drm_public voiddrm_intel_bufmgr_destroy (drm_intel_bufmgr *bufmgr) { bufmgr->destroy (bufmgr); } -int +drm_public intdrm_intel_bo_exec (drm_intel_bo *bo,int used,drm_clip_rect_t * cliprects,int num_cliprects,int DR4 ) {return bo->bufmgr->bo_exec (bo, used, cliprects, num_cliprects,DR4 ); } -int +drm_public intdrm_intel_bo_mrb_exec (drm_intel_bo *bo,int used,drm_clip_rect_t *cliprects,int num_cliprects,int DR4 ,unsigned int rings)
@@ -174,19 +174,19 @@ drm_intel_bo_mrb_exec(drm_intel_bo *bo, int used, } } -void +drm_public voiddrm_intel_bufmgr_set_debug (drm_intel_bufmgr *bufmgr,int enable_debug) { bufmgr->debug = enable_debug; } -int +drm_public intdrm_intel_bufmgr_check_aperture_space (drm_intel_bo ** bo_array,int count) {return bo_array[0 ]->bufmgr->check_aperture_space (bo_array, count); } -int +drm_public intdrm_intel_bo_flink (drm_intel_bo *bo,uint32_t * name) {if (bo->bufmgr->bo_flink)
@@ -195,7 +195,7 @@ drm_intel_bo_flink(drm_intel_bo *bo, uint32_t * name)return -ENODEV ; } -int +drm_public intdrm_intel_bo_emit_reloc (drm_intel_bo *bo,uint32_t offset,drm_intel_bo *target_bo,uint32_t target_offset,uint32_t read_domains,uint32_t write_domain)
@@ -206,7 +206,7 @@ drm_intel_bo_emit_reloc(drm_intel_bo *bo, uint32_t offset, }/* For fence registers, not GL fences */ -int +drm_public intdrm_intel_bo_emit_reloc_fence (drm_intel_bo *bo,uint32_t offset,drm_intel_bo *target_bo,uint32_t target_offset,uint32_t read_domains,uint32_t write_domain)
@@ -217,7 +217,7 @@ drm_intel_bo_emit_reloc_fence(drm_intel_bo *bo, uint32_t offset, } -int +drm_public intdrm_intel_bo_pin (drm_intel_bo *bo,uint32_t alignment) {if (bo->bufmgr->bo_pin)
@@ -226,7 +226,7 @@ drm_intel_bo_pin(drm_intel_bo *bo, uint32_t alignment)return -ENODEV ; } -int +drm_public intdrm_intel_bo_unpin (drm_intel_bo *bo) {if (bo->bufmgr->bo_unpin)
@@ -235,7 +235,7 @@ drm_intel_bo_unpin(drm_intel_bo *bo)return -ENODEV ; } -int +drm_public intdrm_intel_bo_set_tiling (drm_intel_bo *bo,uint32_t * tiling_mode,uint32_t stride) {
@@ -246,7 +246,7 @@ drm_intel_bo_set_tiling(drm_intel_bo *bo, uint32_t * tiling_mode,return 0 ; } -int +drm_public intdrm_intel_bo_get_tiling (drm_intel_bo *bo,uint32_t * tiling_mode,uint32_t * swizzle_mode) {
@@ -258,7 +258,7 @@ drm_intel_bo_get_tiling(drm_intel_bo *bo, uint32_t * tiling_mode,return 0 ; } -int +drm_public intdrm_intel_bo_set_softpin_offset (drm_intel_bo *bo,uint64_t offset) {if (bo->bufmgr->bo_set_softpin_offset)
@@ -267,7 +267,7 @@ drm_intel_bo_set_softpin_offset(drm_intel_bo *bo, uint64_t offset)return -ENODEV ; } -int +drm_public intdrm_intel_bo_disable_reuse (drm_intel_bo *bo) {if (bo->bufmgr->bo_disable_reuse)
@@ -275,7 +275,7 @@ drm_intel_bo_disable_reuse(drm_intel_bo *bo)return 0 ; } -int +drm_public intdrm_intel_bo_is_reusable (drm_intel_bo *bo) {if (bo->bufmgr->bo_is_reusable)
@@ -283,7 +283,7 @@ drm_intel_bo_is_reusable(drm_intel_bo *bo)return 0 ; } -int +drm_public intdrm_intel_bo_busy (drm_intel_bo *bo) {if (bo->bufmgr->bo_busy)
@@ -291,7 +291,7 @@ drm_intel_bo_busy(drm_intel_bo *bo)return 0 ; } -int +drm_public intdrm_intel_bo_madvise (drm_intel_bo *bo,int madv) {if (bo->bufmgr->bo_madvise)
@@ -299,7 +299,7 @@ drm_intel_bo_madvise(drm_intel_bo *bo, int madv)return -1 ; } -int +drm_public intdrm_intel_bo_use_48b_address_range (drm_intel_bo *bo,uint32_t enable) {if (bo->bufmgr->bo_use_48b_address_range) {
@@ -310,13 +310,13 @@ drm_intel_bo_use_48b_address_range(drm_intel_bo *bo, uint32_t enable)return -ENODEV ; } -int +drm_public intdrm_intel_bo_references (drm_intel_bo *bo,drm_intel_bo *target_bo) {return bo->bufmgr->bo_references (bo, target_bo); } -int +drm_public intdrm_intel_get_pipe_from_crtc_id (drm_intel_bufmgr *bufmgr,int crtc_id) {if (bufmgr->get_pipe_from_crtc_id)
@@ -360,7 +360,7 @@ drm_intel_probe_agp_aperture_size(int fd) }#endif -int +drm_public intdrm_intel_get_aperture_sizes (int fd,size_t *mappable,size_t *total) {
intel/intel_bufmgr_fake.c +5 -5
@@ -764,7 +764,7 @@ drm_intel_fake_bo_wait_rendering(drm_intel_bo *bo)* -- just evict everything * -- and wait for idle */ -void +drm_public voiddrm_intel_bufmgr_fake_contended_lock_take (drm_intel_bufmgr *bufmgr) {drm_intel_bufmgr_fake *bufmgr_fake = (drm_intel_bufmgr_fake *) bufmgr;
@@ -860,7 +860,7 @@ drm_intel_fake_bo_alloc_tiled(drm_intel_bufmgr * bufmgr, 4096); } -drm_intel_bo * +drm_public drm_intel_bo * drm_intel_bo_fake_alloc_static(drm_intel_bufmgr *bufmgr, const char *name, unsigned long offset,
@@ -1532,7 +1532,7 @@ drm_intel_fake_check_aperture_space(drm_intel_bo ** bo_array, int count)* Used by the X Server on LeaveVT, when the card memory is no longer our * own. */ -void +drm_public voiddrm_intel_bufmgr_fake_evict_all (drm_intel_bufmgr *bufmgr) {drm_intel_bufmgr_fake *bufmgr_fake = (drm_intel_bufmgr_fake *) bufmgr;
@@ -1567,7 +1567,7 @@ drm_intel_bufmgr_fake_evict_all(drm_intel_bufmgr *bufmgr)pthread_mutex_unlock (&bufmgr_fake->lock); } -void +drm_public voiddrm_intel_bufmgr_fake_set_last_dispatch (drm_intel_bufmgr *bufmgr,volatile unsigned int *last_dispatch)
@@ -1577,7 +1577,7 @@ drm_intel_bufmgr_fake_set_last_dispatch(drm_intel_bufmgr *bufmgr, bufmgr_fake->last_dispatch = (volatile int *)last_dispatch; } -drm_intel_bufmgr * +drm_public drm_intel_bufmgr *drm_intel_bufmgr_fake_init (int fd,unsigned long low_offset,void *low_virtual,unsigned long size,volatile unsigned int *last_dispatch)
intel/intel_bufmgr_gem.c +36 -37
289 lines not on this page · raw message
intel/intel_decode.c +7 -7
@@ -3811,7 +3811,7 @@ decode_3d_i830(struct drm_intel_decode *ctx)return 1 ; } -struct drm_intel_decode * +drm_public struct drm_intel_decode *drm_intel_decode_context_alloc (uint32_t devid) {struct drm_intel_decode *ctx;
@@ -3845,20 +3845,20 @@ drm_intel_decode_context_alloc(uint32_t devid)return ctx; } -void +drm_public voiddrm_intel_decode_context_free (struct drm_intel_decode *ctx) {free (ctx); } -void +drm_public voiddrm_intel_decode_set_dump_past_end (struct drm_intel_decode *ctx,int dump_past_end) { ctx->dump_past_end = !!dump_past_end; } -void +drm_public voiddrm_intel_decode_set_batch_pointer (struct drm_intel_decode *ctx,void *data,uint32_t hw_offset,int count) {
@@ -3867,7 +3867,7 @@ drm_intel_decode_set_batch_pointer(struct drm_intel_decode *ctx, ctx->base_count = count; } -void +drm_public voiddrm_intel_decode_set_head_tail (struct drm_intel_decode *ctx,uint32_t head,uint32_t tail) {
@@ -3875,7 +3875,7 @@ drm_intel_decode_set_head_tail(struct drm_intel_decode *ctx, ctx->tail = tail; } -void +drm_public voiddrm_intel_decode_set_output_file (struct drm_intel_decode *ctx,FILE *output) {
@@ -3889,7 +3889,7 @@ drm_intel_decode_set_output_file(struct drm_intel_decode *ctx,* \param count number of DWORDs to decode in the batch buffer * \param hw_offset hardware address for the buffer */ -void +drm_public voiddrm_intel_decode (struct drm_intel_decode *ctx) {int ret;
libdrm_macros.h +2 -0
@@ -25,8 +25,10 @@#if HAVE_VISIBILITY # define drm_private __attribute__((visibility("hidden"))) +# define drm_public __attribute__((visibility("default")))#else # define drm_private +# define drm_public#endif
Signature · 6 lines
2.17.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v2 2/13 libkms: annotate public functions
In reply to Lucas De MarchiThis was done with:
nm --dynamic --defined-only build/libkms/libkms.so | \ grep kms_ | \ cut -d' ' -f3 > /tmp/a.txt
while read sym; do
read f func line _ <<<$(cscope -d -L -1 $sym)
if [ ! -z "$f" ]; then
sed -i "${line}s/^/drm_public /" $f
fidone < /tmp/a.txt
The idea here will be to switch the default visibility to hidden so we don't export symbols we shouldn't.
--- libkms/api.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
libkms/api.c +8 -8
@@ -33,12 +33,12 @@#include "libdrm_macros.h" #include "internal.h" -int kms_create (int fd,struct kms_driver **out) +drm_public int kms_create(int fd, struct kms_driver **out) {return linux_create (fd, out); } -int kms_get_prop (struct kms_driver *kms,unsigned key,unsigned *out) +drm_public int kms_get_prop(struct kms_driver *kms, unsigned key, unsigned *out) {switch (key) {case KMS_BO_TYPE :
@@ -49,7 +49,7 @@ int kms_get_prop(struct kms_driver *kms, unsigned key, unsigned *out)return kms->get_prop (kms, key, out); } -int kms_destroy (struct kms_driver **kms) +drm_public int kms_destroy(struct kms_driver **kms) {if (!(*kms))return 0 ;
@@ -59,7 +59,7 @@ int kms_destroy(struct kms_driver **kms)return 0 ; } -int kms_bo_create (struct kms_driver *kms,const unsigned *attr,struct kms_bo **out) +drm_public int kms_bo_create(struct kms_driver *kms, const unsigned *attr, struct kms_bo **out) {unsigned width =0 ;unsigned height =0 ;
@@ -97,7 +97,7 @@ int kms_bo_create(struct kms_driver *kms, const unsigned *attr, struct kms_bo **return kms->bo_create (kms, width, height, type, attr, out); } -int kms_bo_get_prop (struct kms_bo *bo,unsigned key,unsigned *out) +drm_public int kms_bo_get_prop(struct kms_bo *bo, unsigned key, unsigned *out) {switch (key) {case KMS_PITCH :
@@ -113,17 +113,17 @@ int kms_bo_get_prop(struct kms_bo *bo, unsigned key, unsigned *out)return 0 ; } -int kms_bo_map (struct kms_bo *bo,void **out) +drm_public int kms_bo_map(struct kms_bo *bo, void **out) {return bo->kms->bo_map (bo, out); } -int kms_bo_unmap (struct kms_bo *bo) +drm_public int kms_bo_unmap(struct kms_bo *bo) {return bo->kms->bo_unmap (bo); } -int kms_bo_destroy (struct kms_bo **bo) +drm_public int kms_bo_destroy(struct kms_bo **bo) {int ret;
Signature · 6 lines
2.17.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v2 3/13 nouveau: annotate public functions
In reply to Lucas De MarchiThis was done with:
nm --dynamic --defined-only build/nouveau/libdrm_nouveau.so | \ grep nouveau_ | \ cut -d ' ' -f3 > /tmp/a.txt
while read sym; do
read f func line _ <<<$(cscope -d -L -1 $sym)
if [ ! -z "$f" ]; then
line=$((line-1))
sed -i "${line}s/^/drm_public /" $f
fidone < /tmp/a.txt
Then some corner cases were manually fixed. The idea here will be to switch the default visibility to hidden so we don't export symbols we shouldn't.
--- nouveau/bufctx.c | 10 +++++----- nouveau/nouveau.c | 50 +++++++++++++++++++++++------------------------ nouveau/pushbuf.c | 18 ++++++++--------- 3 files changed, 39 insertions(+), 39 deletions(-)
nouveau/bufctx.c +5 -5
@@ -58,7 +58,7 @@ nouveau_bufctx(struct nouveau_bufctx *bctx)return (struct nouveau_bufctx_priv *)bctx; } -int +drm_public intnouveau_bufctx_new (struct nouveau_client *client,int bins,struct nouveau_bufctx **pbctx) {
@@ -78,7 +78,7 @@ nouveau_bufctx_new(struct nouveau_client *client, int bins,return -ENOMEM ; } -void +drm_public voidnouveau_bufctx_del (struct nouveau_bufctx **pbctx) {struct nouveau_bufctx_priv *pctx =nouveau_bufctx (*pbctx);
@@ -95,7 +95,7 @@ nouveau_bufctx_del(struct nouveau_bufctx **pbctx) } } -void +drm_public voidnouveau_bufctx_reset (struct nouveau_bufctx *bctx,int bin) {struct nouveau_bufctx_priv *pctx =nouveau_bufctx (bctx);
@@ -113,7 +113,7 @@ nouveau_bufctx_reset(struct nouveau_bufctx *bctx, int bin) pbin->relocs =0 ; } -struct nouveau_bufref * +drm_public struct nouveau_bufref *nouveau_bufctx_refn (struct nouveau_bufctx *bctx,int bin,struct nouveau_bo *bo,uint32_t flags) {
@@ -140,7 +140,7 @@ nouveau_bufctx_refn(struct nouveau_bufctx *bctx, int bin,return &pref->base; } -struct nouveau_bufref * +drm_public struct nouveau_bufref *nouveau_bufctx_mthd (struct nouveau_bufctx *bctx,int bin,uint32_t packet,struct nouveau_bo *bo,uint64_t data,uint32_t flags,uint32_t vor,uint32_t tor)
nouveau/nouveau.c +25 -25
200 lines not on this page · raw message
nouveau/pushbuf.c +9 -9
@@ -528,7 +528,7 @@ pushbuf_validate(struct nouveau_pushbuf *push, bool retry)return ret; } -int +drm_public intnouveau_pushbuf_new (struct nouveau_client *client,struct nouveau_object *chan,int nr,uint32_t size,bool immediate,struct nouveau_pushbuf **ppush)
@@ -599,7 +599,7 @@ nouveau_pushbuf_new(struct nouveau_client *client, struct nouveau_object *chan,return 0 ; } -void +drm_public voidnouveau_pushbuf_del (struct nouveau_pushbuf **ppush) {struct nouveau_pushbuf_priv *nvpb =nouveau_pushbuf (*ppush);
@@ -625,7 +625,7 @@ nouveau_pushbuf_del(struct nouveau_pushbuf **ppush) *ppush =NULL ; } -struct nouveau_bufctx * +drm_public struct nouveau_bufctx *nouveau_pushbuf_bufctx (struct nouveau_pushbuf *push,struct nouveau_bufctx *ctx) {struct nouveau_bufctx *prev = push->bufctx;
@@ -633,7 +633,7 @@ nouveau_pushbuf_bufctx(struct nouveau_pushbuf *push, struct nouveau_bufctx *ctx)return prev; } -int +drm_public intnouveau_pushbuf_space (struct nouveau_pushbuf *push,uint32_t dwords,uint32_t relocs,uint32_t pushes) {
@@ -697,7 +697,7 @@ nouveau_pushbuf_space(struct nouveau_pushbuf *push,return flushed ?pushbuf_validate (push, false) :0 ; } -void +drm_public voidnouveau_pushbuf_data (struct nouveau_pushbuf *push,struct nouveau_bo *bo,uint64_t offset,uint64_t length) {
@@ -735,7 +735,7 @@ nouveau_pushbuf_refn(struct nouveau_pushbuf *push,return pushbuf_refn (push, true, refs, nr); } -void +drm_public voidnouveau_pushbuf_reloc (struct nouveau_pushbuf *push,struct nouveau_bo *bo,uint32_t data,uint32_t flags,uint32_t vor,uint32_t tor) {
@@ -743,13 +743,13 @@ nouveau_pushbuf_reloc(struct nouveau_pushbuf *push, struct nouveau_bo *bo, push->cur++; } -int +drm_public intnouveau_pushbuf_validate (struct nouveau_pushbuf *push) {return pushbuf_validate (push, true); } -uint32_t +drm_public uint32_tnouveau_pushbuf_refd (struct nouveau_pushbuf *push,struct nouveau_bo *bo) {struct drm_nouveau_gem_pushbuf_bo *kref;
@@ -767,7 +767,7 @@ nouveau_pushbuf_refd(struct nouveau_pushbuf *push, struct nouveau_bo *bo)return flags; } -int +drm_public intnouveau_pushbuf_kick (struct nouveau_pushbuf *push,struct nouveau_object *chan) {if (!push->channel)
Signature · 6 lines
2.17.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v2 4/13 libkms: annotate public functions
In reply to Lucas De MarchiThis was done with:
nm --dynamic --defined-only build/amdgpu/libdrm_amdgpu.so | \ grep amdgpu_ | \ cut -d' ' -f3 > /tmp/a.txt
while read sym; do
read f func line _ <<<$(cscope -d -L -1 $sym)
if [ ! -z "$f" ]; then
line=$((line-1))
sed -i "${line}s/^/drm_public /" $f
fidone < /tmp/a.txt
Then the alignment of function arguments were manually fixed all over. The idea here will be to switch the default visibility to hidden so we don't export symbols we shouldn't.
--- amdgpu/amdgpu_bo.c | 104 ++++++++++++++--------------- amdgpu/amdgpu_cs.c | 137 ++++++++++++++++++++------------------- amdgpu/amdgpu_device.c | 19 +++--- amdgpu/amdgpu_gpu_info.c | 51 ++++++++------- amdgpu/amdgpu_vamgr.c | 24 +++---- amdgpu/amdgpu_vm.c | 5 +- 6 files changed, 173 insertions(+), 167 deletions(-)
amdgpu/amdgpu_bo.c +52 -52
@@ -69,9 +69,9 @@ static int amdgpu_bo_create(amdgpu_device_handle dev,return 0 ; } -int amdgpu_bo_alloc (amdgpu_device_handle dev, -struct amdgpu_bo_alloc_request *alloc_buffer, -amdgpu_bo_handle *buf_handle) +drm_public int amdgpu_bo_alloc(amdgpu_device_handle dev, +struct amdgpu_bo_alloc_request *alloc_buffer, +amdgpu_bo_handle *buf_handle) {union drm_amdgpu_gem_create args;unsigned heap = alloc_buffer->preferred_heap;
@@ -112,8 +112,8 @@ out:return r; } -int amdgpu_bo_set_metadata (amdgpu_bo_handle bo, -struct amdgpu_bo_metadata *info) +drm_public int amdgpu_bo_set_metadata(amdgpu_bo_handle bo, +struct amdgpu_bo_metadata *info) {struct drm_amdgpu_gem_metadata args = {};
@@ -135,8 +135,8 @@ int amdgpu_bo_set_metadata(amdgpu_bo_handle bo, &args, sizeof(args)); } -int amdgpu_bo_query_info (amdgpu_bo_handle bo, -struct amdgpu_bo_info *info) +drm_public int amdgpu_bo_query_info(amdgpu_bo_handle bo, +struct amdgpu_bo_info *info) {struct drm_amdgpu_gem_metadata metadata = {};struct drm_amdgpu_gem_create_in bo_info = {};
@@ -232,9 +232,9 @@ static int amdgpu_bo_export_flink(amdgpu_bo_handle bo)return r; } -int amdgpu_bo_export (amdgpu_bo_handle bo, -enum amdgpu_bo_handle_type type, -uint32_t *shared_handle) +drm_public int amdgpu_bo_export(amdgpu_bo_handle bo, +enum amdgpu_bo_handle_type type, +uint32_t *shared_handle) {int r;
@@ -260,9 +260,9 @@ int amdgpu_bo_export(amdgpu_bo_handle bo,return -EINVAL ; } -int amdgpu_bo_import (amdgpu_device_handle dev, -enum amdgpu_bo_handle_type type, -uint32_t shared_handle, +drm_public int amdgpu_bo_import(amdgpu_device_handle dev, +enum amdgpu_bo_handle_type type, +uint32_t shared_handle,struct amdgpu_bo_import_result *output) {struct drm_gem_open open_arg = {};
@@ -406,7 +406,7 @@ unlock:return r; } -int amdgpu_bo_free (amdgpu_bo_handle buf_handle) +drm_public int amdgpu_bo_free(amdgpu_bo_handle buf_handle) {struct amdgpu_device *dev;struct amdgpu_bo *bo = buf_handle;
@@ -438,12 +438,12 @@ int amdgpu_bo_free(amdgpu_bo_handle buf_handle)return 0 ; } -void amdgpu_bo_inc_ref (amdgpu_bo_handle bo) +drm_public void amdgpu_bo_inc_ref(amdgpu_bo_handle bo) {atomic_inc (&bo->refcount); } -int amdgpu_bo_cpu_map (amdgpu_bo_handle bo,void **cpu) +drm_public int amdgpu_bo_cpu_map(amdgpu_bo_handle bo, void **cpu) {union drm_amdgpu_gem_mmap args;void *ptr;
@@ -491,7 +491,7 @@ int amdgpu_bo_cpu_map(amdgpu_bo_handle bo, void **cpu)return 0 ; } -int amdgpu_bo_cpu_unmap (amdgpu_bo_handle bo) +drm_public int amdgpu_bo_cpu_unmap(amdgpu_bo_handle bo) {int r;
@@ -517,7 +517,7 @@ int amdgpu_bo_cpu_unmap(amdgpu_bo_handle bo)return r; } -int amdgpu_query_buffer_size_alignment (amdgpu_device_handle dev, +drm_public int amdgpu_query_buffer_size_alignment(amdgpu_device_handle dev,struct amdgpu_buffer_size_alignments *info) { info->size_local = dev->dev_info.pte_fragment_size;
@@ -525,8 +525,8 @@ int amdgpu_query_buffer_size_alignment(amdgpu_device_handle dev,return 0 ; } -int amdgpu_bo_wait_for_idle (amdgpu_bo_handle bo, -uint64_t timeout_ns, +drm_public int amdgpu_bo_wait_for_idle(amdgpu_bo_handle bo, +uint64_t timeout_ns,bool *busy) {union drm_amdgpu_gem_wait_idle args;
@@ -548,11 +548,11 @@ int amdgpu_bo_wait_for_idle(amdgpu_bo_handle bo, } } -int amdgpu_find_bo_by_cpu_mapping (amdgpu_device_handle dev, -void *cpu, -uint64_t size, -amdgpu_bo_handle *buf_handle, -uint64_t *offset_in_bo) +drm_public int amdgpu_find_bo_by_cpu_mapping(amdgpu_device_handle dev, +void *cpu, +uint64_t size, +amdgpu_bo_handle *buf_handle, +uint64_t *offset_in_bo) {struct amdgpu_bo *bo;uint32_t i;
@@ -590,10 +590,10 @@ int amdgpu_find_bo_by_cpu_mapping(amdgpu_device_handle dev,return r; } -int amdgpu_create_bo_from_user_mem (amdgpu_device_handle dev, -void *cpu, -uint64_t size, -amdgpu_bo_handle *buf_handle) +drm_public int amdgpu_create_bo_from_user_mem(amdgpu_device_handle dev, +void *cpu, +uint64_t size, +amdgpu_bo_handle *buf_handle) {int r;struct drm_amdgpu_gem_userptr args;
@@ -623,11 +623,11 @@ out:return r; } -int amdgpu_bo_list_create (amdgpu_device_handle dev, -uint32_t number_of_resources, -amdgpu_bo_handle *resources, -uint8_t *resource_prios, -amdgpu_bo_list_handle *result) +drm_public int amdgpu_bo_list_create(amdgpu_device_handle dev, +uint32_t number_of_resources, +amdgpu_bo_handle *resources, +uint8_t *resource_prios, +amdgpu_bo_list_handle *result) {struct drm_amdgpu_bo_list_entry *list;union drm_amdgpu_bo_list args;
@@ -678,7 +678,7 @@ int amdgpu_bo_list_create(amdgpu_device_handle dev,return 0 ; } -int amdgpu_bo_list_destroy (amdgpu_bo_list_handle list) +drm_public int amdgpu_bo_list_destroy(amdgpu_bo_list_handle list) {union drm_amdgpu_bo_list args;int r;
@@ -696,10 +696,10 @@ int amdgpu_bo_list_destroy(amdgpu_bo_list_handle list)return r; } -int amdgpu_bo_list_update (amdgpu_bo_list_handle handle, -uint32_t number_of_resources, -amdgpu_bo_handle *resources, -uint8_t *resource_prios) +drm_public int amdgpu_bo_list_update(amdgpu_bo_list_handle handle, +uint32_t number_of_resources, +amdgpu_bo_handle *resources, +uint8_t *resource_prios) {struct drm_amdgpu_bo_list_entry *list;union drm_amdgpu_bo_list args;
@@ -737,12 +737,12 @@ int amdgpu_bo_list_update(amdgpu_bo_list_handle handle,return r; } -int amdgpu_bo_va_op (amdgpu_bo_handle bo, -uint64_t offset, -uint64_t size, -uint64_t addr, -uint64_t flags, -uint32_t ops) +drm_public int amdgpu_bo_va_op(amdgpu_bo_handle bo, +uint64_t offset, +uint64_t size, +uint64_t addr, +uint64_t flags, +uint32_t ops) {amdgpu_device_handle dev = bo->dev;
@@ -754,13 +754,13 @@ int amdgpu_bo_va_op(amdgpu_bo_handle bo, AMDGPU_VM_PAGE_EXECUTABLE, ops); } -int amdgpu_bo_va_op_raw (amdgpu_device_handle dev, -amdgpu_bo_handle bo, -uint64_t offset, -uint64_t size, -uint64_t addr, -uint64_t flags, -uint32_t ops) +drm_public int amdgpu_bo_va_op_raw(amdgpu_device_handle dev, +amdgpu_bo_handle bo, +uint64_t offset, +uint64_t size, +uint64_t addr, +uint64_t flags, +uint32_t ops) {struct drm_amdgpu_gem_va va;int r;
amdgpu/amdgpu_cs.c +70 -67
285 lines not on this page · raw message
amdgpu/amdgpu_device.c +10 -9
@@ -133,17 +133,17 @@ static void amdgpu_device_free_internal(amdgpu_device_handle dev)* // incremented. dst is freed if its reference counter is 0. */ static void amdgpu_device_reference (struct amdgpu_device **dst, -struct amdgpu_device *src) +struct amdgpu_device *src) {if (update_references (&(*dst)->refcount, &src->refcount))amdgpu_device_free_internal (*dst); *dst = src; } -int amdgpu_device_initialize (int fd, -uint32_t *major_version, -uint32_t *minor_version, -amdgpu_device_handle *device_handle) +drm_public int amdgpu_device_initialize(int fd, +uint32_t *major_version, +uint32_t *minor_version, +amdgpu_device_handle *device_handle) {struct amdgpu_device *dev;drmVersionPtr version;
@@ -279,19 +279,20 @@ cleanup:return r; } -int amdgpu_device_deinitialize (amdgpu_device_handle dev) +drm_public int amdgpu_device_deinitialize(amdgpu_device_handle dev) {amdgpu_device_reference (&dev,NULL );return 0 ; } -const char *amdgpu_get_marketing_name (amdgpu_device_handle dev) +drm_public const char *amdgpu_get_marketing_name(amdgpu_device_handle dev) {return dev->marketing_name; } -int amdgpu_query_sw_info (amdgpu_device_handle dev,enum amdgpu_sw_info info, -void *value) +drm_public int amdgpu_query_sw_info(amdgpu_device_handle dev, +enum amdgpu_sw_info info, +void *value) {uint32_t *val32 = (uint32_t *)value;
amdgpu/amdgpu_gpu_info.c +26 -25
111 lines not on this page · raw message
amdgpu/amdgpu_vamgr.c +12 -12
@@ -29,9 +29,9 @@#include "amdgpu_internal.h" #include "util_math.h" -int amdgpu_va_range_query (amdgpu_device_handle dev, -enum amdgpu_gpu_va_range type, -uint64_t *start,uint64_t *end) +drm_public int amdgpu_va_range_query(amdgpu_device_handle dev, +enum amdgpu_gpu_va_range type, +uint64_t *start,uint64_t *end) {if (type != amdgpu_gpu_va_range_general)return -EINVAL ;
@@ -186,14 +186,14 @@ out:pthread_mutex_unlock (&mgr->bo_va_mutex); } -int amdgpu_va_range_alloc (amdgpu_device_handle dev, -enum amdgpu_gpu_va_range va_range_type, -uint64_t size, -uint64_t va_base_alignment, -uint64_t va_base_required, -uint64_t *va_base_allocated, -amdgpu_va_handle *va_range_handle, -uint64_t flags) +drm_public int amdgpu_va_range_alloc(amdgpu_device_handle dev, +enum amdgpu_gpu_va_range va_range_type, +uint64_t size, +uint64_t va_base_alignment, +uint64_t va_base_required, +uint64_t *va_base_allocated, +amdgpu_va_handle *va_range_handle, +uint64_t flags) {struct amdgpu_bo_va_mgr *vamgr;
@@ -250,7 +250,7 @@ int amdgpu_va_range_alloc(amdgpu_device_handle dev,return 0 ; } -int amdgpu_va_range_free (amdgpu_va_handle va_range_handle) +drm_public int amdgpu_va_range_free(amdgpu_va_handle va_range_handle) {if (!va_range_handle || !va_range_handle->address)return 0 ;
amdgpu/amdgpu_vm.c +3 -2
@@ -26,7 +26,7 @@#include "xf86drm.h" #include "amdgpu_internal.h" -int amdgpu_vm_reserve_vmid (amdgpu_device_handle dev,uint32_t flags) +drm_public int amdgpu_vm_reserve_vmid(amdgpu_device_handle dev, uint32_t flags) {union drm_amdgpu_vm vm;
@@ -37,7 +37,8 @@ int amdgpu_vm_reserve_vmid(amdgpu_device_handle dev, uint32_t flags) &vm, sizeof(vm)); } -int amdgpu_vm_unreserve_vmid (amdgpu_device_handle dev,uint32_t flags) +drm_public int amdgpu_vm_unreserve_vmid(amdgpu_device_handle dev, +uint32_t flags) {union drm_amdgpu_vm vm;
Signature · 6 lines
2.17.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH libdrm v2 04/13] libkms: annotate public functions
The shortlog prefix of this patch should be amdgpu: instead of libkms:. With that fixed, this patch and the radeon patch are
Signature · 6 lines
Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH libdrm v2 04/13] libkms: annotate public functions
Quoted 2 lines · Michel Dänzer
The shortlog prefix of this patch should be amdgpu: instead of libkms:.
thanks, I fixed that.
Lucas De Marchi
Quoted 8 lines
With that fixed, this patch and the radeon patch are
Reviewed-by Michel Dänzer <[email protected]>Signature · 2 lines
Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v2 5/13 libdrm: annotate public functions
In reply to Lucas De MarchiThis was done with:
nm --dynamic --defined-only build/libdrm.so | \ grep " T " | \ grep -v _fini | grep -v _init | \ cut -d' ' -f3 > /tmp/a.txt
while read sym; do
read f func line _ <<<$(cscope -d -L -1 $sym)
if [ ! -z "$f" ]; then
sed -i "${line}s/^/drm_public /" $f
fidone < /tmp/a.txt
Then the alignment of function arguments were manually fixed all over. The idea here will be to switch the default visibility to hidden so we don't export symbols we shouldn't.
--- xf86drm.c | 276 +++++++++++++++++++++++++----------------------- xf86drmHash.c | 15 +-- xf86drmMode.c | 158 ++++++++++++++------------- xf86drmRandom.c | 9 +- xf86drmSL.c | 23 ++-- 5 files changed, 254 insertions(+), 227 deletions(-)
xf86drm.c +144 -132
@@ -121,7 +121,7 @@ struct drm_pciinfo {static drmServerInfoPtr drm_server_info; -void drmSetServerInfo (drmServerInfoPtr info) +drm_public void drmSetServerInfo(drmServerInfoPtr info) { drm_server_info = info; }
@@ -141,7 +141,7 @@ drmDebugPrint(const char *format, va_list ap)return vfprintf (stderr, format, ap); } -void +drm_public voiddrmMsg (const char *format, ...) {va_list ap;
@@ -161,17 +161,17 @@ drmMsg(const char *format, ...)static void *drmHashTable =NULL ;/* Context switch callbacks */ -void *drmGetHashTable (void ) +drm_public void *drmGetHashTable(void) {return drmHashTable; } -void *drmMalloc (int size) +drm_public void *drmMalloc(int size) {return calloc (1 , size); } -void drmFree (void *pt) +drm_public void drmFree(void *pt) {free (pt); }
@@ -179,7 +179,7 @@ void drmFree(void *pt)/** * Call ioctl, restarting if it is interupted */ -int +drm_public intdrmIoctl (int fd,unsigned long request,void *arg) {int ret;
@@ -199,7 +199,7 @@ static unsigned long drmGetKeyFromFd(int fd)return st.st_rdev; } -drmHashEntry *drmGetEntry (int fd) +drm_public drmHashEntry *drmGetEntry(int fd) {unsigned long key =drmGetKeyFromFd (fd);void *value;
@@ -490,7 +490,7 @@ static int drmOpenMinor(int minor, int create, int type)* minor and get version information. For backward compatibility with older * Linux implementations, /proc/dri is also checked. */ -int drmAvailable (void ) +drm_public int drmAvailable(void) {drmVersionPtr version;int retval =0 ;
@@ -725,7 +725,7 @@ static int drmOpenByName(const char *name, int type)* It calls drmOpenByBusid() if \p busid is specified or drmOpenByName() * otherwise. */ -int drmOpen (const char *name,const char *busid) +drm_public int drmOpen(const char *name, const char *busid) {return drmOpenWithType (name, busid,DRM_NODE_PRIMARY ); }
@@ -746,7 +746,7 @@ int drmOpen(const char *name, const char *busid)* It calls drmOpenByBusid() if \p busid is specified or drmOpenByName() * otherwise. */ -int drmOpenWithType (const char *name,const char *busid,int type) +drm_public int drmOpenWithType(const char *name, const char *busid, int type) {if (!drmAvailable () && name !=NULL && drm_server_info && drm_server_info->load_module) {
@@ -769,12 +769,12 @@ int drmOpenWithType(const char *name, const char *busid, int type)return -1 ; } -int drmOpenControl (int minor) +drm_public int drmOpenControl(int minor) {return drmOpenMinor (minor,0 ,DRM_NODE_CONTROL ); } -int drmOpenRender (int minor) +drm_public int drmOpenRender(int minor) {return drmOpenMinor (minor,0 ,DRM_NODE_RENDER ); }
@@ -788,7 +788,7 @@ int drmOpenRender(int minor)* It frees the memory pointed by \p %v as well as all the non-null strings * pointers in it. */ -void drmFreeVersion (drmVersionPtr v) +drm_public void drmFreeVersion(drmVersionPtr v) {if (!v)return ;
@@ -858,7 +858,7 @@ static void drmCopyVersion(drmVersionPtr d, const drm_version_t *s)* first with zeros to get the string lengths, and then the actually strings. * It also null-terminates them since they might not be already. */ -drmVersionPtr drmGetVersion (int fd) +drm_public drmVersionPtr drmGetVersion(int fd) {drmVersionPtr retval;drm_version_t *version =drmMalloc (sizeof (*version));
@@ -906,7 +906,7 @@ drmVersionPtr drmGetVersion(int fd)* This function allocates and fills a drm_version structure with a hard coded * version number. */ -drmVersionPtr drmGetLibVersion (int fd) +drm_public drmVersionPtr drmGetLibVersion(int fd) {drm_version_t *version =drmMalloc (sizeof (*version));
@@ -927,7 +927,7 @@ drmVersionPtr drmGetLibVersion(int fd)return (drmVersionPtr )version; } -int drmGetCap (int fd,uint64_t capability,uint64_t *value) +drm_public int drmGetCap(int fd, uint64_t capability, uint64_t *value) {struct drm_get_cap cap;int ret;
@@ -943,7 +943,7 @@ int drmGetCap(int fd, uint64_t capability, uint64_t *value)return 0 ; } -int drmSetClientCap (int fd,uint64_t capability,uint64_t value) +drm_public int drmSetClientCap(int fd, uint64_t capability, uint64_t value) {struct drm_set_client_cap cap;
@@ -962,7 +962,7 @@ int drmSetClientCap(int fd, uint64_t capability, uint64_t value)* \internal * This function is just frees the memory pointed by \p busid. */ -void drmFreeBusid (const char *busid) +drm_public void drmFreeBusid(const char *busid) {drmFree ((void *)busid); }
@@ -980,7 +980,7 @@ void drmFreeBusid(const char *busid)* get the string length and data, passing the arguments in a drm_unique * structure. */ -char *drmGetBusid (int fd) +drm_public char *drmGetBusid(int fd) {drm_unique_t u;
@@ -1011,7 +1011,7 @@ char *drmGetBusid(int fd)* This function is a wrapper around the DRM_IOCTL_SET_UNIQUE ioctl, passing * the arguments in a drm_unique structure. */ -int drmSetBusid (int fd,const char *busid) +drm_public int drmSetBusid(int fd, const char *busid) {drm_unique_t u;
@@ -1025,7 +1025,7 @@ int drmSetBusid(int fd, const char *busid)return 0 ; } -int drmGetMagic (int fd,drm_magic_t * magic) +drm_public int drmGetMagic(int fd, drm_magic_t * magic) {drm_auth_t auth;
@@ -1038,7 +1038,7 @@ int drmGetMagic(int fd, drm_magic_t * magic)return 0 ; } -int drmAuthMagic (int fd,drm_magic_t magic) +drm_public int drmAuthMagic(int fd, drm_magic_t magic) {drm_auth_t auth;
@@ -1099,8 +1099,8 @@ int drmAuthMagic(int fd, drm_magic_t magic)* This function is a wrapper around the DRM_IOCTL_ADD_MAP ioctl, passing * the arguments in a drm_map structure. */ -int drmAddMap (int fd,drm_handle_t offset,drmSize size,drmMapType type, -drmMapFlags flags,drm_handle_t *handle) +drm_public int drmAddMap(int fd, drm_handle_t offset, drmSize size, drmMapType type, +drmMapFlags flags,drm_handle_t *handle) {drm_map_t map;
@@ -1116,7 +1116,7 @@ int drmAddMap(int fd, drm_handle_t offset, drmSize size, drmMapType type,return 0 ; } -int drmRmMap (int fd,drm_handle_t handle) +drm_public int drmRmMap(int fd, drm_handle_t handle) {drm_map_t map;
@@ -1144,8 +1144,8 @@ int drmRmMap(int fd, drm_handle_t handle)* * \sa drm_buf_desc. */ -int drmAddBufs (int fd,int count,int size,drmBufDescFlags flags, -int agp_offset) +drm_public int drmAddBufs(int fd, int count, int size, drmBufDescFlags flags, +int agp_offset) {drm_buf_desc_t request;
@@ -1160,7 +1160,7 @@ int drmAddBufs(int fd, int count, int size, drmBufDescFlags flags,return request.count; } -int drmMarkBufs (int fd,double low,double high) +drm_public int drmMarkBufs(int fd, double low, double high) {drm_buf_info_t info;int i;
@@ -1211,7 +1211,7 @@ int drmMarkBufs(int fd, double low, double high)* This function is a wrapper around the DRM_IOCTL_FREE_BUFS ioctl, passing * the arguments in a drm_buf_free structure. */ -int drmFreeBufs (int fd,int count,int *list) +drm_public int drmFreeBufs(int fd, int count, int *list) {drm_buf_free_t request;
@@ -1232,7 +1232,7 @@ int drmFreeBufs(int fd, int count, int *list)* \internal * This function closes the file descriptor. */ -int drmClose (int fd) +drm_public int drmClose(int fd) {unsigned long key =drmGetKeyFromFd (fd);drmHashEntry *entry =drmGetEntry (fd);
@@ -1263,7 +1263,8 @@ int drmClose(int fd)* \internal * This function is a wrapper for mmap(). */ -int drmMap (int fd,drm_handle_t handle,drmSize size,drmAddressPtr address) +drm_public int drmMap(int fd, drm_handle_t handle, drmSize size, +drmAddressPtr address) {static unsigned long pagesize_mask =0 ;
@@ -1293,12 +1294,12 @@ int drmMap(int fd, drm_handle_t handle, drmSize size, drmAddressPtr address)* \internal * This function is a wrapper for munmap(). */ -int drmUnmap (drmAddress address,drmSize size) +drm_public int drmUnmap(drmAddress address, drmSize size) {return drm_munmap (address, size); } -drmBufInfoPtr drmGetBufInfo (int fd) +drm_public drmBufInfoPtr drmGetBufInfo(int fd) {drm_buf_info_t info;drmBufInfoPtr retval;
@@ -1348,7 +1349,7 @@ drmBufInfoPtr drmGetBufInfo(int fd)* information about the buffers in a drm_buf_map structure into the * client-visible data structures. */ -drmBufMapPtr drmMapBufs (int fd) +drm_public drmBufMapPtr drmMapBufs(int fd) {drm_buf_map_t bufs;drmBufMapPtr retval;
@@ -1393,7 +1394,7 @@ drmBufMapPtr drmMapBufs(int fd)* Calls munmap() for every buffer stored in \p bufs and frees the * memory allocated by drmMapBufs(). */ -int drmUnmapBufs (drmBufMapPtr bufs) +drm_public int drmUnmapBufs(drmBufMapPtr bufs) {int i;
@@ -1421,7 +1422,7 @@ int drmUnmapBufs(drmBufMapPtr bufs)* Assemble the arguments into a drm_dma structure and keeps issuing the * DRM_IOCTL_DMA ioctl until success or until maximum number of retries. */ -int drmDMA (int fd,drmDMAReqPtr request) +drm_public int drmDMA(int fd, drmDMAReqPtr request) {drm_dma_t dma;int ret, i =0 ;
@@ -1464,7 +1465,7 @@ int drmDMA(int fd, drmDMAReqPtr request)* This function translates the arguments into a drm_lock structure and issue * the DRM_IOCTL_LOCK ioctl until the lock is successfully acquired. */ -int drmGetLock (int fd,drm_context_t context,drmLockFlags flags) +drm_public int drmGetLock(int fd, drm_context_t context, drmLockFlags flags) {drm_lock_t lock;
@@ -1495,7 +1496,7 @@ int drmGetLock(int fd, drm_context_t context, drmLockFlags flags)* This function is a wrapper around the DRM_IOCTL_UNLOCK ioctl, passing the * argument in a drm_lock structure. */ -int drmUnlock (int fd,drm_context_t context) +drm_public int drmUnlock(int fd, drm_context_t context) {drm_lock_t lock;
@@ -1504,7 +1505,7 @@ int drmUnlock(int fd, drm_context_t context)return drmIoctl (fd,DRM_IOCTL_UNLOCK , &lock); } -drm_context_t *drmGetReservedContextList (int fd,int *count) +drm_public drm_context_t *drmGetReservedContextList(int fd, int *count) {drm_ctx_res_t res;drm_ctx_t *list;
@@ -1541,7 +1542,7 @@ err_free_context:return NULL ; } -void drmFreeReservedContextList (drm_context_t *pt) +drm_public void drmFreeReservedContextList(drm_context_t *pt) {drmFree (pt); }
@@ -1564,7 +1565,7 @@ void drmFreeReservedContextList(drm_context_t *pt)* This function is a wrapper around the DRM_IOCTL_ADD_CTX ioctl, passing the * argument in a drm_ctx structure. */ -int drmCreateContext (int fd,drm_context_t *handle) +drm_public int drmCreateContext(int fd, drm_context_t *handle) {drm_ctx_t ctx;
@@ -1575,7 +1576,7 @@ int drmCreateContext(int fd, drm_context_t *handle)return 0 ; } -int drmSwitchToContext (int fd,drm_context_t context) +drm_public int drmSwitchToContext(int fd, drm_context_t context) {drm_ctx_t ctx;
@@ -1586,7 +1587,8 @@ int drmSwitchToContext(int fd, drm_context_t context)return 0 ; } -int drmSetContextFlags (int fd,drm_context_t context,drm_context_tFlags flags) +drm_public int drmSetContextFlags(int fd, drm_context_t context, +drm_context_tFlags flags) {drm_ctx_t ctx;
@@ -1607,8 +1609,8 @@ int drmSetContextFlags(int fd, drm_context_t context, drm_context_tFlags flags)return 0 ; } -int drmGetContextFlags (int fd,drm_context_t context, -drm_context_tFlagsPtr flags) +drm_public int drmGetContextFlags(int fd, drm_context_t context, +drm_context_tFlagsPtr flags) {drm_ctx_t ctx;
@@ -1641,7 +1643,7 @@ int drmGetContextFlags(int fd, drm_context_t context,* This function is a wrapper around the DRM_IOCTL_RM_CTX ioctl, passing the * argument in a drm_ctx structure. */ -int drmDestroyContext (int fd,drm_context_t handle) +drm_public int drmDestroyContext(int fd, drm_context_t handle) {drm_ctx_t ctx;
@@ -1652,7 +1654,7 @@ int drmDestroyContext(int fd, drm_context_t handle)return 0 ; } -int drmCreateDrawable (int fd,drm_drawable_t *handle) +drm_public int drmCreateDrawable(int fd, drm_drawable_t *handle) {drm_draw_t draw;
@@ -1663,7 +1665,7 @@ int drmCreateDrawable(int fd, drm_drawable_t *handle)return 0 ; } -int drmDestroyDrawable (int fd,drm_drawable_t handle) +drm_public int drmDestroyDrawable(int fd, drm_drawable_t handle) {drm_draw_t draw;
@@ -1674,9 +1676,9 @@ int drmDestroyDrawable(int fd, drm_drawable_t handle)return 0 ; } -int drmUpdateDrawableInfo (int fd,drm_drawable_t handle, -drm_drawable_info_type_t type,unsigned int num, -void *data) +drm_public int drmUpdateDrawableInfo(int fd, drm_drawable_t handle, +drm_drawable_info_type_t type, +unsigned int num,void *data) {drm_update_draw_t update;
@@ -1692,7 +1694,8 @@ int drmUpdateDrawableInfo(int fd, drm_drawable_t handle,return 0 ; } -int drmCrtcGetSequence (int fd,uint32_t crtcId,uint64_t *sequence,uint64_t *ns) +drm_public int drmCrtcGetSequence(int fd, uint32_t crtcId, uint64_t *sequence, +uint64_t *ns) {struct drm_crtc_get_sequence get_seq;int ret;
@@ -1710,8 +1713,10 @@ int drmCrtcGetSequence(int fd, uint32_t crtcId, uint64_t *sequence, uint64_t *nsreturn 0 ; } -int drmCrtcQueueSequence (int fd,uint32_t crtcId,uint32_t flags,uint64_t sequence, -uint64_t *sequence_queued,uint64_t user_data) +drm_public int drmCrtcQueueSequence(int fd, uint32_t crtcId, uint32_t flags, +uint64_t sequence, +uint64_t *sequence_queued, +uint64_t user_data) {struct drm_crtc_queue_sequence queue_seq;int ret;
@@ -1741,7 +1746,7 @@ int drmCrtcQueueSequence(int fd, uint32_t crtcId, uint32_t flags, uint64_t seque* \internal * This function is a wrapper around the DRM_IOCTL_AGP_ACQUIRE ioctl. */ -int drmAgpAcquire (int fd) +drm_public int drmAgpAcquire(int fd) {if (drmIoctl (fd,DRM_IOCTL_AGP_ACQUIRE ,NULL ))return -errno;
@@ -1759,7 +1764,7 @@ int drmAgpAcquire(int fd)* \internal * This function is a wrapper around the DRM_IOCTL_AGP_RELEASE ioctl. */ -int drmAgpRelease (int fd) +drm_public int drmAgpRelease(int fd) {if (drmIoctl (fd,DRM_IOCTL_AGP_RELEASE ,NULL ))return -errno;
@@ -1779,7 +1784,7 @@ int drmAgpRelease(int fd)* This function is a wrapper around the DRM_IOCTL_AGP_ENABLE ioctl, passing the * argument in a drm_agp_mode structure. */ -int drmAgpEnable (int fd,unsigned long mode) +drm_public int drmAgpEnable(int fd, unsigned long mode) {drm_agp_mode_t m;
@@ -1807,8 +1812,8 @@ int drmAgpEnable(int fd, unsigned long mode)* This function is a wrapper around the DRM_IOCTL_AGP_ALLOC ioctl, passing the * arguments in a drm_agp_buffer structure. */ -int drmAgpAlloc (int fd,unsigned long size,unsigned long type, -unsigned long *address,drm_handle_t *handle) +drm_public int drmAgpAlloc(int fd, unsigned long size, unsigned long type, +unsigned long *address,drm_handle_t *handle) {drm_agp_buffer_t b;
@@ -1837,7 +1842,7 @@ int drmAgpAlloc(int fd, unsigned long size, unsigned long type,* This function is a wrapper around the DRM_IOCTL_AGP_FREE ioctl, passing the * argument in a drm_agp_buffer structure. */ -int drmAgpFree (int fd,drm_handle_t handle) +drm_public int drmAgpFree(int fd, drm_handle_t handle) {drm_agp_buffer_t b;
@@ -1862,7 +1867,7 @@ int drmAgpFree(int fd, drm_handle_t handle)* This function is a wrapper around the DRM_IOCTL_AGP_BIND ioctl, passing the * argument in a drm_agp_binding structure. */ -int drmAgpBind (int fd,drm_handle_t handle,unsigned long offset) +drm_public int drmAgpBind(int fd, drm_handle_t handle, unsigned long offset) {drm_agp_binding_t b;
@@ -1887,7 +1892,7 @@ int drmAgpBind(int fd, drm_handle_t handle, unsigned long offset)* This function is a wrapper around the DRM_IOCTL_AGP_UNBIND ioctl, passing * the argument in a drm_agp_binding structure. */ -int drmAgpUnbind (int fd,drm_handle_t handle) +drm_public int drmAgpUnbind(int fd, drm_handle_t handle) {drm_agp_binding_t b;
@@ -1910,7 +1915,7 @@ int drmAgpUnbind(int fd, drm_handle_t handle)* This function is a wrapper around the DRM_IOCTL_AGP_INFO ioctl, getting the * necessary information in a drm_agp_info structure. */ -int drmAgpVersionMajor (int fd) +drm_public int drmAgpVersionMajor(int fd) {drm_agp_info_t i;
@@ -1933,7 +1938,7 @@ int drmAgpVersionMajor(int fd)* This function is a wrapper around the DRM_IOCTL_AGP_INFO ioctl, getting the * necessary information in a drm_agp_info structure. */ -int drmAgpVersionMinor (int fd) +drm_public int drmAgpVersionMinor(int fd) {drm_agp_info_t i;
@@ -1956,7 +1961,7 @@ int drmAgpVersionMinor(int fd)* This function is a wrapper around the DRM_IOCTL_AGP_INFO ioctl, getting the * necessary information in a drm_agp_info structure. */ -unsigned long drmAgpGetMode (int fd) +drm_public unsigned long drmAgpGetMode (int fd) {drm_agp_info_t i;
@@ -1979,7 +1984,7 @@ unsigned long drmAgpGetMode(int fd)* This function is a wrapper around the DRM_IOCTL_AGP_INFO ioctl, getting the * necessary information in a drm_agp_info structure. */ -unsigned long drmAgpBase (int fd) +drm_public unsigned long drmAgpBase (int fd) {drm_agp_info_t i;
@@ -2002,7 +2007,7 @@ unsigned long drmAgpBase(int fd)* This function is a wrapper around the DRM_IOCTL_AGP_INFO ioctl, getting the * necessary information in a drm_agp_info structure. */ -unsigned long drmAgpSize (int fd) +drm_public unsigned long drmAgpSize (int fd) {drm_agp_info_t i;
@@ -2025,7 +2030,7 @@ unsigned long drmAgpSize(int fd)* This function is a wrapper around the DRM_IOCTL_AGP_INFO ioctl, getting the * necessary information in a drm_agp_info structure. */ -unsigned long drmAgpMemoryUsed (int fd) +drm_public unsigned long drmAgpMemoryUsed (int fd) {drm_agp_info_t i;
@@ -2048,7 +2053,7 @@ unsigned long drmAgpMemoryUsed(int fd)* This function is a wrapper around the DRM_IOCTL_AGP_INFO ioctl, getting the * necessary information in a drm_agp_info structure. */ -unsigned long drmAgpMemoryAvail (int fd) +drm_public unsigned long drmAgpMemoryAvail (int fd) {drm_agp_info_t i;
@@ -2071,7 +2076,7 @@ unsigned long drmAgpMemoryAvail(int fd)* This function is a wrapper around the DRM_IOCTL_AGP_INFO ioctl, getting the * necessary information in a drm_agp_info structure. */ -unsigned int drmAgpVendorId (int fd) +drm_public unsigned int drmAgpVendorId(int fd) {drm_agp_info_t i;
@@ -2094,7 +2099,7 @@ unsigned int drmAgpVendorId(int fd)* This function is a wrapper around the DRM_IOCTL_AGP_INFO ioctl, getting the * necessary information in a drm_agp_info structure. */ -unsigned int drmAgpDeviceId (int fd) +drm_public unsigned int drmAgpDeviceId(int fd) {drm_agp_info_t i;
@@ -2105,7 +2110,8 @@ unsigned int drmAgpDeviceId(int fd)return i.id_device; } -int drmScatterGatherAlloc (int fd,unsigned long size,drm_handle_t *handle) +drm_public int drmScatterGatherAlloc(int fd, unsigned long size, +drm_handle_t *handle) {drm_scatter_gather_t sg;
@@ -2119,7 +2125,7 @@ int drmScatterGatherAlloc(int fd, unsigned long size, drm_handle_t *handle)return 0 ; } -int drmScatterGatherFree (int fd,drm_handle_t handle) +drm_public int drmScatterGatherFree(int fd, drm_handle_t handle) {drm_scatter_gather_t sg;
@@ -2141,7 +2147,7 @@ int drmScatterGatherFree(int fd, drm_handle_t handle)* \internal * This function is a wrapper around the DRM_IOCTL_WAIT_VBLANK ioctl. */ -int drmWaitVBlank (int fd,drmVBlankPtr vbl) +drm_public int drmWaitVBlank(int fd, drmVBlankPtr vbl) {struct timespec timeout, cur;int ret;
@@ -2173,7 +2179,7 @@ out:return ret; } -int drmError (int err,const char *label) +drm_public int drmError(int err, const char *label) {switch (err) {case DRM_ERR_NO_DEVICE :
@@ -2210,7 +2216,7 @@ int drmError(int err, const char *label)* This function is a wrapper around the DRM_IOCTL_CONTROL ioctl, passing the * argument in a drm_control structure. */ -int drmCtlInstHandler (int fd,int irq) +drm_public int drmCtlInstHandler(int fd, int irq) {drm_control_t ctl;
@@ -2234,7 +2240,7 @@ int drmCtlInstHandler(int fd, int irq)* This function is a wrapper around the DRM_IOCTL_CONTROL ioctl, passing the * argument in a drm_control structure. */ -int drmCtlUninstHandler (int fd) +drm_public int drmCtlUninstHandler(int fd) {drm_control_t ctl;
@@ -2246,7 +2252,7 @@ int drmCtlUninstHandler(int fd)return 0 ; } -int drmFinish (int fd,int context,drmLockFlags flags) +drm_public int drmFinish(int fd, int context, drmLockFlags flags) {drm_lock_t lock;
@@ -2277,7 +2283,8 @@ int drmFinish(int fd, int context, drmLockFlags flags)* This function is a wrapper around the DRM_IOCTL_IRQ_BUSID ioctl, passing the * arguments in a drm_irq_busid structure. */ -int drmGetInterruptFromBusID (int fd,int busnum,int devnum,int funcnum) +drm_public int drmGetInterruptFromBusID(int fd, int busnum, int devnum, +int funcnum) {drm_irq_busid_t p;
@@ -2290,7 +2297,7 @@ int drmGetInterruptFromBusID(int fd, int busnum, int devnum, int funcnum)return p.irq; } -int drmAddContextTag (int fd,drm_context_t context,void *tag) +drm_public int drmAddContextTag(int fd, drm_context_t context, void *tag) {drmHashEntry *entry =drmGetEntry (fd);
@@ -2301,14 +2308,14 @@ int drmAddContextTag(int fd, drm_context_t context, void *tag)return 0 ; } -int drmDelContextTag (int fd,drm_context_t context) +drm_public int drmDelContextTag(int fd, drm_context_t context) {drmHashEntry *entry =drmGetEntry (fd);return drmHashDelete (entry->tagTable, context); } -void *drmGetContextTag (int fd,drm_context_t context) +drm_public void *drmGetContextTag(int fd, drm_context_t context) {drmHashEntry *entry =drmGetEntry (fd);void *value;
@@ -2319,8 +2326,8 @@ void *drmGetContextTag(int fd, drm_context_t context)return value; } -int drmAddContextPrivateMapping (int fd,drm_context_t ctx_id, -drm_handle_t handle) +drm_public int drmAddContextPrivateMapping(int fd, drm_context_t ctx_id, +drm_handle_t handle) {drm_ctx_priv_map_t map;
@@ -2333,8 +2340,8 @@ int drmAddContextPrivateMapping(int fd, drm_context_t ctx_id,return 0 ; } -int drmGetContextPrivateMapping (int fd,drm_context_t ctx_id, -drm_handle_t *handle) +drm_public int drmGetContextPrivateMapping(int fd, drm_context_t ctx_id, +drm_handle_t *handle) {drm_ctx_priv_map_t map;
@@ -2349,9 +2356,9 @@ int drmGetContextPrivateMapping(int fd, drm_context_t ctx_id,return 0 ; } -int drmGetMap (int fd,int idx,drm_handle_t *offset,drmSize *size, -drmMapType *type,drmMapFlags *flags,drm_handle_t *handle, -int *mtrr) +drm_public int drmGetMap(int fd, int idx, drm_handle_t *offset, drmSize *size, +drmMapType *type,drmMapFlags *flags, +drm_handle_t *handle,int *mtrr) {drm_map_t map;
@@ -2368,8 +2375,8 @@ int drmGetMap(int fd, int idx, drm_handle_t *offset, drmSize *size,return 0 ; } -int drmGetClient (int fd,int idx,int *auth,int *pid,int *uid, -unsigned long *magic,unsigned long *iocs) +drm_public int drmGetClient(int fd, int idx, int *auth, int *pid, int *uid, +unsigned long *magic,unsigned long *iocs) {drm_client_t client;
@@ -2385,7 +2392,7 @@ int drmGetClient(int fd, int idx, int *auth, int *pid, int *uid,return 0 ; } -int drmGetStats (int fd,drmStatsT *stats) +drm_public int drmGetStats(int fd, drmStatsT *stats) {drm_stats_t s;unsigned i;
@@ -2523,7 +2530,7 @@ int drmGetStats(int fd, drmStatsT *stats)* It issues a read-write ioctl given by * \code DRM_COMMAND_BASE + drmCommandIndex \endcode. */ -int drmSetInterfaceVersion (int fd,drmSetVersion *version) +drm_public int drmSetInterfaceVersion(int fd, drmSetVersion *version) {int retcode =0 ;drm_set_version_t sv;
@@ -2558,7 +2565,7 @@ int drmSetInterfaceVersion(int fd, drmSetVersion *version)* It issues a ioctl given by * \code DRM_COMMAND_BASE + drmCommandIndex \endcode. */ -int drmCommandNone (int fd,unsigned long drmCommandIndex) +drm_public int drmCommandNone(int fd, unsigned long drmCommandIndex) {unsigned long request;
@@ -2585,8 +2592,8 @@ int drmCommandNone(int fd, unsigned long drmCommandIndex)* It issues a read ioctl given by * \code DRM_COMMAND_BASE + drmCommandIndex \endcode. */ -int drmCommandRead (int fd,unsigned long drmCommandIndex,void *data, -unsigned long size) +drm_public int drmCommandRead(int fd, unsigned long drmCommandIndex, +void *data,unsigned long size) {unsigned long request;
@@ -2614,8 +2621,8 @@ int drmCommandRead(int fd, unsigned long drmCommandIndex, void *data,* It issues a write ioctl given by * \code DRM_COMMAND_BASE + drmCommandIndex \endcode. */ -int drmCommandWrite (int fd,unsigned long drmCommandIndex,void *data, -unsigned long size) +drm_public int drmCommandWrite(int fd, unsigned long drmCommandIndex, +void *data,unsigned long size) {unsigned long request;
@@ -2643,8 +2650,8 @@ int drmCommandWrite(int fd, unsigned long drmCommandIndex, void *data,* It issues a read-write ioctl given by * \code DRM_COMMAND_BASE + drmCommandIndex \endcode. */ -int drmCommandWriteRead (int fd,unsigned long drmCommandIndex,void *data, -unsigned long size) +drm_public int drmCommandWriteRead(int fd, unsigned long drmCommandIndex, +void *data,unsigned long size) {unsigned long request;
@@ -2666,14 +2673,13 @@ static struct {static int nr_fds =0 ; -int drmOpenOnce (void *unused, -const char *BusID, -int *newlyopened) +drm_public int drmOpenOnce(void *unused, const char *BusID, int *newlyopened) {return drmOpenOnceWithType (BusID, newlyopened,DRM_NODE_PRIMARY ); } -int drmOpenOnceWithType (const char *BusID,int *newlyopened,int type) +drm_public int drmOpenOnceWithType(const char *BusID, int *newlyopened, +int type) {int i;int fd;
@@ -2706,7 +2712,7 @@ int drmOpenOnceWithType(const char *BusID, int *newlyopened, int type)return fd; } -void drmCloseOnce (int fd) +drm_public void drmCloseOnce(int fd) {int i;
@@ -2725,17 +2731,17 @@ void drmCloseOnce(int fd) } } -int drmSetMaster (int fd) +drm_public int drmSetMaster(int fd) {return drmIoctl (fd,DRM_IOCTL_SET_MASTER ,NULL ); } -int drmDropMaster (int fd) +drm_public int drmDropMaster(int fd) {return drmIoctl (fd,DRM_IOCTL_DROP_MASTER ,NULL ); } -char *drmGetDeviceNameFromFd (int fd) +drm_public char *drmGetDeviceNameFromFd(int fd) {char name[128 ];struct stat sbuf;
@@ -2761,7 +2767,7 @@ char *drmGetDeviceNameFromFd(int fd)return strdup (name); } -int drmGetNodeTypeFromFd (int fd) +drm_public int drmGetNodeTypeFromFd(int fd) {struct stat sbuf;int maj, min, type;
@@ -2783,7 +2789,8 @@ int drmGetNodeTypeFromFd(int fd)return type; } -int drmPrimeHandleToFD (int fd,uint32_t handle,uint32_t flags,int *prime_fd) +drm_public int drmPrimeHandleToFD(int fd, uint32_t handle, uint32_t flags, +int *prime_fd) {struct drm_prime_handle args;int ret;
@@ -2800,7 +2807,7 @@ int drmPrimeHandleToFD(int fd, uint32_t handle, uint32_t flags, int *prime_fd)return 0 ; } -int drmPrimeFDToHandle (int fd,int prime_fd,uint32_t *handle) +drm_public int drmPrimeFDToHandle(int fd, int prime_fd, uint32_t *handle) {struct drm_prime_handle args;int ret;
@@ -2900,12 +2907,12 @@ static char *drmGetMinorNameForFD(int fd, int type)#endif } -char *drmGetPrimaryDeviceNameFromFd (int fd) +drm_public char *drmGetPrimaryDeviceNameFromFd(int fd) {return drmGetMinorNameForFD (fd,DRM_NODE_PRIMARY ); } -char *drmGetRenderDeviceNameFromFd (int fd) +drm_public char *drmGetRenderDeviceNameFromFd(int fd) {return drmGetMinorNameForFD (fd,DRM_NODE_RENDER ); }
@@ -3069,7 +3076,7 @@ static int drmParsePciBusInfo(int maj, int min, drmPciBusInfoPtr info)#endif } -int drmDevicesEqual (drmDevicePtr a,drmDevicePtr b) +drm_public int drmDevicesEqual(drmDevicePtr a, drmDevicePtr b) {if (a ==NULL || b ==NULL )return 0 ;
@@ -3269,7 +3276,7 @@ static void drmFreeHost1xDevice(drmDevicePtr device) } } -void drmFreeDevice (drmDevicePtr *device) +drm_public void drmFreeDevice(drmDevicePtr *device) {if (device ==NULL )return ;
@@ -3290,7 +3297,7 @@ void drmFreeDevice(drmDevicePtr *device) *device =NULL ; } -void drmFreeDevices (drmDevicePtr devices[],int count) +drm_public void drmFreeDevices(drmDevicePtr devices[], int count) {int i;
@@ -3812,7 +3819,7 @@ drm_device_has_rdev(drmDevicePtr device, dev_t find_rdev)* \note Unlike drmGetDevice it does not retrieve the pci device revision field * unless the DRM_DEVICE_GET_PCI_REVISION \p flag is set. */ -int drmGetDevice2 (int fd,uint32_t flags,drmDevicePtr *device) +drm_public int drmGetDevice2(int fd, uint32_t flags, drmDevicePtr *device) {#ifdef __OpenBSD__/*
@@ -3960,7 +3967,7 @@ int drmGetDevice2(int fd, uint32_t flags, drmDevicePtr *device)* * \return zero on success, negative error code otherwise. */ -int drmGetDevice (int fd,drmDevicePtr *device) +drm_public int drmGetDevice(int fd, drmDevicePtr *device) {return drmGetDevice2 (fd,DRM_DEVICE_GET_PCI_REVISION , device); }
@@ -3981,7 +3988,8 @@ int drmGetDevice(int fd, drmDevicePtr *device)* \note Unlike drmGetDevices it does not retrieve the pci device revision field * unless the DRM_DEVICE_GET_PCI_REVISION \p flag is set. */ -int drmGetDevices2 (uint32_t flags,drmDevicePtr devices[],int max_devices) +drm_public int drmGetDevices2(uint32_t flags, drmDevicePtr devices[], +int max_devices) {drmDevicePtr local_devices[MAX_DRM_NODES ];drmDevicePtr device;
@@ -4044,12 +4052,12 @@ int drmGetDevices2(uint32_t flags, drmDevicePtr devices[], int max_devices)* alternatively the number of devices stored in devices[], which is * capped by the max_devices. */ -int drmGetDevices (drmDevicePtr devices[],int max_devices) +drm_public int drmGetDevices(drmDevicePtr devices[], int max_devices) {return drmGetDevices2 (DRM_DEVICE_GET_PCI_REVISION , devices, max_devices); } -char *drmGetDeviceNameFromFd2 (int fd) +drm_public char *drmGetDeviceNameFromFd2(int fd) {#ifdef __linux__struct stat sbuf;
@@ -4121,7 +4129,7 @@ char *drmGetDeviceNameFromFd2(int fd)#endif } -int drmSyncobjCreate (int fd,uint32_t flags,uint32_t *handle) +drm_public int drmSyncobjCreate(int fd, uint32_t flags, uint32_t *handle) {struct drm_syncobj_create args;int ret;
@@ -4136,7 +4144,7 @@ int drmSyncobjCreate(int fd, uint32_t flags, uint32_t *handle)return 0 ; } -int drmSyncobjDestroy (int fd,uint32_t handle) +drm_public int drmSyncobjDestroy(int fd, uint32_t handle) {struct drm_syncobj_destroy args;
@@ -4145,7 +4153,7 @@ int drmSyncobjDestroy(int fd, uint32_t handle)return drmIoctl (fd,DRM_IOCTL_SYNCOBJ_DESTROY , &args); } -int drmSyncobjHandleToFD (int fd,uint32_t handle,int *obj_fd) +drm_public int drmSyncobjHandleToFD(int fd, uint32_t handle, int *obj_fd) {struct drm_syncobj_handle args;int ret;
@@ -4160,7 +4168,7 @@ int drmSyncobjHandleToFD(int fd, uint32_t handle, int *obj_fd)return 0 ; } -int drmSyncobjFDToHandle (int fd,int obj_fd,uint32_t *handle) +drm_public int drmSyncobjFDToHandle(int fd, int obj_fd, uint32_t *handle) {struct drm_syncobj_handle args;int ret;
@@ -4175,7 +4183,8 @@ int drmSyncobjFDToHandle(int fd, int obj_fd, uint32_t *handle)return 0 ; } -int drmSyncobjImportSyncFile (int fd,uint32_t handle,int sync_file_fd) +drm_public int drmSyncobjImportSyncFile(int fd, uint32_t handle, +int sync_file_fd) {struct drm_syncobj_handle args;
@@ -4186,7 +4195,8 @@ int drmSyncobjImportSyncFile(int fd, uint32_t handle, int sync_file_fd)return drmIoctl (fd,DRM_IOCTL_SYNCOBJ_FD_TO_HANDLE , &args); } -int drmSyncobjExportSyncFile (int fd,uint32_t handle,int *sync_file_fd) +drm_public int drmSyncobjExportSyncFile(int fd, uint32_t handle, +int *sync_file_fd) {struct drm_syncobj_handle args;int ret;
@@ -4202,9 +4212,9 @@ int drmSyncobjExportSyncFile(int fd, uint32_t handle, int *sync_file_fd)return 0 ; } -int drmSyncobjWait (int fd,uint32_t *handles,unsigned num_handles, -int64_t timeout_nsec,unsigned flags, -uint32_t *first_signaled) +drm_public int drmSyncobjWait(int fd, uint32_t *handles, unsigned num_handles, +int64_t timeout_nsec,unsigned flags, +uint32_t *first_signaled) {struct drm_syncobj_wait args;int ret;
@@ -4224,7 +4234,8 @@ int drmSyncobjWait(int fd, uint32_t *handles, unsigned num_handles,return ret; } -int drmSyncobjReset (int fd,const uint32_t *handles,uint32_t handle_count) +drm_public int drmSyncobjReset(int fd, const uint32_t *handles, +uint32_t handle_count) {struct drm_syncobj_array args;int ret;
@@ -4237,7 +4248,8 @@ int drmSyncobjReset(int fd, const uint32_t *handles, uint32_t handle_count)return ret; } -int drmSyncobjSignal (int fd,const uint32_t *handles,uint32_t handle_count) +drm_public int drmSyncobjSignal(int fd, const uint32_t *handles, +uint32_t handle_count) {struct drm_syncobj_array args;int ret;
xf86drmHash.c +8 -7
@@ -71,6 +71,7 @@#include <stdio.h> #include <stdlib.h> +#include "libdrm_macros.h" #include "xf86drm.h" #include "xf86drmHash.h"
@@ -101,7 +102,7 @@ static unsigned long HashHash(unsigned long key)return hash; } -void *drmHashCreate (void ) +drm_public void *drmHashCreate(void) {HashTablePtr table;int i;
@@ -118,7 +119,7 @@ void *drmHashCreate(void)return table; } -int drmHashDestroy (void *t) +drm_public int drmHashDestroy(void *t) {HashTablePtr table = (HashTablePtr )t;HashBucketPtr bucket;
@@ -169,7 +170,7 @@ static HashBucketPtr HashFind(HashTablePtr table,return NULL ; } -int drmHashLookup (void *t,unsigned long key,void **value) +drm_public int drmHashLookup(void *t, unsigned long key, void **value) {HashTablePtr table = (HashTablePtr )t;HashBucketPtr bucket;
@@ -182,7 +183,7 @@ int drmHashLookup(void *t, unsigned long key, void **value)return 0 ;/* Found */ } -int drmHashInsert (void *t,unsigned long key,void *value) +drm_public int drmHashInsert(void *t, unsigned long key, void *value) {HashTablePtr table = (HashTablePtr )t;HashBucketPtr bucket;
@@ -201,7 +202,7 @@ int drmHashInsert(void *t, unsigned long key, void *value)return 0 ;/* Added to table */ } -int drmHashDelete (void *t,unsigned long key) +drm_public int drmHashDelete(void *t, unsigned long key) {HashTablePtr table = (HashTablePtr )t;unsigned long hash;
@@ -218,7 +219,7 @@ int drmHashDelete(void *t, unsigned long key)return 0 ; } -int drmHashNext (void *t,unsigned long *key,void **value) +drm_public int drmHashNext(void *t, unsigned long *key, void **value) {HashTablePtr table = (HashTablePtr )t;
@@ -235,7 +236,7 @@ int drmHashNext(void *t, unsigned long *key, void **value)return 0 ; } -int drmHashFirst (void *t,unsigned long *key,void **value) +drm_public int drmHashFirst(void *t, unsigned long *key, void **value) {HashTablePtr table = (HashTablePtr )t;
xf86drmMode.c +85 -73
493 lines not on this page · raw message
xf86drmRandom.c +5 -4
@@ -74,12 +74,13 @@#include <stdio.h> #include <stdlib.h> +#include "libdrm_macros.h" #include "xf86drm.h" #include "xf86drmRandom.h" #define RANDOM_MAGIC 0xfeedbeef -void *drmRandomCreate (unsigned long seed) +drm_public void *drmRandomCreate(unsigned long seed) {RandomState *state;
@@ -109,13 +110,13 @@ void *drmRandomCreate(unsigned long seed)return state; } -int drmRandomDestroy (void *state) +drm_public int drmRandomDestroy(void *state) {drmFree (state);return 0 ; } -unsigned long drmRandom (void *state) +drm_public unsigned long drmRandom (void *state) {RandomState *s = (RandomState *)state;unsigned long hi;
@@ -129,7 +130,7 @@ unsigned long drmRandom(void *state)return s->seed; } -double drmRandomDouble (void *state) +drm_public double drmRandomDouble(void *state) {RandomState *s = (RandomState *)state;
xf86drmSL.c +12 -11
@@ -41,6 +41,7 @@#include <stdio.h> #include <stdlib.h> +#include "libdrm_macros.h" #include "xf86drm.h" #define SL_LIST_MAGIC 0xfacade00LU
@@ -97,7 +98,7 @@ static int SLRandomLevel(void)return level; } -void *drmSLCreate (void ) +drm_public void *drmSLCreate(void) {SkipListPtr list;int i;
@@ -114,7 +115,7 @@ void *drmSLCreate(void)return list; } -int drmSLDestroy (void *l) +drm_public int drmSLDestroy(void *l) {SkipListPtr list = (SkipListPtr )l;SLEntryPtr entry;
@@ -151,7 +152,7 @@ static SLEntryPtr SLLocate(void *l, unsigned long key, SLEntryPtr *update)return entry->forward[0 ]; } -int drmSLInsert (void *l,unsigned long key,void *value) +drm_public int drmSLInsert(void *l, unsigned long key, void *value) {SkipListPtr list = (SkipListPtr )l;SLEntryPtr entry;
@@ -184,7 +185,7 @@ int drmSLInsert(void *l, unsigned long key, void *value)return 0 ;/* Added to table */ } -int drmSLDelete (void *l,unsigned long key) +drm_public int drmSLDelete(void *l, unsigned long key) {SkipListPtr list = (SkipListPtr )l;SLEntryPtr update[SL_MAX_LEVEL +1 ];
@@ -211,7 +212,7 @@ int drmSLDelete(void *l, unsigned long key)return 0 ; } -int drmSLLookup (void *l,unsigned long key,void **value) +drm_public int drmSLLookup(void *l, unsigned long key, void **value) {SkipListPtr list = (SkipListPtr )l;SLEntryPtr update[SL_MAX_LEVEL +1 ];
@@ -227,9 +228,9 @@ int drmSLLookup(void *l, unsigned long key, void **value)return -1 ; } -int drmSLLookupNeighbors (void *l,unsigned long key, -unsigned long *prev_key,void **prev_value, -unsigned long *next_key,void **next_value) +drm_public int drmSLLookupNeighbors(void *l, unsigned long key, +unsigned long *prev_key,void **prev_value, +unsigned long *next_key,void **next_value) {SkipListPtr list = (SkipListPtr )l;SLEntryPtr update[SL_MAX_LEVEL +1 ] = {0 };
@@ -253,7 +254,7 @@ int drmSLLookupNeighbors(void *l, unsigned long key,return retcode; } -int drmSLNext (void *l,unsigned long *key,void **value) +drm_public int drmSLNext(void *l, unsigned long *key, void **value) {SkipListPtr list = (SkipListPtr )l;SLEntryPtr entry;
@@ -272,7 +273,7 @@ int drmSLNext(void *l, unsigned long *key, void **value)return 0 ; } -int drmSLFirst (void *l,unsigned long *key,void **value) +drm_public int drmSLFirst(void *l, unsigned long *key, void **value) {SkipListPtr list = (SkipListPtr )l;
@@ -283,7 +284,7 @@ int drmSLFirst(void *l, unsigned long *key, void **value) }/* Dump internal data structures for debugging. */ -void drmSLDump (void *l) +drm_public void drmSLDump(void *l) {SkipListPtr list = (SkipListPtr )l;SLEntryPtr entry;
Signature · 6 lines
2.17.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v2 6/13 etnaviv: annotate public functions
In reply to Lucas De Marchiwhile read sym; do
read f func line _ <<<$(cscope -d -L -1 $sym)
if [ ! -z "$f" ]; then
sed -i "${line}s/^/drm_public /" $f
fidone < /tmp/a.txt
In which /tmp/a.txt contains the public symbols from etnaviv-symbol-check. The idea here will be to switch the default visibility to hidden so we don't export symbols we shouldn't.
--- etnaviv/etnaviv_bo.c | 25 +++++++++++++------------ etnaviv/etnaviv_cmd_stream.c | 21 ++++++++++++--------- etnaviv/etnaviv_device.c | 10 +++++----- etnaviv/etnaviv_gpu.c | 6 +++--- etnaviv/etnaviv_perfmon.c | 8 ++++---- etnaviv/etnaviv_pipe.c | 8 ++++---- 6 files changed, 41 insertions(+), 37 deletions(-)
etnaviv/etnaviv_bo.c +13 -12
@@ -104,7 +104,7 @@ static struct etna_bo *bo_from_handle(struct etna_device *dev, }/* allocate a new (un-tiled) buffer object */ -struct etna_bo *etna_bo_new (struct etna_device *dev,uint32_t size, +drm_public struct etna_bo *etna_bo_new(struct etna_device *dev, uint32_t size,uint32_t flags) {struct etna_bo *bo;
@@ -131,7 +131,7 @@ struct etna_bo *etna_bo_new(struct etna_device *dev, uint32_t size,return bo; } -struct etna_bo *etna_bo_ref (struct etna_bo *bo) +drm_public struct etna_bo *etna_bo_ref(struct etna_bo *bo) {atomic_inc (&bo->refcnt);
@@ -159,7 +159,8 @@ static int get_buffer_info(struct etna_bo *bo) }/* import a buffer object from DRI2 name */ -struct etna_bo *etna_bo_from_name (struct etna_device *dev,uint32_t name) +drm_public struct etna_bo *etna_bo_from_name(struct etna_device *dev, +uint32_t name) {struct etna_bo *bo;struct drm_gem_open req = {
@@ -196,7 +197,7 @@ out_unlock:* fd so caller should close() the fd when it is otherwise done * with it (even if it is still using the 'struct etna_bo *') */ -struct etna_bo *etna_bo_from_dmabuf (struct etna_device *dev,int fd) +drm_public struct etna_bo *etna_bo_from_dmabuf(struct etna_device *dev, int fd) {struct etna_bo *bo;int ret, size;
@@ -231,7 +232,7 @@ out_unlock: }/* destroy a buffer object */ -void etna_bo_del (struct etna_bo *bo) +drm_public void etna_bo_del(struct etna_bo *bo) {struct etna_device *dev = bo->dev;
@@ -253,7 +254,7 @@ out: }/* get the global flink/DRI2 buffer name */ -int etna_bo_get_name (struct etna_bo *bo,uint32_t *name) +drm_public int etna_bo_get_name(struct etna_bo *bo, uint32_t *name) {if (!bo->name) { struct drm_gem_flink req = {
@@ -277,7 +278,7 @@ int etna_bo_get_name(struct etna_bo *bo, uint32_t *name)return 0 ; } -uint32_t etna_bo_handle (struct etna_bo *bo) +drm_public uint32_t etna_bo_handle(struct etna_bo *bo) {return bo->handle; }
@@ -285,7 +286,7 @@ uint32_t etna_bo_handle(struct etna_bo *bo)/* caller owns the dmabuf fd that is returned and is responsible * to close() it when done */ -int etna_bo_dmabuf (struct etna_bo *bo) +drm_public int etna_bo_dmabuf(struct etna_bo *bo) {int ret, prime_fd;
@@ -301,12 +302,12 @@ int etna_bo_dmabuf(struct etna_bo *bo)return prime_fd; } -uint32_t etna_bo_size (struct etna_bo *bo) +drm_public uint32_t etna_bo_size(struct etna_bo *bo) {return bo->size; } -void *etna_bo_map (struct etna_bo *bo) +drm_public void *etna_bo_map(struct etna_bo *bo) {if (!bo->map) {if (!bo->offset) {
@@ -324,7 +325,7 @@ void *etna_bo_map(struct etna_bo *bo)return bo->map; } -int etna_bo_cpu_prep (struct etna_bo *bo,uint32_t op) +drm_public int etna_bo_cpu_prep(struct etna_bo *bo, uint32_t op) {struct drm_etnaviv_gem_cpu_prep req = { .handle = bo->handle,
@@ -337,7 +338,7 @@ int etna_bo_cpu_prep(struct etna_bo *bo, uint32_t op) &req, sizeof(req)); } -void etna_bo_cpu_fini (struct etna_bo *bo) +drm_public void etna_bo_cpu_fini(struct etna_bo *bo) {struct drm_etnaviv_gem_cpu_fini req = { .handle = bo->handle,
etnaviv/etnaviv_cmd_stream.c +12 -9
@@ -55,7 +55,8 @@ etna_cmd_stream_priv(struct etna_cmd_stream *stream)return (struct etna_cmd_stream_priv *)stream; } -struct etna_cmd_stream *etna_cmd_stream_new (struct etna_pipe *pipe,uint32_t size, +drm_public struct etna_cmd_stream *etna_cmd_stream_new(struct etna_pipe *pipe, +uint32_t size,void (*reset_notify)(struct etna_cmd_stream *stream,void *priv),void *priv) {
@@ -95,7 +96,7 @@ fail:return NULL ; } -void etna_cmd_stream_del (struct etna_cmd_stream *stream) +drm_public void etna_cmd_stream_del(struct etna_cmd_stream *stream) {struct etna_cmd_stream_priv *priv =etna_cmd_stream_priv (stream);
@@ -119,7 +120,7 @@ static void reset_buffer(struct etna_cmd_stream *stream) priv->reset_notify (stream, priv->reset_notify_priv); } -uint32_t etna_cmd_stream_timestamp (struct etna_cmd_stream *stream) +drm_public uint32_t etna_cmd_stream_timestamp(struct etna_cmd_stream *stream) {return etna_cmd_stream_priv (stream)->last_timestamp; }
@@ -222,20 +223,21 @@ static void flush(struct etna_cmd_stream *stream, int in_fence_fd, *out_fence_fd = req.fence_fd; } -void etna_cmd_stream_flush (struct etna_cmd_stream *stream) +drm_public void etna_cmd_stream_flush(struct etna_cmd_stream *stream) {flush (stream,-1 ,NULL );reset_buffer (stream); } -void etna_cmd_stream_flush2 (struct etna_cmd_stream *stream,int in_fence_fd, -int *out_fence_fd) +drm_public void etna_cmd_stream_flush2(struct etna_cmd_stream *stream, +int in_fence_fd, +int *out_fence_fd) {flush (stream, in_fence_fd, out_fence_fd);reset_buffer (stream); } -void etna_cmd_stream_finish (struct etna_cmd_stream *stream) +drm_public void etna_cmd_stream_finish(struct etna_cmd_stream *stream) {struct etna_cmd_stream_priv *priv =etna_cmd_stream_priv (stream);
@@ -244,7 +246,8 @@ void etna_cmd_stream_finish(struct etna_cmd_stream *stream)reset_buffer (stream); } -void etna_cmd_stream_reloc (struct etna_cmd_stream *stream,const struct etna_reloc *r) +drm_public void etna_cmd_stream_reloc(struct etna_cmd_stream *stream, +const struct etna_reloc *r) {struct etna_cmd_stream_priv *priv =etna_cmd_stream_priv (stream);struct drm_etnaviv_gem_submit_reloc *reloc;
@@ -261,7 +264,7 @@ void etna_cmd_stream_reloc(struct etna_cmd_stream *stream, const struct etna_reletna_cmd_stream_emit (stream, addr); } -void etna_cmd_stream_perf (struct etna_cmd_stream *stream,const struct etna_perf *p) +drm_public void etna_cmd_stream_perf(struct etna_cmd_stream *stream, const struct etna_perf *p) {struct etna_cmd_stream_priv *priv =etna_cmd_stream_priv (stream);struct drm_etnaviv_gem_submit_pmr *pmr;
etnaviv/etnaviv_device.c +5 -5
@@ -41,7 +41,7 @@static pthread_mutex_t table_lock =PTHREAD_MUTEX_INITIALIZER ; -struct etna_device *etna_device_new (int fd) +drm_public struct etna_device *etna_device_new(int fd) {struct etna_device *dev =calloc (sizeof (*dev),1 );
@@ -59,7 +59,7 @@ struct etna_device *etna_device_new(int fd)/* like etna_device_new() but creates it's own private dup() of the fd * which is close()d when the device is finalized. */ -struct etna_device *etna_device_new_dup (int fd) +drm_public struct etna_device *etna_device_new_dup(int fd) {int dup_fd =dup (fd);struct etna_device *dev =etna_device_new (dup_fd);
@@ -72,7 +72,7 @@ struct etna_device *etna_device_new_dup(int fd)return dev; } -struct etna_device *etna_device_ref (struct etna_device *dev) +drm_public struct etna_device *etna_device_ref(struct etna_device *dev) {atomic_inc (&dev->refcnt);
@@ -99,7 +99,7 @@ drm_private void etna_device_del_locked(struct etna_device *dev)etna_device_del_impl (dev); } -void etna_device_del (struct etna_device *dev) +drm_public void etna_device_del(struct etna_device *dev) {if (!atomic_dec_and_test (&dev->refcnt))return ;
@@ -109,7 +109,7 @@ void etna_device_del(struct etna_device *dev)pthread_mutex_unlock (&table_lock); } -int etna_device_fd (struct etna_device *dev) +drm_public int etna_device_fd(struct etna_device *dev) {return dev->fd; }
etnaviv/etnaviv_gpu.c +3 -3
@@ -44,7 +44,7 @@ static uint64_t get_param(struct etna_device *dev, uint32_t core, uint32_t paramreturn req.value; } -struct etna_gpu *etna_gpu_new (struct etna_device *dev,unsigned int core) +drm_public struct etna_gpu *etna_gpu_new(struct etna_device *dev, unsigned int core) {struct etna_gpu *gpu;
@@ -73,12 +73,12 @@ fail:return NULL ; } -void etna_gpu_del (struct etna_gpu *gpu) +drm_public void etna_gpu_del(struct etna_gpu *gpu) {free (gpu); } -int etna_gpu_get_param (struct etna_gpu *gpu,enum etna_param_id param, +drm_public int etna_gpu_get_param(struct etna_gpu *gpu, enum etna_param_id param,uint64_t *value) {struct etna_device *dev = gpu->dev;
etnaviv/etnaviv_perfmon.c +4 -4
@@ -121,7 +121,7 @@ static void etna_perfmon_free_domains(struct etna_perfmon *pm) } } -struct etna_perfmon *etna_perfmon_create (struct etna_pipe *pipe) +drm_public struct etna_perfmon *etna_perfmon_create(struct etna_pipe *pipe) {struct etna_perfmon *pm;int ret;
@@ -147,7 +147,7 @@ fail:return NULL ; } -void etna_perfmon_del (struct etna_perfmon *pm) +drm_public void etna_perfmon_del(struct etna_perfmon *pm) {if (!pm)return ;
@@ -156,7 +156,7 @@ void etna_perfmon_del(struct etna_perfmon *pm)free (pm); } -struct etna_perfmon_domain *etna_perfmon_get_dom_by_name (struct etna_perfmon *pm,const char *name) +drm_public struct etna_perfmon_domain *etna_perfmon_get_dom_by_name(struct etna_perfmon *pm, const char *name) {struct etna_perfmon_domain *dom;
@@ -170,7 +170,7 @@ struct etna_perfmon_domain *etna_perfmon_get_dom_by_name(struct etna_perfmon *pmreturn NULL ; } -struct etna_perfmon_signal *etna_perfmon_get_sig_by_name (struct etna_perfmon_domain *dom,const char *name) +drm_public struct etna_perfmon_signal *etna_perfmon_get_sig_by_name(struct etna_perfmon_domain *dom, const char *name) {struct etna_perfmon_signal *signal;
etnaviv/etnaviv_pipe.c +4 -4
@@ -26,12 +26,12 @@#include "etnaviv_priv.h" -int etna_pipe_wait (struct etna_pipe *pipe,uint32_t timestamp,uint32_t ms) +drm_public int etna_pipe_wait(struct etna_pipe *pipe, uint32_t timestamp, uint32_t ms) {return etna_pipe_wait_ns (pipe, timestamp, ms *1000000 ); } -int etna_pipe_wait_ns (struct etna_pipe *pipe,uint32_t timestamp,uint64_t ns) +drm_public int etna_pipe_wait_ns(struct etna_pipe *pipe, uint32_t timestamp, uint64_t ns) {struct etna_device *dev = pipe->gpu->dev;int ret;
@@ -55,12 +55,12 @@ int etna_pipe_wait_ns(struct etna_pipe *pipe, uint32_t timestamp, uint64_t ns)return 0 ; } -void etna_pipe_del (struct etna_pipe *pipe) +drm_public void etna_pipe_del(struct etna_pipe *pipe) {free (pipe); } -struct etna_pipe *etna_pipe_new (struct etna_gpu *gpu,enum etna_pipe_id id) +drm_public struct etna_pipe *etna_pipe_new(struct etna_gpu *gpu, enum etna_pipe_id id) {struct etna_pipe *pipe;
Signature · 6 lines
2.17.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v2 7/13 freedreno: annotate public functions
In reply to Lucas De Marchiwhile read sym; do
read f func line _ <<<$(cscope -d -L -1 $sym)
if [ ! -z "$f" ]; then
sed -i "${line}s/^/drm_public /" $f
fidone < /tmp/a.txt
In which /tmp/a.txt contains the public symbols from freedreno-symbol-check. The idea here will be to switch the default visibility to hidden so we don't export symbols we shouldn't.
--- freedreno/freedreno_bo.c | 32 ++++++++++++------------- freedreno/freedreno_device.c | 12 +++++----- freedreno/freedreno_pipe.c | 14 +++++------ freedreno/freedreno_ringbuffer.c | 40 ++++++++++++++++---------------- 4 files changed, 49 insertions(+), 49 deletions(-)
freedreno/freedreno_bo.c +16 -16
@@ -79,7 +79,7 @@ static struct fd_bo * bo_from_handle(struct fd_device *dev, }struct fd_bo * -fd_bo_new (struct fd_device *dev,uint32_t size,uint32_t flags) +drm_public fd_bo_new(struct fd_device *dev, uint32_t size, uint32_t flags) {struct fd_bo *bo =NULL ;uint32_t handle;
@@ -104,7 +104,7 @@ fd_bo_new(struct fd_device *dev, uint32_t size, uint32_t flags) }struct fd_bo * -fd_bo_from_handle (struct fd_device *dev,uint32_t handle,uint32_t size) +drm_public fd_bo_from_handle(struct fd_device *dev, uint32_t handle, uint32_t size) {struct fd_bo *bo =NULL ;
@@ -125,7 +125,7 @@ out_unlock: }struct fd_bo * -fd_bo_from_dmabuf (struct fd_device *dev,int fd) +drm_public fd_bo_from_dmabuf(struct fd_device *dev, int fd) {int ret, size;uint32_t handle;
@@ -156,7 +156,7 @@ out_unlock: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,
@@ -191,23 +191,23 @@ out_unlock:return bo; } -uint64_t fd_bo_get_iova (struct fd_bo *bo) +drm_public uint64_t fd_bo_get_iova(struct fd_bo *bo) {return bo->funcs->iova (bo); } -void fd_bo_put_iova (struct fd_bo *bo) +drm_public void fd_bo_put_iova(struct fd_bo *bo) {/* currently a no-op */ } -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;
@@ -250,7 +250,7 @@ drm_private 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 = {
@@ -274,12 +274,12 @@ 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; } -int fd_bo_dmabuf (struct fd_bo *bo) +drm_public int fd_bo_dmabuf(struct fd_bo *bo) {int ret, prime_fd;
@@ -295,12 +295,12 @@ int fd_bo_dmabuf(struct fd_bo *bo)return prime_fd; } -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;
@@ -322,18 +322,18 @@ 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); }#if !HAVE_FREEDRENO_KGSL -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) {return NULL ; }
freedreno/freedreno_device.c +6 -6
@@ -38,7 +38,7 @@ static pthread_mutex_t table_lock = PTHREAD_MUTEX_INITIALIZER;struct fd_device *kgsl_device_new (int fd);struct fd_device *msm_device_new (int fd); -struct fd_device *fd_device_new (int fd) +drm_public struct fd_device * fd_device_new(int fd) {struct fd_device *dev;drmVersionPtr version;
@@ -89,7 +89,7 @@ out:/* 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) {int dup_fd =dup (fd);struct fd_device *dev =fd_device_new (dup_fd);
@@ -100,7 +100,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;
@@ -124,7 +124,7 @@ drm_private 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 ;
@@ -133,12 +133,12 @@ void fd_device_del(struct fd_device *dev)pthread_mutex_unlock (&table_lock); } -int fd_device_fd (struct fd_device *dev) +drm_public int fd_device_fd(struct fd_device *dev) {return dev->fd; } -enum fd_version fd_device_version (struct fd_device *dev) +drm_public enum fd_version fd_device_version(struct fd_device *dev) {return dev->version; }
freedreno/freedreno_pipe.c +7 -7
@@ -34,7 +34,7 @@* lower priorities */ struct fd_pipe * -fd_pipe_new2 (struct fd_device *dev,enum fd_pipe_id id,uint32_t prio) +drm_public fd_pipe_new2(struct fd_device *dev, enum fd_pipe_id id, uint32_t prio) {struct fd_pipe *pipe;uint64_t val;
@@ -66,36 +66,36 @@ fd_pipe_new2(struct fd_device *dev, enum fd_pipe_id id, uint32_t prio) }struct fd_pipe * -fd_pipe_new (struct fd_device *dev,enum fd_pipe_id id) +drm_public fd_pipe_new(struct fd_device *dev, enum fd_pipe_id id) {return fd_pipe_new2 (dev, id,1 ); } -struct fd_pipe *fd_pipe_ref (struct fd_pipe *pipe) +drm_public struct fd_pipe * fd_pipe_ref(struct fd_pipe *pipe) {atomic_inc (&pipe->refcnt);return pipe; } -void fd_pipe_del (struct fd_pipe *pipe) +drm_public void fd_pipe_del(struct fd_pipe *pipe) {if (!atomic_dec_and_test (&pipe->refcnt))return ; pipe->funcs->destroy (pipe); } -int fd_pipe_get_param (struct fd_pipe *pipe, +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 fd_pipe_wait_timeout (pipe, timestamp, ~0 ); } -int fd_pipe_wait_timeout (struct fd_pipe *pipe,uint32_t timestamp, +drm_public int fd_pipe_wait_timeout(struct fd_pipe *pipe, uint32_t timestamp,uint64_t timeout) {return pipe->funcs->wait (pipe, timestamp, timeout);
freedreno/freedreno_ringbuffer.c +20 -20
@@ -53,13 +53,13 @@ ringbuffer_new(struct fd_pipe *pipe, uint32_t size, }struct fd_ringbuffer * -fd_ringbuffer_new (struct fd_pipe *pipe,uint32_t size) +drm_public fd_ringbuffer_new(struct fd_pipe *pipe, uint32_t size) {return ringbuffer_new (pipe, size,0 ); }struct fd_ringbuffer * -fd_ringbuffer_new_object (struct fd_pipe *pipe,uint32_t size) +drm_public fd_ringbuffer_new_object(struct fd_pipe *pipe, uint32_t size) {/* we can't really support "growable" rb's in general for * stateobj's since we need a single gpu addr (ie. can't
@@ -69,7 +69,7 @@ fd_ringbuffer_new_object(struct fd_pipe *pipe, uint32_t size)return ringbuffer_new (pipe, size,FD_RINGBUFFER_OBJECT ); } -void fd_ringbuffer_del (struct fd_ringbuffer *ring) +drm_public void fd_ringbuffer_del(struct fd_ringbuffer *ring) {if (!(ring->flags &FD_RINGBUFFER_OBJECT ))fd_ringbuffer_reset (ring);
@@ -80,7 +80,7 @@ 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, +drm_public void fd_ringbuffer_set_parent(struct fd_ringbuffer *ring,struct fd_ringbuffer *parent) {/* state objects should not be parented! */
@@ -88,7 +88,7 @@ void fd_ringbuffer_set_parent(struct fd_ringbuffer *ring, 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 )
@@ -98,18 +98,18 @@ void fd_ringbuffer_reset(struct fd_ringbuffer *ring) ring->funcs->reset (ring); } -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,-1 ,NULL ); } -int fd_ringbuffer_flush2 (struct fd_ringbuffer *ring,int in_fence_fd, +drm_public int fd_ringbuffer_flush2(struct fd_ringbuffer *ring, int in_fence_fd,int *out_fence_fd) {return ring->funcs->flush (ring, ring->last_start, in_fence_fd, out_fence_fd); } -void fd_ringbuffer_grow (struct fd_ringbuffer *ring,uint32_t ndwords) +drm_public void fd_ringbuffer_grow(struct fd_ringbuffer *ring, uint32_t ndwords) {assert (ring->funcs->grow);/* unsupported on kgsl */
@@ -125,25 +125,25 @@ void fd_ringbuffer_grow(struct fd_ringbuffer *ring, uint32_t ndwords) ring->cur = ring->last_start = ring->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, +drm_public void fd_ringbuffer_reloc(struct fd_ringbuffer *ring,const struct fd_reloc *reloc) {assert (ring->pipe->gpu_id <500 ); ring->funcs->emit_reloc (ring, reloc); } -void fd_ringbuffer_reloc2 (struct fd_ringbuffer *ring, +drm_public void fd_ringbuffer_reloc2(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, +drm_public void fd_ringbuffer_emit_reloc_ring(struct fd_ringbuffer *ring,struct fd_ringmarker *target,struct fd_ringmarker *end) {uint32_t submit_offset, size;
@@ -158,7 +158,7 @@ void fd_ringbuffer_emit_reloc_ring(struct fd_ringbuffer *ring, ring->funcs->emit_reloc_ring (ring, target->ring,0 , submit_offset, size); } -uint32_t fd_ringbuffer_cmd_count (struct fd_ringbuffer *ring) +drm_public uint32_t fd_ringbuffer_cmd_count(struct fd_ringbuffer *ring) {if (!ring->funcs->cmd_count)return 1 ;
@@ -166,7 +166,7 @@ uint32_t fd_ringbuffer_cmd_count(struct fd_ringbuffer *ring) }uint32_t -fd_ringbuffer_emit_reloc_ring_full (struct fd_ringbuffer *ring, +drm_public fd_ringbuffer_emit_reloc_ring_full(struct fd_ringbuffer *ring,struct fd_ringbuffer *target,uint32_t cmd_idx) {uint32_t size =offset_bytes (target->cur, target->start);
@@ -174,7 +174,7 @@ fd_ringbuffer_emit_reloc_ring_full(struct fd_ringbuffer *ring, }uint32_t -fd_ringbuffer_size (struct fd_ringbuffer *ring) +drm_public fd_ringbuffer_size(struct fd_ringbuffer *ring) {/* only really needed for stateobj ringbuffers, and won't really * do what you expect for growable rb's.. so lets just restrict
@@ -188,7 +188,7 @@ fd_ringbuffer_size(struct fd_ringbuffer *ring)* Deprecated ringmarker API: */ -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 ;
@@ -205,23 +205,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, +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,-1 ,NULL );
Signature · 6 lines
2.17.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v2 8/13 omap: annotate public functions
In reply to Lucas De Marchiwhile read sym; do
read f func line _ <<<$(cscope -d -L -1 $sym)
if [ ! -z "$f" ]; then
sed -i "${line}s/^/drm_public /" $f
fidone < /tmp/a.txt
In which /tmp/a.txt contains the public symbols from omap-symbol-check. The idea here will be to switch the default visibility to hidden so we don't export symbols we shouldn't.
--- omap/omap_drm.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-)
omap/omap_drm.c +18 -18
@@ -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 ;
@@ -129,7 +129,7 @@ void omap_device_del(struct omap_device *dev) }int -omap_get_param (struct omap_device *dev,uint64_t param,uint64_t *value) +drm_public omap_get_param(struct omap_device *dev, uint64_t param, uint64_t *value) {struct drm_omap_param req = { .param = param,
@@ -147,7 +147,7 @@ omap_get_param(struct omap_device *dev, uint64_t param, uint64_t *value) }int -omap_set_param (struct omap_device *dev,uint64_t param,uint64_t value) +drm_public omap_set_param(struct omap_device *dev, uint64_t param, uint64_t value) {struct drm_omap_param req = { .param = param,
@@ -227,7 +227,7 @@ 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 omap_bo_new(struct omap_device *dev, uint32_t size, uint32_t flags) {union omap_gem_size gsize = { .bytes = size,
@@ -240,7 +240,7 @@ omap_bo_new(struct omap_device *dev, uint32_t size, uint32_t flags)/* allocate a new buffer object */ struct omap_bo * -omap_bo_new_tiled (struct omap_device *dev,uint32_t width, +drm_public omap_bo_new_tiled(struct omap_device *dev, uint32_t width,uint32_t height,uint32_t flags) {union omap_gem_size gsize = {
@@ -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;
@@ -282,7 +282,7 @@ 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 omap_bo_from_name(struct omap_device *dev, uint32_t name) {struct omap_bo *bo =NULL ;struct drm_gem_open req = {
@@ -316,7 +316,7 @@ fail:* 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 omap_bo_from_dmabuf(struct omap_device *dev, int fd) {struct omap_bo *bo =NULL ;struct drm_prime_handle req = {
@@ -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,
Signature · 6 lines
2.17.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v2 9/13 radeon: annotate public functions
In reply to Lucas De Marchiwhile read sym; do
read f func line _ <<<$(cscope -d -L -1 $sym)
if [ ! -z "$f" ]; then
sed -i "${line}s/^/drm_public /" $f
fidone < /tmp/a.txt
In which /tmp/a.txt contains the public symbols from radeon-symbol-check. The idea here will be to switch the default visibility to hidden so we don't export symbols we shouldn't.
--- radeon/radeon_bo.c | 24 ++++++++++++------------ radeon/radeon_bo_gem.c | 16 ++++++++-------- radeon/radeon_cs.c | 24 ++++++++++++------------ radeon/radeon_cs_gem.c | 4 ++-- radeon/radeon_cs_space.c | 6 +++--- radeon/radeon_surface.c | 8 ++++---- 6 files changed, 41 insertions(+), 41 deletions(-)
radeon/radeon_bo.c +12 -12
@@ -33,7 +33,7 @@#include <radeon_bo.h> #include <radeon_bo_int.h> -void radeon_bo_debug (struct radeon_bo *bo,const char *op) +drm_public void radeon_bo_debug(struct radeon_bo *bo, const char *op) {struct radeon_bo_int *boi = (struct radeon_bo_int *)bo;
@@ -41,7 +41,7 @@ void radeon_bo_debug(struct radeon_bo *bo, const char *op) op, bo, bo->handle, boi->size, boi->cref); } -struct radeon_bo * +drm_public struct radeon_bo *radeon_bo_open (struct radeon_bo_manager *bom,uint32_t handle,uint32_t size,uint32_t alignment,uint32_t domains,uint32_t flags) {
@@ -50,14 +50,14 @@ radeon_bo_open(struct radeon_bo_manager *bom, uint32_t handle, uint32_t size,return bo; } -void radeon_bo_ref (struct radeon_bo *bo) +drm_public void radeon_bo_ref(struct radeon_bo *bo) {struct radeon_bo_int *boi = (struct radeon_bo_int *)bo; boi->cref++; boi->bom->funcs->bo_ref (boi); } -struct radeon_bo *radeon_bo_unref (struct radeon_bo *bo) +drm_public struct radeon_bo *radeon_bo_unref(struct radeon_bo *bo) {struct radeon_bo_int *boi = (struct radeon_bo_int *)bo;if (bo ==NULL )
@@ -79,7 +79,7 @@ int radeon_bo_unmap(struct radeon_bo *bo)return boi->bom->funcs->bo_unmap (boi); } -int radeon_bo_wait (struct radeon_bo *bo) +drm_public int radeon_bo_wait(struct radeon_bo *bo) {struct radeon_bo_int *boi = (struct radeon_bo_int *)bo;if (!boi->bom->funcs->bo_wait)
@@ -87,13 +87,13 @@ int radeon_bo_wait(struct radeon_bo *bo)return boi->bom->funcs->bo_wait (boi); } -int radeon_bo_is_busy (struct radeon_bo *bo,uint32_t *domain) +drm_public int radeon_bo_is_busy(struct radeon_bo *bo, uint32_t *domain) {struct radeon_bo_int *boi = (struct radeon_bo_int *)bo;return boi->bom->funcs->bo_is_busy (boi, domain); } -int +drm_public intradeon_bo_set_tiling (struct radeon_bo *bo,uint32_t tiling_flags,uint32_t pitch) {
@@ -101,7 +101,7 @@ radeon_bo_set_tiling(struct radeon_bo *bo,return boi->bom->funcs->bo_set_tiling (boi, tiling_flags, pitch); } -int +drm_public intradeon_bo_get_tiling (struct radeon_bo *bo,uint32_t *tiling_flags,uint32_t *pitch) {
@@ -109,7 +109,7 @@ radeon_bo_get_tiling(struct radeon_bo *bo,return boi->bom->funcs->bo_get_tiling (boi, tiling_flags, pitch); } -int radeon_bo_is_static (struct radeon_bo *bo) +drm_public int radeon_bo_is_static(struct radeon_bo *bo) {struct radeon_bo_int *boi = (struct radeon_bo_int *)bo;if (boi->bom->funcs->bo_is_static)
@@ -117,19 +117,19 @@ int radeon_bo_is_static(struct radeon_bo *bo)return 0 ; } -int +drm_public intradeon_bo_is_referenced_by_cs (struct radeon_bo *bo,struct radeon_cs *cs) {struct radeon_bo_int *boi = (struct radeon_bo_int *)bo;return boi->cref >1 ; } -uint32_t radeon_bo_get_handle (struct radeon_bo *bo) +drm_public uint32_t radeon_bo_get_handle(struct radeon_bo *bo) {return bo->handle; } -uint32_t radeon_bo_get_src_domain (struct radeon_bo *bo) +drm_public uint32_t radeon_bo_get_src_domain(struct radeon_bo *bo) {struct radeon_bo_int *boi = (struct radeon_bo_int *)bo;uint32_t src_domain;
radeon/radeon_bo_gem.c +8 -8
@@ -281,7 +281,7 @@ static const struct radeon_bo_funcs bo_gem_funcs = { .bo_is_referenced_by_cs = NULL, }; -struct radeon_bo_manager *radeon_bo_manager_gem_ctor (int fd) +drm_public struct radeon_bo_manager *radeon_bo_manager_gem_ctor(int fd) {struct bo_manager_gem *bomg;
@@ -294,7 +294,7 @@ struct radeon_bo_manager *radeon_bo_manager_gem_ctor(int fd)return (struct radeon_bo_manager *)bomg; } -void radeon_bo_manager_gem_dtor (struct radeon_bo_manager *bom) +drm_public void radeon_bo_manager_gem_dtor(struct radeon_bo_manager *bom) {struct bo_manager_gem *bomg = (struct bo_manager_gem *)bom;
@@ -304,21 +304,21 @@ void radeon_bo_manager_gem_dtor(struct radeon_bo_manager *bom)free (bomg); } -uint32_t +drm_public uint32_tradeon_gem_name_bo (struct radeon_bo *bo) {struct radeon_bo_gem *bo_gem = (struct radeon_bo_gem *)bo;return bo_gem->name; } -void * +drm_public void *radeon_gem_get_reloc_in_cs (struct radeon_bo *bo) {struct radeon_bo_gem *bo_gem = (struct radeon_bo_gem *)bo;return &bo_gem->reloc_in_cs; } -int +drm_public intradeon_gem_get_kernel_name (struct radeon_bo *bo,uint32_t *name) {struct radeon_bo_gem *bo_gem = (struct radeon_bo_gem *)bo;
@@ -340,7 +340,7 @@ radeon_gem_get_kernel_name(struct radeon_bo *bo, uint32_t *name)return 0 ; } -int +drm_public intradeon_gem_set_domain (struct radeon_bo *bo,uint32_t read_domains,uint32_t write_domain) {struct radeon_bo_int *boi = (struct radeon_bo_int *)bo;
@@ -358,7 +358,7 @@ radeon_gem_set_domain(struct radeon_bo *bo, uint32_t read_domains, uint32_t writreturn r; } -int radeon_gem_prime_share_bo (struct radeon_bo *bo,int *handle) +drm_public int radeon_gem_prime_share_bo(struct radeon_bo *bo, int *handle) {struct radeon_bo_gem *bo_gem = (struct radeon_bo_gem *)bo;int ret;
@@ -367,7 +367,7 @@ int radeon_gem_prime_share_bo(struct radeon_bo *bo, int *handle)return ret; } -struct radeon_bo * +drm_public struct radeon_bo *radeon_gem_bo_open_prime (struct radeon_bo_manager *bom,int fd_handle,uint32_t size) {struct radeon_bo_gem *bo;
radeon/radeon_cs.c +12 -12
@@ -3,14 +3,14 @@#include "radeon_cs.h" #include "radeon_cs_int.h" -struct radeon_cs * +drm_public struct radeon_cs *radeon_cs_create (struct radeon_cs_manager *csm,uint32_t ndw) {struct radeon_cs_int *csi = csm->funcs->cs_create (csm, ndw);return (struct radeon_cs *)csi; } -int +drm_public intradeon_cs_write_reloc (struct radeon_cs *cs,struct radeon_bo *bo,uint32_t read_domain,uint32_t write_domain,uint32_t flags)
@@ -24,7 +24,7 @@ radeon_cs_write_reloc(struct radeon_cs *cs, struct radeon_bo *bo, flags); } -int +drm_public intradeon_cs_begin (struct radeon_cs *cs,uint32_t ndw,const char *file,const char *func,int line) {
@@ -32,7 +32,7 @@ radeon_cs_begin(struct radeon_cs *cs, uint32_t ndw,return csi->csm->funcs->cs_begin (csi, ndw, file, func, line); } -int +drm_public intradeon_cs_end (struct radeon_cs *cs,const char *file,const char *func,int line) {
@@ -40,37 +40,37 @@ radeon_cs_end(struct radeon_cs *cs,return csi->csm->funcs->cs_end (csi, file, func, line); } -int radeon_cs_emit (struct radeon_cs *cs) +drm_public int radeon_cs_emit(struct radeon_cs *cs) {struct radeon_cs_int *csi = (struct radeon_cs_int *)cs;return csi->csm->funcs->cs_emit (csi); } -int radeon_cs_destroy (struct radeon_cs *cs) +drm_public int radeon_cs_destroy(struct radeon_cs *cs) {struct radeon_cs_int *csi = (struct radeon_cs_int *)cs;return csi->csm->funcs->cs_destroy (csi); } -int radeon_cs_erase (struct radeon_cs *cs) +drm_public int radeon_cs_erase(struct radeon_cs *cs) {struct radeon_cs_int *csi = (struct radeon_cs_int *)cs;return csi->csm->funcs->cs_erase (csi); } -int radeon_cs_need_flush (struct radeon_cs *cs) +drm_public int radeon_cs_need_flush(struct radeon_cs *cs) {struct radeon_cs_int *csi = (struct radeon_cs_int *)cs;return csi->csm->funcs->cs_need_flush (csi); } -void radeon_cs_print (struct radeon_cs *cs,FILE *file) +drm_public void radeon_cs_print(struct radeon_cs *cs, FILE *file) {struct radeon_cs_int *csi = (struct radeon_cs_int *)cs; csi->csm->funcs->cs_print (csi, file); } -void +drm_public voidradeon_cs_set_limit (struct radeon_cs *cs,uint32_t domain,uint32_t limit) {struct radeon_cs_int *csi = (struct radeon_cs_int *)cs;
@@ -80,7 +80,7 @@ radeon_cs_set_limit(struct radeon_cs *cs, uint32_t domain, uint32_t limit) csi->csm->gart_limit = limit; } -void radeon_cs_space_set_flush (struct radeon_cs *cs, +drm_public void radeon_cs_space_set_flush(struct radeon_cs *cs,void (*fn)(void *),void *data) {struct radeon_cs_int *csi = (struct radeon_cs_int *)cs;
@@ -88,7 +88,7 @@ void radeon_cs_space_set_flush(struct radeon_cs *cs, csi->space_flush_data = data; } -uint32_t radeon_cs_get_id (struct radeon_cs *cs) +drm_public uint32_t radeon_cs_get_id(struct radeon_cs *cs) {struct radeon_cs_int *csi = (struct radeon_cs_int *)cs;return csi->id;
radeon/radeon_cs_gem.c +2 -2
@@ -536,7 +536,7 @@ static int radeon_get_device_id(int fd, uint32_t *device_id)return r; } -struct radeon_cs_manager *radeon_cs_manager_gem_ctor (int fd) +drm_public struct radeon_cs_manager *radeon_cs_manager_gem_ctor(int fd) {struct radeon_cs_manager_gem *csm;
@@ -550,7 +550,7 @@ struct radeon_cs_manager *radeon_cs_manager_gem_ctor(int fd)return &csm->base; } -void radeon_cs_manager_gem_dtor (struct radeon_cs_manager *csm) +drm_public void radeon_cs_manager_gem_dtor(struct radeon_cs_manager *csm) {free (csm); }
radeon/radeon_cs_space.c +3 -3
@@ -162,7 +162,7 @@ static int radeon_cs_do_space_check(struct radeon_cs_int *cs, struct radeon_cs_sreturn RADEON_CS_SPACE_OK ; } -void +drm_public voidradeon_cs_space_add_persistent_bo (struct radeon_cs *cs,struct radeon_bo *bo,uint32_t read_domains,uint32_t write_domain) {
@@ -206,7 +206,7 @@ again:return 0 ; } -int +drm_public intradeon_cs_space_check_with_bo (struct radeon_cs *cs,struct radeon_bo *bo,uint32_t read_domains,uint32_t write_domain) {
@@ -233,7 +233,7 @@ int radeon_cs_space_check(struct radeon_cs *cs)return radeon_cs_check_space_internal (csi,NULL ); } -void radeon_cs_space_reset_bos (struct radeon_cs *cs) +drm_public void radeon_cs_space_reset_bos(struct radeon_cs *cs) {struct radeon_cs_int *csi = (struct radeon_cs_int *)cs;int i;
radeon/radeon_surface.c +4 -4
@@ -2408,7 +2408,7 @@ static int cik_surface_best(struct radeon_surface_manager *surf_man,/* =========================================================================== * public API */ -struct radeon_surface_manager * +drm_public struct radeon_surface_manager *radeon_surface_manager_new (int fd) {struct radeon_surface_manager *surf_man;
@@ -2457,7 +2457,7 @@ out_err:return NULL ; } -void +drm_public voidradeon_surface_manager_free (struct radeon_surface_manager *surf_man) {free (surf_man);
@@ -2531,7 +2531,7 @@ static int radeon_surface_sanity(struct radeon_surface_manager *surf_man,return 0 ; } -int +drm_public intradeon_surface_init (struct radeon_surface_manager *surf_man,struct radeon_surface *surf) {
@@ -2548,7 +2548,7 @@ radeon_surface_init(struct radeon_surface_manager *surf_man,return surf_man->surface_init (surf_man, surf); } -int +drm_public intradeon_surface_best (struct radeon_surface_manager *surf_man,struct radeon_surface *surf) {
Signature · 6 lines
2.17.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v2 10/13 tegra: annotate public functions
In reply to Lucas De Marchiwhile read sym; do
read f func line _ <<<$(cscope -d -L -1 $sym)
if [ ! -z "$f" ]; then
sed -i "${line}s/^/drm_public /" $f
fidone < /tmp/a.txt
In which /tmp/a.txt contains the public symbols from tegra-symbol-check. The idea here will be to switch the default visibility to hidden so we don't export symbols we shouldn't.
--- tegra/tegra.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-)
tegra/tegra.c +13 -13
@@ -70,7 +70,7 @@ static int drm_tegra_wrap(struct drm_tegra **drmp, int fd, bool close)return 0 ; } -int drm_tegra_new (struct drm_tegra **drmp,int fd) +drm_public int drm_tegra_new(struct drm_tegra **drmp, int fd) {bool supported = false;drmVersionPtr version;
@@ -90,7 +90,7 @@ int drm_tegra_new(struct drm_tegra **drmp, int fd)return drm_tegra_wrap (drmp, fd, false); } -void drm_tegra_close (struct drm_tegra *drm) +drm_public void drm_tegra_close(struct drm_tegra *drm) {if (!drm)return ;
@@ -101,7 +101,7 @@ void drm_tegra_close(struct drm_tegra *drm)free (drm); } -int drm_tegra_bo_new (struct drm_tegra_bo **bop,struct drm_tegra *drm, +drm_public int drm_tegra_bo_new(struct drm_tegra_bo **bop, struct drm_tegra *drm,uint32_t flags,uint32_t size) {struct drm_tegra_gem_create args;
@@ -139,7 +139,7 @@ int drm_tegra_bo_new(struct drm_tegra_bo **bop, struct drm_tegra *drm,return 0 ; } -int drm_tegra_bo_wrap (struct drm_tegra_bo **bop,struct drm_tegra *drm, +drm_public int drm_tegra_bo_wrap(struct drm_tegra_bo **bop, struct drm_tegra *drm,uint32_t handle,uint32_t flags,uint32_t size) {struct drm_tegra_bo *bo;
@@ -162,7 +162,7 @@ int drm_tegra_bo_wrap(struct drm_tegra_bo **bop, struct drm_tegra *drm,return 0 ; } -struct drm_tegra_bo *drm_tegra_bo_ref (struct drm_tegra_bo *bo) +drm_public struct drm_tegra_bo *drm_tegra_bo_ref(struct drm_tegra_bo *bo) {if (bo)atomic_inc (&bo->ref);
@@ -170,13 +170,13 @@ struct drm_tegra_bo *drm_tegra_bo_ref(struct drm_tegra_bo *bo)return bo; } -void drm_tegra_bo_unref (struct drm_tegra_bo *bo) +drm_public void drm_tegra_bo_unref(struct drm_tegra_bo *bo) {if (bo &&atomic_dec_and_test (&bo->ref))drm_tegra_bo_free (bo); } -int drm_tegra_bo_get_handle (struct drm_tegra_bo *bo,uint32_t *handle) +drm_public int drm_tegra_bo_get_handle(struct drm_tegra_bo *bo, uint32_t *handle) {if (!bo || !handle)return -EINVAL ;
@@ -186,7 +186,7 @@ int drm_tegra_bo_get_handle(struct drm_tegra_bo *bo, uint32_t *handle)return 0 ; } -int drm_tegra_bo_map (struct drm_tegra_bo *bo,void **ptr) +drm_public int drm_tegra_bo_map(struct drm_tegra_bo *bo, void **ptr) {struct drm_tegra *drm = bo->drm;
@@ -218,7 +218,7 @@ int drm_tegra_bo_map(struct drm_tegra_bo *bo, void **ptr)return 0 ; } -int drm_tegra_bo_unmap (struct drm_tegra_bo *bo) +drm_public int drm_tegra_bo_unmap(struct drm_tegra_bo *bo) {if (!bo)return -EINVAL ;
@@ -234,7 +234,7 @@ int drm_tegra_bo_unmap(struct drm_tegra_bo *bo)return 0 ; } -int drm_tegra_bo_get_flags (struct drm_tegra_bo *bo,uint32_t *flags) +drm_public int drm_tegra_bo_get_flags(struct drm_tegra_bo *bo, uint32_t *flags) {struct drm_tegra_gem_get_flags args;struct drm_tegra *drm = bo->drm;
@@ -257,7 +257,7 @@ int drm_tegra_bo_get_flags(struct drm_tegra_bo *bo, uint32_t *flags)return 0 ; } -int drm_tegra_bo_set_flags (struct drm_tegra_bo *bo,uint32_t flags) +drm_public int drm_tegra_bo_set_flags(struct drm_tegra_bo *bo, uint32_t flags) {struct drm_tegra_gem_get_flags args;struct drm_tegra *drm = bo->drm;
@@ -278,7 +278,7 @@ int drm_tegra_bo_set_flags(struct drm_tegra_bo *bo, uint32_t flags)return 0 ; } -int drm_tegra_bo_get_tiling (struct drm_tegra_bo *bo, +drm_public int drm_tegra_bo_get_tiling(struct drm_tegra_bo *bo,struct drm_tegra_bo_tiling *tiling) {struct drm_tegra_gem_get_tiling args;
@@ -304,7 +304,7 @@ int drm_tegra_bo_get_tiling(struct drm_tegra_bo *bo,return 0 ; } -int drm_tegra_bo_set_tiling (struct drm_tegra_bo *bo, +drm_public int drm_tegra_bo_set_tiling(struct drm_tegra_bo *bo,const struct drm_tegra_bo_tiling *tiling) {struct drm_tegra_gem_set_tiling args;
Signature · 6 lines
2.17.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v2 11/13 exynos: annotate public functions
In reply to Lucas De Marchiwhile read sym; do
read f func line _ <<<$(cscope -d -L -1 $sym)
if [ ! -z "$f" ]; then
sed -i "${line}s/^/drm_public /" $f
fidone < /tmp/a.txt
In which /tmp/a.txt contains the public symbols from exynos-symbol-check. The idea here will be to switch the default visibility to hidden so we don't export symbols we shouldn't.
--- exynos/exynos_drm.c | 30 +++++++++++++++--------------- exynos/exynos_fimg2d.c | 20 ++++++++++---------- 2 files changed, 25 insertions(+), 25 deletions(-)
exynos/exynos_drm.c +15 -15
@@ -48,7 +48,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 +69,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 +87,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 +141,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 +167,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 +199,7 @@ void exynos_bo_destroy(struct exynos_bo *bo)* if true, return a exynos buffer object else NULL. * */ -struct exynos_bo * +drm_public struct exynos_bo *exynos_bo_from_name (struct exynos_device *dev,uint32_t name) {struct exynos_bo *bo;
@@ -242,7 +242,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 = {
@@ -265,7 +265,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; }
@@ -278,7 +278,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;
@@ -315,7 +315,7 @@ void *exynos_bo_map(struct exynos_bo *bo)* * @return: 0 on success, -1 on error, and errno will be set */ -int +drm_public intexynos_prime_handle_to_fd (struct exynos_device *dev,uint32_t handle,int *fd) {return drmPrimeHandleToFD (dev->fd, handle,0 , fd);
@@ -330,7 +330,7 @@ exynos_prime_handle_to_fd(struct exynos_device *dev, uint32_t handle, int *fd)* * @return: 0 on success, -1 on error, and errno will be set */ -int +drm_public intexynos_prime_fd_to_handle (struct exynos_device *dev,int fd,uint32_t *handle) {return drmPrimeFDToHandle (dev->fd, fd, handle);
@@ -353,7 +353,7 @@ exynos_prime_fd_to_handle(struct exynos_device *dev, int fd, uint32_t *handle)* * if true, return 0 else negative. */ -int +drm_public intexynos_vidi_connection (struct exynos_device *dev,uint32_t connect,uint32_t ext,void *edid) {
@@ -394,7 +394,7 @@ exynos_handle_vendor(int fd, struct drm_event *e, void *ctx) } } -int +drm_public intexynos_handle_event (struct exynos_device *dev,struct exynos_event_context *ctx) {char buffer[1024 ];
exynos/exynos_fimg2d.c +10 -10
@@ -356,7 +356,7 @@ static int g2d_flush(struct g2d_context *ctx)* * fd: a file descriptor to an opened drm device. */ -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;
@@ -384,7 +384,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) {free (ctx); }
@@ -400,7 +400,7 @@ void g2d_fini(struct g2d_context *ctx)* @ctx: a pointer to g2d_context structure. * @userdata: a pointer to the user data */ -void g2d_config_event (struct g2d_context *ctx,void *userdata) +drm_public void g2d_config_event(struct g2d_context *ctx, void *userdata) { ctx->event_userdata = userdata; }
@@ -410,7 +410,7 @@ void g2d_config_event(struct g2d_context *ctx, void *userdata)* * @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;
@@ -442,7 +442,7 @@ 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 +drm_public intg2d_solid_fill (struct g2d_context *ctx,struct g2d_image *img,unsigned int x,unsigned int y,unsigned int w,unsigned int h)
@@ -495,7 +495,7 @@ 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 +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,
@@ -578,7 +578,7 @@ g2d_copy(struct g2d_context *ctx, struct g2d_image *src,* @w: width of rectangle to move. * @h: height of rectangle to move. */ -int +drm_public int g2d_move(struct g2d_context *ctx, struct g2d_image *img, unsigned int src_x, unsigned int src_y, unsigned int dst_x, unsigned dst_y, unsigned int w,
@@ -676,7 +676,7 @@ g2d_move(struct g2d_context *ctx, struct g2d_image *img,* @negative: indicate that it uses color negative to source and * destination buffers. */ -int +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,
@@ -785,7 +785,7 @@ 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 +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,
@@ -902,7 +902,7 @@ g2d_blend(struct g2d_context *ctx, struct g2d_image *src,* @dst_h: height value to destination buffer. * @op: blend operation type. */ -int +drm_public int g2d_scale_and_blend(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,
Signature · 6 lines
2.17.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v2 12/13 meson: make symbols hidden by default
In reply to Lucas De MarchiNow that symbols that should be exported are annotated accordingly, make all the rest hidden by default.
--- amdgpu/meson.build | 2 +- etnaviv/meson.build | 2 +- exynos/meson.build | 2 +- freedreno/meson.build | 2 +- intel/meson.build | 4 ++-- libkms/meson.build | 2 +- meson.build | 5 ++++- nouveau/meson.build | 2 +- omap/meson.build | 2 +- radeon/meson.build | 2 +- tegra/meson.build | 2 +- tests/exynos/meson.build | 6 +++--- tests/kms/meson.build | 2 +- tests/kmstest/meson.build | 2 +- tests/meson.build | 8 ++++---- tests/modeprint/meson.build | 2 +- tests/modetest/meson.build | 2 +- tests/nouveau/meson.build | 2 +- tests/proptest/meson.build | 2 +- tests/radeon/meson.build | 2 +- tests/tegra/meson.build | 2 +- tests/vbltest/meson.build | 2 +- 22 files changed, 31 insertions(+), 28 deletions(-)
amdgpu/meson.build +1 -1
@@ -31,7 +31,7 @@ libdrm_amdgpu = shared_library( config_file, ], c_args : [ - warn_c_args, + libdrm_c_args, '-DAMDGPU_ASIC_ID_TABLE="@0@"'.format(join_paths(datadir_amdgpu, 'amdgpu.ids')), ], include_directories : [inc_root, inc_drm],
etnaviv/meson.build +1 -1
@@ -30,7 +30,7 @@ libdrm_etnaviv = shared_library( ], include_directories : [inc_root, inc_drm], link_with : libdrm, - c_args : warn_c_args, + c_args : libdrm_c_args, dependencies : [dep_pthread_stubs, dep_rt, dep_atomic_ops], version : '1.0.0', install : true,
exynos/meson.build +1 -1
@@ -21,7 +21,7 @@ libdrm_exynos = shared_library( 'drm_exynos', [files('exynos_drm.c', 'exynos_fimg2d.c'), config_file], - c_args : warn_c_args, + c_args : libdrm_c_args, include_directories : [inc_root, inc_drm], link_with : libdrm, dependencies : [dep_pthread_stubs],
freedreno/meson.build +1 -1
@@ -42,7 +42,7 @@ endif libdrm_freedreno = shared_library( 'drm_freedreno', [files_freedreno, config_file], - c_args : warn_c_args, + c_args : libdrm_c_args, include_directories : [inc_root, inc_drm], dependencies : [dep_valgrind, dep_pthread_stubs, dep_rt, dep_atomic_ops], link_with : libdrm,
intel/meson.build +2 -2
@@ -30,7 +30,7 @@ libdrm_intel = shared_library( include_directories : [inc_root, inc_drm], link_with : libdrm, dependencies : [dep_pciaccess, dep_pthread_stubs, dep_rt, dep_valgrind, dep_atomic_ops], - c_args : warn_c_args, + c_args : libdrm_c_args, version : '1.0.0', install : true, )
@@ -59,7 +59,7 @@ test_decode = executable( files('test_decode.c'), include_directories : [inc_root, inc_drm], link_with : [libdrm, libdrm_intel], - c_args : warn_c_args, + c_args : libdrm_c_args, ) test(
libkms/meson.build +1 -1
@@ -44,7 +44,7 @@ endif libkms = shared_library( 'kms', [files_libkms, config_file], - c_args : warn_c_args, + c_args : libdrm_c_args, include_directories : libkms_include, link_with : libdrm, version : '1.0.0',
meson.build +4 -1
@@ -211,6 +211,9 @@ foreach a : ['unused-parameter', 'attributes', 'long-long', endif endforeach +# all c args: +libdrm_c_args = warn_c_args + ['-fvisibility=hidden'] + dep_pciaccess = dependency('pciaccess', version : '>= 0.10', required : with_intel) dep_cunit = dependency('cunit', version : '>= 2.1', required : false)
@@ -286,7 +289,7 @@ libdrm = shared_library( ), config_file, ], - c_args : warn_c_args, + c_args : libdrm_c_args, dependencies : [dep_valgrind, dep_rt, dep_m], include_directories : inc_drm, version : '2.4.0',
nouveau/meson.build +1 -1
@@ -22,7 +22,7 @@ libdrm_nouveau = shared_library( 'drm_nouveau', [files( 'nouveau.c', 'pushbuf.c', 'bufctx.c', 'abi16.c'), config_file], - c_args : warn_c_args, + c_args : libdrm_c_args, include_directories : [inc_root, inc_drm], link_with : libdrm, dependencies : [dep_threads, dep_atomic_ops],
omap/meson.build +1 -1
@@ -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',
radeon/meson.build +1 -1
@@ -28,7 +28,7 @@ libdrm_radeon = shared_library( ), config_file, ], - c_args : warn_c_args, + c_args : libdrm_c_args, include_directories : [inc_root, inc_drm], link_with : libdrm, dependencies : [dep_pthread_stubs, dep_atomic_ops],
tegra/meson.build +1 -1
@@ -24,7 +24,7 @@ libdrm_tegra = shared_library( include_directories : [inc_root, inc_drm], link_with : libdrm, dependencies : [dep_pthread_stubs, dep_atomic_ops], - c_args : warn_c_args, + c_args : libdrm_c_args, version : '0.0.0', install : true, )
tests/exynos/meson.build +3 -3
@@ -24,7 +24,7 @@ if with_libkms exynos_fimg2d_test = executable( 'exynos_fimg2d_test', files('exynos_fimg2d_test.c'), - c_args : warn_c_args, + c_args : libdrm_c_args, include_directories : [inc_root, inc_drm, inc_exynos, include_directories('../../libkms')], link_with : [libdrm, libkms, libdrm_exynos],
@@ -36,7 +36,7 @@ endif exynos_fimg2d_perf = executable( 'exynos_fimg2d_perf', files('exynos_fimg2d_perf.c'), - c_args : warn_c_args, + c_args : libdrm_c_args, include_directories : [inc_root, inc_drm, inc_exynos], link_with : [libdrm, libdrm_exynos], dependencies : dep_threads,
@@ -46,7 +46,7 @@ exynos_fimg2d_perf = executable( exynos_fimg2d_event = executable( 'exynos_fimg2d_event', files('exynos_fimg2d_event.c'), - c_args : warn_c_args, + c_args : libdrm_c_args, include_directories : [inc_root, inc_drm, inc_exynos], link_with : [libdrm, libdrm_exynos], dependencies : dep_threads,
tests/kms/meson.build +1 -1
@@ -27,7 +27,7 @@ libkms_test = static_library( ), include_directories : [inc_root, inc_tests, inc_drm], link_with : libdrm, - c_args : warn_c_args, + c_args : libdrm_c_args, ) kms_steal_crtc = executable(
tests/kmstest/meson.build +1 -1
@@ -21,7 +21,7 @@ kmstest = executable( 'kmstest', files('main.c'), - c_args : warn_c_args, + c_args : libdrm_c_args, include_directories : [ inc_root, inc_tests, include_directories('../../libkms'), inc_drm, ],
tests/meson.build +4 -4
@@ -53,7 +53,7 @@ drmsl = executable( files('drmsl.c'), include_directories : [inc_root, inc_drm], link_with : libdrm, - c_args : warn_c_args, + c_args : libdrm_c_args, ) hash = executable(
@@ -61,7 +61,7 @@ hash = executable( files('hash.c'), include_directories : [inc_root, inc_drm], link_with : libdrm, - c_args : warn_c_args, + c_args : libdrm_c_args, ) random = executable(
@@ -69,7 +69,7 @@ random = executable( files('random.c'), include_directories : [inc_root, inc_drm], link_with : libdrm, - c_args : warn_c_args, + c_args : libdrm_c_args, ) drmdevice = executable(
@@ -77,7 +77,7 @@ drmdevice = executable( files('drmdevice.c'), include_directories : [inc_root, inc_drm], link_with : libdrm, - c_args : warn_c_args, + c_args : libdrm_c_args, ) test('random', random, timeout : 240)
tests/modeprint/meson.build +1 -1
@@ -21,7 +21,7 @@ modeprint = executable( 'modeprint', files('modeprint.c'), - c_args : warn_c_args, + c_args : libdrm_c_args, include_directories : [inc_root, inc_tests, inc_drm], link_with : libdrm, dependencies : dep_threads,
tests/modetest/meson.build +1 -1
@@ -21,7 +21,7 @@ modetest = executable( 'modetest', files('buffers.c', 'cursor.c', 'modetest.c'), - c_args : [warn_c_args, '-Wno-pointer-arith'], + c_args : [libdrm_c_args, '-Wno-pointer-arith'], include_directories : [inc_root, inc_tests, inc_drm], dependencies : [dep_threads, dep_cairo], link_with : [libdrm, libutil],
tests/nouveau/meson.build +1 -1
@@ -24,7 +24,7 @@ threaded = executable( dependencies : [dep_dl, dep_threads], include_directories : [inc_root, inc_drm, include_directories('../../nouveau')], link_with : [libdrm, libdrm_nouveau], - c_args : warn_c_args, + c_args : libdrm_c_args, ) test('threaded', threaded)
tests/proptest/meson.build +1 -1
@@ -21,7 +21,7 @@ proptest = executable( 'proptest', files('proptest.c'), - c_args : warn_c_args, + c_args : libdrm_c_args, include_directories : [inc_root, inc_tests, inc_drm], link_with : [libdrm, libutil], install : with_install_tests,
tests/radeon/meson.build +1 -1
@@ -23,5 +23,5 @@ radeon_ttm = executable( files('rbo.c', 'radeon_ttm.c'), include_directories : [inc_root, inc_drm], link_with : libdrm, - c_args : warn_c_args, + c_args : libdrm_c_args, )
tests/tegra/meson.build +1 -1
@@ -22,6 +22,6 @@ openclose = executable( 'openclose', files('openclose.c'), include_directories : [inc_root, inc_drm, include_directories('../../tegra')], - c_args : warn_c_args, + c_args : libdrm_c_args, link_with : [libdrm, libdrm_tegra], )
tests/vbltest/meson.build +1 -1
@@ -21,7 +21,7 @@ vbltest = executable( 'vbltest', files('vbltest.c'), - c_args : warn_c_args, + c_args : libdrm_c_args, include_directories : [inc_root, inc_tests, inc_drm], link_with : [libdrm, libutil], install : with_install_tests,
Signature · 6 lines
2.17.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH libdrm v2 12/13] meson: make symbols hidden by default
Quoting Lucas De Marchi (2018-09-13 16:57:23)
Quoted 379 lines
Now that symbols that should be exported are annotated accordingly, make all the rest hidden by default.
Signed-off-by Lucas De Marchi <[email protected]>--- amdgpu/meson.build | 2 +- etnaviv/meson.build | 2 +- exynos/meson.build | 2 +- freedreno/meson.build | 2 +- intel/meson.build | 4 ++-- libkms/meson.build | 2 +- meson.build | 5 ++++- nouveau/meson.build | 2 +- omap/meson.build | 2 +- radeon/meson.build | 2 +- tegra/meson.build | 2 +- tests/exynos/meson.build | 6 +++--- tests/kms/meson.build | 2 +- tests/kmstest/meson.build | 2 +- tests/meson.build | 8 ++++---- tests/modeprint/meson.build | 2 +- tests/modetest/meson.build | 2 +- tests/nouveau/meson.build | 2 +- tests/proptest/meson.build | 2 +- tests/radeon/meson.build | 2 +- tests/tegra/meson.build | 2 +- tests/vbltest/meson.build | 2 +- 22 files changed, 31 insertions(+), 28 deletions(-)amdgpu/meson.build +1
-1@@ -31,7 +31,7 @@ libdrm_amdgpu = shared_library( config_file, ], c_args : [ - warn_c_args, + libdrm_c_args, '-DAMDGPU_ASIC_ID_TABLE="@0@"'.format(join_paths(datadir_amdgpu, 'amdgpu.ids')), ], include_directories : [inc_root, inc_drm],etnaviv/meson.build +1
-1@@ -30,7 +30,7 @@ libdrm_etnaviv = shared_library( ], include_directories : [inc_root, inc_drm], link_with : libdrm, - c_args : warn_c_args, + c_args : libdrm_c_args, dependencies : [dep_pthread_stubs, dep_rt, dep_atomic_ops], version : '1.0.0', install : true,exynos/meson.build +1
-1@@ -21,7 +21,7 @@ libdrm_exynos = shared_library( 'drm_exynos', [files('exynos_drm.c', 'exynos_fimg2d.c'), config_file], - c_args : warn_c_args, + c_args : libdrm_c_args, include_directories : [inc_root, inc_drm], link_with : libdrm, dependencies : [dep_pthread_stubs],freedreno/meson.build +1
-1@@ -42,7 +42,7 @@ endif libdrm_freedreno = shared_library( 'drm_freedreno', [files_freedreno, config_file], - c_args : warn_c_args, + c_args : libdrm_c_args, include_directories : [inc_root, inc_drm], dependencies : [dep_valgrind, dep_pthread_stubs, dep_rt, dep_atomic_ops], link_with : libdrm,intel/meson.build +2
-2@@ -30,7 +30,7 @@ libdrm_intel = shared_library( include_directories : [inc_root, inc_drm], link_with : libdrm, dependencies : [dep_pciaccess, dep_pthread_stubs, dep_rt, dep_valgrind, dep_atomic_ops], - c_args : warn_c_args, + c_args : libdrm_c_args, version : '1.0.0', install : true, )@@ -59,7 +59,7 @@ test_decode = executable( files('test_decode.c'), include_directories : [inc_root, inc_drm], link_with : [libdrm, libdrm_intel], - c_args : warn_c_args, + c_args : libdrm_c_args, ) test(libkms/meson.build +1
-1@@ -44,7 +44,7 @@ endif libkms = shared_library( 'kms', [files_libkms, config_file], - c_args : warn_c_args, + c_args : libdrm_c_args, include_directories : libkms_include, link_with : libdrm, version : '1.0.0',meson.build +4
-1@@ -211,6 +211,9 @@ foreach a : ['unused-parameter', 'attributes', 'long-long', endif endforeach +# all c args: +libdrm_c_args = warn_c_args + ['-fvisibility=hidden'] + dep_pciaccess = dependency('pciaccess', version : '>= 0.10', required : with_intel) dep_cunit = dependency('cunit', version : '>= 2.1', required : false)@@ -286,7 +289,7 @@ libdrm = shared_library( ), config_file, ], - c_args : warn_c_args, + c_args : libdrm_c_args, dependencies : [dep_valgrind, dep_rt, dep_m], include_directories : inc_drm, version : '2.4.0',nouveau/meson.build +1
-1@@ -22,7 +22,7 @@ libdrm_nouveau = shared_library( 'drm_nouveau', [files( 'nouveau.c', 'pushbuf.c', 'bufctx.c', 'abi16.c'), config_file], - c_args : warn_c_args, + c_args : libdrm_c_args, include_directories : [inc_root, inc_drm], link_with : libdrm, dependencies : [dep_threads, dep_atomic_ops],omap/meson.build +1
-1@@ -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',radeon/meson.build +1
-1@@ -28,7 +28,7 @@ libdrm_radeon = shared_library( ), config_file, ], - c_args : warn_c_args, + c_args : libdrm_c_args, include_directories : [inc_root, inc_drm], link_with : libdrm, dependencies : [dep_pthread_stubs, dep_atomic_ops],tegra/meson.build +1
-1@@ -24,7 +24,7 @@ libdrm_tegra = shared_library( include_directories : [inc_root, inc_drm], link_with : libdrm, dependencies : [dep_pthread_stubs, dep_atomic_ops], - c_args : warn_c_args, + c_args : libdrm_c_args, version : '0.0.0', install : true, )tests/exynos/meson.build +3
-3@@ -24,7 +24,7 @@ if with_libkms exynos_fimg2d_test = executable( 'exynos_fimg2d_test', files('exynos_fimg2d_test.c'), - c_args : warn_c_args, + c_args : libdrm_c_args, include_directories : [inc_root, inc_drm, inc_exynos, include_directories('../../libkms')], link_with : [libdrm, libkms, libdrm_exynos],@@ -36,7 +36,7 @@ endif exynos_fimg2d_perf = executable( 'exynos_fimg2d_perf', files('exynos_fimg2d_perf.c'), - c_args : warn_c_args, + c_args : libdrm_c_args, include_directories : [inc_root, inc_drm, inc_exynos], link_with : [libdrm, libdrm_exynos], dependencies : dep_threads,@@ -46,7 +46,7 @@ exynos_fimg2d_perf = executable( exynos_fimg2d_event = executable( 'exynos_fimg2d_event', files('exynos_fimg2d_event.c'), - c_args : warn_c_args, + c_args : libdrm_c_args, include_directories : [inc_root, inc_drm, inc_exynos], link_with : [libdrm, libdrm_exynos], dependencies : dep_threads,tests/kms/meson.build +1
-1@@ -27,7 +27,7 @@ libkms_test = static_library( ), include_directories : [inc_root, inc_tests, inc_drm], link_with : libdrm, - c_args : warn_c_args, + c_args : libdrm_c_args, ) kms_steal_crtc = executable(tests/kmstest/meson.build +1
-1@@ -21,7 +21,7 @@ kmstest = executable( 'kmstest', files('main.c'), - c_args : warn_c_args, + c_args : libdrm_c_args, include_directories : [ inc_root, inc_tests, include_directories('../../libkms'), inc_drm, ],tests/meson.build +4
-4@@ -53,7 +53,7 @@ drmsl = executable( files('drmsl.c'), include_directories : [inc_root, inc_drm], link_with : libdrm, - c_args : warn_c_args, + c_args : libdrm_c_args, ) hash = executable(@@ -61,7 +61,7 @@ hash = executable( files('hash.c'), include_directories : [inc_root, inc_drm], link_with : libdrm, - c_args : warn_c_args, + c_args : libdrm_c_args, ) random = executable(@@ -69,7 +69,7 @@ random = executable( files('random.c'), include_directories : [inc_root, inc_drm], link_with : libdrm, - c_args : warn_c_args, + c_args : libdrm_c_args, ) drmdevice = executable(@@ -77,7 +77,7 @@ drmdevice = executable( files('drmdevice.c'), include_directories : [inc_root, inc_drm], link_with : libdrm, - c_args : warn_c_args, + c_args : libdrm_c_args, ) test('random', random, timeout : 240)tests/modeprint/meson.build +1
-1@@ -21,7 +21,7 @@ modeprint = executable( 'modeprint', files('modeprint.c'), - c_args : warn_c_args, + c_args : libdrm_c_args, include_directories : [inc_root, inc_tests, inc_drm], link_with : libdrm, dependencies : dep_threads,tests/modetest/meson.build +1
-1@@ -21,7 +21,7 @@ modetest = executable( 'modetest', files('buffers.c', 'cursor.c', 'modetest.c'), - c_args : [warn_c_args, '-Wno-pointer-arith'], + c_args : [libdrm_c_args, '-Wno-pointer-arith'], include_directories : [inc_root, inc_tests, inc_drm], dependencies : [dep_threads, dep_cairo], link_with : [libdrm, libutil],tests/nouveau/meson.build +1
-1@@ -24,7 +24,7 @@ threaded = executable( dependencies : [dep_dl, dep_threads], include_directories : [inc_root, inc_drm, include_directories('../../nouveau')], link_with : [libdrm, libdrm_nouveau], - c_args : warn_c_args, + c_args : libdrm_c_args, ) test('threaded', threaded)tests/proptest/meson.build +1
-1@@ -21,7 +21,7 @@ proptest = executable( 'proptest', files('proptest.c'), - c_args : warn_c_args, + c_args : libdrm_c_args, include_directories : [inc_root, inc_tests, inc_drm], link_with : [libdrm, libutil], install : with_install_tests,tests/radeon/meson.build +1
-1@@ -23,5 +23,5 @@ radeon_ttm = executable( files('rbo.c', 'radeon_ttm.c'), include_directories : [inc_root, inc_drm], link_with : libdrm, - c_args : warn_c_args, + c_args : libdrm_c_args, )tests/tegra/meson.build +1
-1@@ -22,6 +22,6 @@ openclose = executable( 'openclose', files('openclose.c'), include_directories : [inc_root, inc_drm, include_directories('../../tegra')], - c_args : warn_c_args, + c_args : libdrm_c_args, link_with : [libdrm, libdrm_tegra], )tests/vbltest/meson.build +1
-1@@ -21,7 +21,7 @@ vbltest = executable( 'vbltest', files('vbltest.c'), - c_args : warn_c_args, + c_args : libdrm_c_args, include_directories : [inc_root, inc_tests, inc_drm], link_with : [libdrm, libutil], install : with_install_tests,Signature · 1 line
2.17.1
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH v2 13/13 autotools: make symbols hidden by default
In reply to Lucas De MarchiNow that symbols that should be exported are annotated accordingly, make all the rest hidden by default.
--- Makefile.am | 1 + amdgpu/Makefile.am | 1 + etnaviv/Makefile.am | 1 + exynos/Makefile.am | 1 + freedreno/Makefile.am | 1 + intel/Makefile.am | 1 + libkms/Makefile.am | 1 + nouveau/Makefile.am | 1 + omap/Makefile.am | 1 + radeon/Makefile.am | 1 + tegra/Makefile.am | 3 ++- tests/Makefile.am | 1 + tests/amdgpu/Makefile.am | 1 + tests/etnaviv/Makefile.am | 1 + tests/exynos/Makefile.am | 1 + tests/kms/Makefile.am | 3 ++- tests/kmstest/Makefile.am | 1 + tests/modeprint/Makefile.am | 1 + tests/modetest/Makefile.am | 1 + tests/nouveau/Makefile.am | 1 + tests/proptest/Makefile.am | 1 + tests/radeon/Makefile.am | 1 + tests/tegra/Makefile.am | 4 +++- tests/vbltest/Makefile.am | 1 + vc4/Makefile.am | 1 + 25 files changed, 29 insertions(+), 3 deletions(-)
Makefile.am +1 -0
@@ -121,6 +121,7 @@ libdrm_la_LIBADD = @CLOCK_LIB@ -lm libdrm_la_CPPFLAGS = -I$(top_srcdir)/include/drm AM_CFLAGS = \ $(WARN_CFLAGS) \ + -fvisibility=hidden \ $(VALGRIND_CFLAGS) libdrm_la_SOURCES = $(LIBDRM_FILES)
amdgpu/Makefile.am +1 -0
@@ -26,6 +26,7 @@ include Makefile.sources AM_CFLAGS = \ $(WARN_CFLAGS) \ + -fvisibility=hidden \ -I$(top_srcdir) \ $(PTHREADSTUBS_CFLAGS) \ -I$(top_srcdir)/include/drm
etnaviv/Makefile.am +1 -0
@@ -2,6 +2,7 @@ include Makefile.sources AM_CFLAGS = \ $(WARN_CFLAGS) \ + -fvisibility=hidden \ -I$(top_srcdir) \ $(PTHREADSTUBS_CFLAGS) \ -I$(top_srcdir)/include/drm
exynos/Makefile.am +1 -0
@@ -1,5 +1,6 @@ AM_CFLAGS = \ $(WARN_CFLAGS) \ + -fvisibility=hidden \ -I$(top_srcdir) \ $(PTHREADSTUBS_CFLAGS) \ -I$(top_srcdir)/include/drm
freedreno/Makefile.am +1 -0
@@ -3,6 +3,7 @@ include Makefile.sources AM_CFLAGS = \ $(WARN_CFLAGS) \ + -fvisibility=hidden \ -I$(top_srcdir) \ $(PTHREADSTUBS_CFLAGS) \ $(VALGRIND_CFLAGS) \
intel/Makefile.am +1 -0
@@ -26,6 +26,7 @@ include Makefile.sources AM_CFLAGS = \ $(WARN_CFLAGS) \ + -fvisibility=hidden \ -I$(top_srcdir) \ $(PTHREADSTUBS_CFLAGS) \ $(PCIACCESS_CFLAGS) \
libkms/Makefile.am +1 -0
@@ -2,6 +2,7 @@ include Makefile.sources AM_CFLAGS = \ $(WARN_CFLAGS) \ + -fvisibility=hidden \ -I$(top_srcdir)/include/drm \ -I$(top_srcdir)
nouveau/Makefile.am +1 -0
@@ -2,6 +2,7 @@ include Makefile.sources AM_CFLAGS = \ $(WARN_CFLAGS) \ + -fvisibility=hidden \ -I$(top_srcdir) \ $(PTHREADSTUBS_CFLAGS) \ -I$(top_srcdir)/include/drm \
omap/Makefile.am +1 -0
@@ -1,5 +1,6 @@ AM_CFLAGS = \ $(WARN_CFLAGS) \ + -fvisibility=hidden \ -I$(top_srcdir) \ $(PTHREADSTUBS_CFLAGS) \ -I$(top_srcdir)/include/drm
radeon/Makefile.am +1 -0
@@ -26,6 +26,7 @@ include Makefile.sources AM_CFLAGS = \ $(WARN_CFLAGS) \ + -fvisibility=hidden \ -I$(top_srcdir) \ $(PTHREADSTUBS_CFLAGS) \ -I$(top_srcdir)/include/drm
tegra/Makefile.am +2 -1
@@ -4,7 +4,8 @@ AM_CPPFLAGS = \ AM_CFLAGS = \ @PTHREADSTUBS_CFLAGS@ \ - $(WARN_CFLAGS) + $(WARN_CFLAGS) \ + -fvisibility=hidden libdrm_tegra_ladir = $(libdir) libdrm_tegra_la_LTLIBRARIES = libdrm_tegra.la
tests/Makefile.am +1 -0
@@ -32,6 +32,7 @@ endif AM_CFLAGS = \ $(WARN_CFLAGS)\ + -fvisibility=hidden \ -I $(top_srcdir)/include/drm \ -I $(top_srcdir)
tests/amdgpu/Makefile.am +1 -0
@@ -1,4 +1,5 @@ AM_CFLAGS = \ + -fvisibility=hidden \ -I $(top_srcdir)/include/drm \ -I $(top_srcdir)/amdgpu \ -I $(top_srcdir) \
tests/etnaviv/Makefile.am +1 -0
@@ -1,4 +1,5 @@ AM_CFLAGS = \ + -fvisibility=hidden \ -I $(top_srcdir)/include/drm \ -I $(top_srcdir)/etnaviv \ -I $(top_srcdir)
tests/exynos/Makefile.am +1 -0
@@ -1,6 +1,7 @@ AM_CFLAGS = \ -pthread \ $(WARN_CFLAGS)\ + -fvisibility=hidden \ -I $(top_srcdir)/include/drm \ -I $(top_srcdir)/libkms/ \ -I $(top_srcdir)/exynos \
tests/kms/Makefile.am +2 -1
@@ -4,7 +4,8 @@ AM_CPPFLAGS = \ -I$(top_srcdir) AM_CFLAGS = \ - $(WARN_CFLAGS) + $(WARN_CFLAGS) \ + -fvisibility=hidden noinst_LTLIBRARIES = libkms-test.la
tests/kmstest/Makefile.am +1 -0
@@ -1,5 +1,6 @@ AM_CFLAGS = \ $(WARN_CFLAGS)\ + -fvisibility=hidden \ -I$(top_srcdir)/include/drm \ -I$(top_srcdir)/libkms/ \ -I$(top_srcdir)/tests/ \
tests/modeprint/Makefile.am +1 -0
@@ -1,5 +1,6 @@ AM_CFLAGS = \ $(WARN_CFLAGS)\ + -fvisibility=hidden \ -I$(top_srcdir)/include/drm \ -I$(top_srcdir)/tests \ -I$(top_srcdir)
tests/modetest/Makefile.am +1 -0
@@ -3,6 +3,7 @@ include Makefile.sources AM_CFLAGS = $(filter-out -Wpointer-arith, $(WARN_CFLAGS)) AM_CFLAGS += \ + -fvisibility=hidden \ -pthread \ -I$(top_srcdir)/include/drm \ -I$(top_srcdir)/tests \
tests/nouveau/Makefile.am +1 -0
@@ -1,6 +1,7 @@ AM_CFLAGS = \ -pthread \ $(WARN_CFLAGS) \ + -fvisibility=hidden \ -I$(top_srcdir)/include/drm \ -I$(top_srcdir)/nouveau \ -I$(top_srcdir)
tests/proptest/Makefile.am +1 -0
@@ -2,6 +2,7 @@ include Makefile.sources AM_CFLAGS = \ $(WARN_CFLAGS)\ + -fvisibility=hidden \ -I$(top_srcdir)/include/drm \ -I$(top_srcdir)/tests \ -I$(top_srcdir)
tests/radeon/Makefile.am +1 -0
@@ -1,5 +1,6 @@ AM_CFLAGS = \ $(WARN_CFLAGS)\ + -fvisibility=hidden \ -I $(top_srcdir)/include/drm \ -I $(top_srcdir)
tests/tegra/Makefile.am +3 -1
@@ -3,7 +3,9 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/tegra \ -I$(top_srcdir) -AM_CFLAGS = $(WARN_CFLAGS) +AM_CFLAGS = \ + $(WARN_CFLAGS) \ + -fvisibility=hidden LDADD = \ ../../tegra/libdrm_tegra.la \
tests/vbltest/Makefile.am +1 -0
@@ -1,5 +1,6 @@ AM_CFLAGS = \ $(WARN_CFLAGS)\ + -fvisibility=hidden \ -I$(top_srcdir)/include/drm \ -I$(top_srcdir)/tests \ -I$(top_srcdir)
vc4/Makefile.am +1 -0
@@ -23,6 +23,7 @@ include Makefile.sources AM_CFLAGS = \ $(WARN_CFLAGS) \ + -fvisibility=hidden \ -I$(top_srcdir) \ $(PTHREADSTUBS_CFLAGS) \ $(VALGRIND_CFLAGS) \
Signature · 6 lines
2.17.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 7 lines · Lucas De Marchi
Rely on -fvisibility=hidden to hide the symbols. Previous version of this series applying only to drm_intel.so is
Reviewed-by Eric Engestrom <[email protected]>but it's not included here since I changed the approach for the build system change.
Patches 1 (intel), 5 (libdrm) and 12 (meson) are:
The rest of the series is:
You can also add the same change to Android:
----8<----
Android.common.mk +1 -0
@@ -2,6 +2,7 @@ LOCAL_CFLAGS += \ -DMAJOR_IN_SYSMACROS=1 \ -DHAVE_VISIBILITY=1 \ + -fvisibility=hidden \ -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1 LOCAL_CFLAGS += \
---->8----
After that, the drm_private macro is ready to be removed :)
Quoted 112 lines
drm_privatecan also be removed from other symbols but it proved to be a lot of manual work to re-align all the fields, so I decided to leave it to be done on top as a cleanup.There were lots of changes to param alignement that had to be done manually, I may have missed some.
Changes from v1:
- Include changes for all other sub-libraries
- Include changes to autotools
- Make main Makefil.am and meson.build define the required flagThis is build-tested locally and on gitlab:
https://gitlab.freedesktop.org/demarchi/drm/pipelines/4339Lucas De Marchi (13):
intel: annotate public functions
libkms: annotate public functions
nouveau: annotate public functions
libkms: annotate public functions
libdrm: annotate public functions
etnaviv: annotate public functions
freedreno: annotate public functions
omap: annotate public functions
radeon: annotate public functions
tegra: annotate public functions
exynos: annotate public functions
meson: make symbols hidden by default
autotools: make symbols hidden by defaultMakefile.am | 1 + amdgpu/Makefile.am | 1 + amdgpu/amdgpu_bo.c | 104 ++++++------ amdgpu/amdgpu_cs.c | 137 +++++++-------- amdgpu/amdgpu_device.c | 19 ++- amdgpu/amdgpu_gpu_info.c | 51 +++--- amdgpu/amdgpu_vamgr.c | 24 +-- amdgpu/amdgpu_vm.c | 5 +- amdgpu/meson.build | 2 +- etnaviv/Makefile.am | 1 + etnaviv/etnaviv_bo.c | 25 +-- etnaviv/etnaviv_cmd_stream.c | 21 ++- etnaviv/etnaviv_device.c | 10 +- etnaviv/etnaviv_gpu.c | 6 +- etnaviv/etnaviv_perfmon.c | 8 +- etnaviv/etnaviv_pipe.c | 8 +- etnaviv/meson.build | 2 +- exynos/Makefile.am | 1 + exynos/exynos_drm.c | 30 ++-- exynos/exynos_fimg2d.c | 20 +-- exynos/meson.build | 2 +- freedreno/Makefile.am | 1 + freedreno/freedreno_bo.c | 32 ++-- freedreno/freedreno_device.c | 12 +- freedreno/freedreno_pipe.c | 14 +- freedreno/freedreno_ringbuffer.c | 40 ++--- freedreno/meson.build | 2 +- intel/Makefile.am | 1 + intel/intel_bufmgr.c | 64 +++---- intel/intel_bufmgr_fake.c | 10 +- intel/intel_bufmgr_gem.c | 73 ++++---- intel/intel_decode.c | 14 +- intel/meson.build | 4 +- libdrm_macros.h | 2 + libkms/Makefile.am | 1 + libkms/api.c | 16 +- libkms/meson.build | 2 +- meson.build | 5 +- nouveau/Makefile.am | 1 + nouveau/bufctx.c | 10 +- nouveau/meson.build | 2 +- nouveau/nouveau.c | 50 +++--- nouveau/pushbuf.c | 18 +- omap/Makefile.am | 1 + omap/meson.build | 2 +- omap/omap_drm.c | 36 ++-- radeon/Makefile.am | 1 + radeon/meson.build | 2 +- radeon/radeon_bo.c | 24 +-- radeon/radeon_bo_gem.c | 16 +- radeon/radeon_cs.c | 24 +-- radeon/radeon_cs_gem.c | 4 +- radeon/radeon_cs_space.c | 6 +- radeon/radeon_surface.c | 8 +- tegra/Makefile.am | 3 +- tegra/meson.build | 2 +- tegra/tegra.c | 26 +-- tests/Makefile.am | 1 + tests/amdgpu/Makefile.am | 1 + tests/etnaviv/Makefile.am | 1 + tests/exynos/Makefile.am | 1 + tests/exynos/meson.build | 6 +- tests/kms/Makefile.am | 3 +- tests/kms/meson.build | 2 +- tests/kmstest/Makefile.am | 1 + tests/kmstest/meson.build | 2 +- tests/meson.build | 8 +- tests/modeprint/Makefile.am | 1 + tests/modeprint/meson.build | 2 +- tests/modetest/Makefile.am | 1 + tests/modetest/meson.build | 2 +- tests/nouveau/Makefile.am | 1 + tests/nouveau/meson.build | 2 +- tests/proptest/Makefile.am | 1 + tests/proptest/meson.build | 2 +- tests/radeon/Makefile.am | 1 + tests/radeon/meson.build | 2 +- tests/tegra/Makefile.am | 4 +- tests/tegra/meson.build | 2 +- tests/vbltest/Makefile.am | 1 +
Quoted 12 lines
tests/vbltest/meson.build | 2 +- vc4/Makefile.am | 1 + xf86drm.c | 276 ++++++++++++++++--------------- xf86drmHash.c | 15 +- xf86drmMode.c | 158 ++++++++++-------- xf86drmRandom.c | 9 +- xf86drmSL.c | 23 +-- 87 files changed, 803 insertions(+), 736 deletions(-)Signature · 1 line
2.17.1
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 22 lines · Eric Engestrom
Quoted 7 lines · Lucas De Marchi
Rely on -fvisibility=hidden to hide the symbols. Previous version of this series applying only to drm_intel.so is
Reviewed-by Eric Engestrom <[email protected]>but it's not included here since I changed the approach for the build system change.
Patches 1 (intel), 5 (libdrm) and 12 (meson) are:
Reviewed-by Eric Engestrom <[email protected]>The rest of the series is:
Acked-by Eric Engestrom <[email protected]>You can also add the same change to Android:
----8<----Android.common.mk +0
-0
Android.common.mk
Quoted 8 lines
Android.common.mk +1
-1@@ -2,6 +2,7 @@ LOCAL_CFLAGS += \ -DMAJOR_IN_SYSMACROS=1 \ -DHAVE_VISIBILITY=1 \ + -fvisibility=hidden \ -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1 LOCAL_CFLAGS += \ ---->8----
thanks. I added a commit on top with that. I also collected the other ack/rev and pushed to my gitlab repo. I will wait to see if I will resend for someone to push this through or if I will get write access soon.
Quoted 2 lines
After that, the
drm_privatemacro is ready to be removed :)
yep, but the coding reformat is a nightmare since I have realig parameters to the opening parenthesis in several (but not all) cases. I may need to try some other automation for that (git-clang-format?, clang-tidy?, coccinelle?, ...).
thanks
Lucas De Marchi
Quoted 122 lines
Quoted 122 lines
drm_privatecan also be removed from other symbols but it proved to be a lot of manual work to re-align all the fields, so I decided to leave it to be done on top as a cleanup.There were lots of changes to param alignement that had to be done manually, I may have missed some.
Changes from v1:
- Include changes for all other sub-libraries
- Include changes to autotools
- Make main Makefil.am and meson.build define the required flagThis is build-tested locally and on gitlab:
https://gitlab.freedesktop.org/demarchi/drm/pipelines/4339Lucas De Marchi (13):
intel: annotate public functions
libkms: annotate public functions
nouveau: annotate public functions
libkms: annotate public functions
libdrm: annotate public functions
etnaviv: annotate public functions
freedreno: annotate public functions
omap: annotate public functions
radeon: annotate public functions
tegra: annotate public functions
exynos: annotate public functions
meson: make symbols hidden by default
autotools: make symbols hidden by defaultMakefile.am | 1 + amdgpu/Makefile.am | 1 + amdgpu/amdgpu_bo.c | 104 ++++++------ amdgpu/amdgpu_cs.c | 137 +++++++-------- amdgpu/amdgpu_device.c | 19 ++- amdgpu/amdgpu_gpu_info.c | 51 +++--- amdgpu/amdgpu_vamgr.c | 24 +-- amdgpu/amdgpu_vm.c | 5 +- amdgpu/meson.build | 2 +- etnaviv/Makefile.am | 1 + etnaviv/etnaviv_bo.c | 25 +-- etnaviv/etnaviv_cmd_stream.c | 21 ++- etnaviv/etnaviv_device.c | 10 +- etnaviv/etnaviv_gpu.c | 6 +- etnaviv/etnaviv_perfmon.c | 8 +- etnaviv/etnaviv_pipe.c | 8 +- etnaviv/meson.build | 2 +- exynos/Makefile.am | 1 + exynos/exynos_drm.c | 30 ++-- exynos/exynos_fimg2d.c | 20 +-- exynos/meson.build | 2 +- freedreno/Makefile.am | 1 + freedreno/freedreno_bo.c | 32 ++-- freedreno/freedreno_device.c | 12 +- freedreno/freedreno_pipe.c | 14 +- freedreno/freedreno_ringbuffer.c | 40 ++--- freedreno/meson.build | 2 +- intel/Makefile.am | 1 + intel/intel_bufmgr.c | 64 +++---- intel/intel_bufmgr_fake.c | 10 +- intel/intel_bufmgr_gem.c | 73 ++++---- intel/intel_decode.c | 14 +- intel/meson.build | 4 +- libdrm_macros.h | 2 + libkms/Makefile.am | 1 + libkms/api.c | 16 +- libkms/meson.build | 2 +- meson.build | 5 +- nouveau/Makefile.am | 1 + nouveau/bufctx.c | 10 +- nouveau/meson.build | 2 +- nouveau/nouveau.c | 50 +++--- nouveau/pushbuf.c | 18 +- omap/Makefile.am | 1 + omap/meson.build | 2 +- omap/omap_drm.c | 36 ++-- radeon/Makefile.am | 1 + radeon/meson.build | 2 +- radeon/radeon_bo.c | 24 +-- radeon/radeon_bo_gem.c | 16 +- radeon/radeon_cs.c | 24 +-- radeon/radeon_cs_gem.c | 4 +- radeon/radeon_cs_space.c | 6 +- radeon/radeon_surface.c | 8 +- tegra/Makefile.am | 3 +- tegra/meson.build | 2 +- tegra/tegra.c | 26 +-- tests/Makefile.am | 1 + tests/amdgpu/Makefile.am | 1 + tests/etnaviv/Makefile.am | 1 + tests/exynos/Makefile.am | 1 + tests/exynos/meson.build | 6 +- tests/kms/Makefile.am | 3 +- tests/kms/meson.build | 2 +- tests/kmstest/Makefile.am | 1 + tests/kmstest/meson.build | 2 +- tests/meson.build | 8 +- tests/modeprint/Makefile.am | 1 + tests/modeprint/meson.build | 2 +- tests/modetest/Makefile.am | 1 + tests/modetest/meson.build | 2 +- tests/nouveau/Makefile.am | 1 + tests/nouveau/meson.build | 2 +- tests/proptest/Makefile.am | 1 + tests/proptest/meson.build | 2 +- tests/radeon/Makefile.am | 1 + tests/radeon/meson.build | 2 +- tests/tegra/Makefile.am | 4 +- tests/tegra/meson.build | 2 +- tests/vbltest/Makefile.am | 1 + tests/vbltest/meson.build | 2 +- vc4/Makefile.am | 1 + xf86drm.c | 276 ++++++++++++++++--------------- xf86drmHash.c | 15 +- xf86drmMode.c | 158 ++++++++++-------- xf86drmRandom.c | 9 +- xf86drmSL.c | 23 +-- 87 files changed, 803 insertions(+), 736 deletions(-)
Quoted 3 lines
Quoted 3 lines
Signature · 1 line
2.17.1
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 6 lines · Eric Engestrom
Quoted 5 lines · Lucas De Marchi
Rely on -fvisibility=hidden to hide the symbols. Previous version of this series applying only to drm_intel.so is
Reviewed-by Eric Engestrom <[email protected]>
Quoted 8 lines
Quoted 2 lines
but it's not included here since I changed the approach for the build system change.
Patches 1 (intel), 5 (libdrm) and 12 (meson) are:
Reviewed-by Eric Engestrom <[email protected]>The rest of the series is:
Acked-by Eric Engestrom <[email protected]>
Added the r-b/a-b and pushed the series. Thanks.
Lucas De Marchi
Quoted 17 lines
You can also add the same change to Android:
----8<----Android.common.mk +1
-1@@ -2,6 +2,7 @@ LOCAL_CFLAGS += \ -DMAJOR_IN_SYSMACROS=1 \ -DHAVE_VISIBILITY=1 \ + -fvisibility=hidden \ -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1 LOCAL_CFLAGS += \ ---->8----
Quoted 126 lines
After that, the
drm_privatemacro is ready to be removed :)Quoted 124 lines
drm_privatecan also be removed from other symbols but it proved to be a lot of manual work to re-align all the fields, so I decided to leave it to be done on top as a cleanup.There were lots of changes to param alignement that had to be done manually, I may have missed some.
Changes from v1:
- Include changes for all other sub-libraries
- Include changes to autotools
- Make main Makefil.am and meson.build define the required flagThis is build-tested locally and on gitlab:
https://gitlab.freedesktop.org/demarchi/drm/pipelines/4339Lucas De Marchi (13):
intel: annotate public functions
libkms: annotate public functions
nouveau: annotate public functions
libkms: annotate public functions
libdrm: annotate public functions
etnaviv: annotate public functions
freedreno: annotate public functions
omap: annotate public functions
radeon: annotate public functions
tegra: annotate public functions
exynos: annotate public functions
meson: make symbols hidden by default
autotools: make symbols hidden by defaultMakefile.am | 1 + amdgpu/Makefile.am | 1 + amdgpu/amdgpu_bo.c | 104 ++++++------ amdgpu/amdgpu_cs.c | 137 +++++++-------- amdgpu/amdgpu_device.c | 19 ++- amdgpu/amdgpu_gpu_info.c | 51 +++--- amdgpu/amdgpu_vamgr.c | 24 +-- amdgpu/amdgpu_vm.c | 5 +- amdgpu/meson.build | 2 +- etnaviv/Makefile.am | 1 + etnaviv/etnaviv_bo.c | 25 +-- etnaviv/etnaviv_cmd_stream.c | 21 ++- etnaviv/etnaviv_device.c | 10 +- etnaviv/etnaviv_gpu.c | 6 +- etnaviv/etnaviv_perfmon.c | 8 +- etnaviv/etnaviv_pipe.c | 8 +- etnaviv/meson.build | 2 +- exynos/Makefile.am | 1 + exynos/exynos_drm.c | 30 ++-- exynos/exynos_fimg2d.c | 20 +-- exynos/meson.build | 2 +- freedreno/Makefile.am | 1 + freedreno/freedreno_bo.c | 32 ++-- freedreno/freedreno_device.c | 12 +- freedreno/freedreno_pipe.c | 14 +- freedreno/freedreno_ringbuffer.c | 40 ++--- freedreno/meson.build | 2 +- intel/Makefile.am | 1 + intel/intel_bufmgr.c | 64 +++---- intel/intel_bufmgr_fake.c | 10 +- intel/intel_bufmgr_gem.c | 73 ++++---- intel/intel_decode.c | 14 +- intel/meson.build | 4 +- libdrm_macros.h | 2 + libkms/Makefile.am | 1 + libkms/api.c | 16 +- libkms/meson.build | 2 +- meson.build | 5 +- nouveau/Makefile.am | 1 + nouveau/bufctx.c | 10 +- nouveau/meson.build | 2 +- nouveau/nouveau.c | 50 +++--- nouveau/pushbuf.c | 18 +- omap/Makefile.am | 1 + omap/meson.build | 2 +- omap/omap_drm.c | 36 ++-- radeon/Makefile.am | 1 + radeon/meson.build | 2 +- radeon/radeon_bo.c | 24 +-- radeon/radeon_bo_gem.c | 16 +- radeon/radeon_cs.c | 24 +-- radeon/radeon_cs_gem.c | 4 +- radeon/radeon_cs_space.c | 6 +- radeon/radeon_surface.c | 8 +- tegra/Makefile.am | 3 +- tegra/meson.build | 2 +- tegra/tegra.c | 26 +-- tests/Makefile.am | 1 + tests/amdgpu/Makefile.am | 1 + tests/etnaviv/Makefile.am | 1 + tests/exynos/Makefile.am | 1 + tests/exynos/meson.build | 6 +- tests/kms/Makefile.am | 3 +- tests/kms/meson.build | 2 +- tests/kmstest/Makefile.am | 1 + tests/kmstest/meson.build | 2 +- tests/meson.build | 8 +- tests/modeprint/Makefile.am | 1 + tests/modeprint/meson.build | 2 +- tests/modetest/Makefile.am | 1 + tests/modetest/meson.build | 2 +- tests/nouveau/Makefile.am | 1 + tests/nouveau/meson.build | 2 +- tests/proptest/Makefile.am | 1 + tests/proptest/meson.build | 2 +- tests/radeon/Makefile.am | 1 + tests/radeon/meson.build | 2 +- tests/tegra/Makefile.am | 4 +- tests/tegra/meson.build | 2 +- tests/vbltest/Makefile.am | 1 + tests/vbltest/meson.build | 2 +- vc4/Makefile.am | 1 + xf86drm.c | 276 ++++++++++++++++--------------- xf86drmHash.c | 15 +- xf86drmMode.c | 158 ++++++++++-------- xf86drmRandom.c | 9 +- xf86drmSL.c | 23 +-- 87 files changed, 803 insertions(+), 736 deletions(-)Signature · 1 line
2.17.1
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 12 lines · Lucas De Marchi
Rely on -fvisibility=hidden to hide the symbols. Previous version of this series applying only to drm_intel.so is
Reviewed-by Eric Engestrom <[email protected]>but it's not included here since I changed the approach for the build system change.
drm_privatecan also be removed from other symbols but it proved to be a lot of manual work to re-align all the fields, so I decided to leave it to be done on top as a cleanup.
Did you read through the reasoning behind0f8da82500ec542e269092c0718479e25eaff5f6?
Alternatively you do not care too much about compat in said cases, which is fine.
My only request is - keep it only for the Intel bits.
Thanks
Emil
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 9 lines · Emil Velikov
Quoted 8 lines · Lucas De Marchi
Rely on -fvisibility=hidden to hide the symbols. Previous version of this series applying only to drm_intel.so is
Reviewed-by Eric Engestrom <[email protected]>but it's not included here since I changed the approach for the build system change.
Quoted 6 lines
Quoted 4 lines
drm_privatecan also be removed from other symbols but it proved to be a lot of manual work to re-align all the fields, so I decided to leave it to be done on top as a cleanup.Did you read through the reasoning behind
0f8da82500ec542e269092c0718479e25eaff5f6?
In v1 (https://lists.freedesktop.org/archives/dri-devel/2018-September/189639.html)
I had this:
From git log archeology and mention in another thread we used to pass -fvisibility=hidden, but reverted to the contrary due to bug in obscure toolchain some years ago (see 0f8da82500ec542e269092c0718479e25eaff5f6). I think it's time to revisit that decision: we have plenty of other projects doing that nowadays without problem.
It looks like for some reason this was not part of the coverletter in v2, sorry.
Quoted 4 lines
Alternatively you do not care too much about compat in said cases, which is fine.
My only request is - keep it only for the Intel bits.
this is not only for Intel bits, it's improving all the libdrm as a whole.
A decision/commit made 3 year can be revisited, we don't have to carry it forever. Do we have a problem with it *today*? If we do, then we may have another decision like working it around for the sad said compiler rather than for everybody. Default visibility hidden is a sane default adopted by multiple open source libraries as it avoids unwanted results that can't be taken back (like exporting a symbol that shouldn't have been) and reduces maintenance (just look at the custom scripts we have to keep checking the exported symbols).
Lucas De Marchi
Quoted 3 lines
Thanks
Emil
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel