exynos: annotate public functions

while read sym; do
	read f func line _ <<<$(cscope -d -L -1 $sym)
	if [ ! -z "$f" ]; then
		sed -i "${line}s/^/drm_public /" $f
	fi
done < /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.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Acked-by: Eric Engestrom <eric.engestrom@intel.com>
main
Lucas De Marchi 2018-09-13 16:13:06 -07:00
parent d1db9dd200
commit 67967e9b5c
2 changed files with 25 additions and 25 deletions

View File

@ -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,7 +87,7 @@ 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,
drm_public struct exynos_bo * exynos_bo_create(struct exynos_device *dev,
size_t size, uint32_t flags)
{
struct exynos_bo *bo;
@ -141,7 +141,7 @@ fail:
*
* if true, return 0 else negative.
*/
int exynos_bo_get_info(struct exynos_device *dev, uint32_t handle,
drm_public int exynos_bo_get_info(struct exynos_device *dev, uint32_t handle,
size_t *size, uint32_t *flags)
{
int ret;
@ -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 int
exynos_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 int
exynos_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 int
exynos_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 int
exynos_handle_event(struct exynos_device *dev, struct exynos_event_context *ctx)
{
char buffer[1024];

View File

@ -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 int
g2d_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,