#include <xf86drm.h>
+#include "libdrm.h"
#include "exynos_drm.h"
#include "exynos_drmif.h"
*
* 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;
*
* @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);
}
*
* 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 = {
*
* 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 = {
*
* @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;
* if true, return a exynos buffer object else NULL.
*
*/
-struct exynos_bo * exynos_bo_from_name(struct exynos_device *dev, uint32_t name)
+drm_public struct exynos_bo *
+exynos_bo_from_name(struct exynos_device *dev, uint32_t name)
{
struct exynos_bo *bo;
struct drm_gem_open req = {
*
* 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 = {
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;
}
*
* 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;
*
* @return: 0 on success, -1 on error, and errno will be set
*/
-int exynos_prime_handle_to_fd(struct exynos_device *dev, uint32_t handle,
- int *fd)
+drm_public int
+exynos_prime_handle_to_fd(struct exynos_device *dev, uint32_t handle, int *fd)
{
return drmPrimeHandleToFD(dev->fd, handle, 0, fd);
}
*
* @return: 0 on success, -1 on error, and errno will be set
*/
-int exynos_prime_fd_to_handle(struct exynos_device *dev, int fd,
- uint32_t *handle)
+drm_public int
+exynos_prime_fd_to_handle(struct exynos_device *dev, int fd, uint32_t *handle)
{
return drmPrimeFDToHandle(dev->fd, fd, handle);
}
*
* if true, return 0 else negative.
*/
-int exynos_vidi_connection(struct exynos_device *dev, uint32_t connect,
- uint32_t ext, void *edid)
+drm_public int
+exynos_vidi_connection(struct exynos_device *dev, uint32_t connect,
+ uint32_t ext, void *edid)
{
struct drm_exynos_vidi_connection req = {
.connection = connect,
#include <xf86drm.h>
+#include "libdrm.h"
#include "exynos_drm.h"
#include "fimg2d_reg.h"
#include "fimg2d.h"
*
* fd: a file descriptor to drm device driver opened.
*/
-struct g2d_context *g2d_init(int fd)
+drm_public struct g2d_context *g2d_init(int fd)
{
struct drm_exynos_g2d_get_ver ver;
struct g2d_context *ctx;
return ctx;
}
-void g2d_fini(struct g2d_context *ctx)
+drm_public void g2d_fini(struct g2d_context *ctx)
{
if (ctx)
free(ctx);
*
* @ctx: a pointer to g2d_context structure.
*/
-int g2d_exec(struct g2d_context *ctx)
+drm_public int g2d_exec(struct g2d_context *ctx)
{
struct drm_exynos_g2d_exec exec;
int ret;
* @w: width value to buffer filled with given color data.
* @h: height value to buffer filled with given color data.
*/
-int g2d_solid_fill(struct g2d_context *ctx, struct g2d_image *img,
+drm_public int
+g2d_solid_fill(struct g2d_context *ctx, struct g2d_image *img,
unsigned int x, unsigned int y, unsigned int w,
unsigned int h)
{
* @w: width value to source and destination buffers.
* @h: height value to source and destination buffers.
*/
-int g2d_copy(struct g2d_context *ctx, struct g2d_image *src,
+drm_public int
+g2d_copy(struct g2d_context *ctx, struct g2d_image *src,
struct g2d_image *dst, unsigned int src_x, unsigned int src_y,
unsigned int dst_x, unsigned dst_y, unsigned int w,
unsigned int h)
* @negative: indicate that it uses color negative to source and
* destination buffers.
*/
-int g2d_copy_with_scale(struct g2d_context *ctx, struct g2d_image *src,
+drm_public int
+g2d_copy_with_scale(struct g2d_context *ctx, struct g2d_image *src,
struct g2d_image *dst, unsigned int src_x,
unsigned int src_y, unsigned int src_w,
unsigned int src_h, unsigned int dst_x,
* @h: height value to source and destination buffer.
* @op: blend operation type.
*/
-int g2d_blend(struct g2d_context *ctx, struct g2d_image *src,
+drm_public int
+g2d_blend(struct g2d_context *ctx, struct g2d_image *src,
struct g2d_image *dst, unsigned int src_x,
unsigned int src_y, unsigned int dst_x, unsigned int dst_y,
unsigned int w, unsigned int h, enum e_g2d_op op)