exynos/fimg2d: remove g2d_context from public header

All functions from the public API only operation on
struct g2d_context*, so this shouldn't break too much.

Make the context private since we don't want the
user to modify its content directly. Also remove
the defines that were only used for fields of
g2d_context.

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
main
Tobias Jakobi 2015-09-08 17:22:34 +02:00 committed by Emil Velikov
parent ce4a4f6e21
commit df21b293e9
2 changed files with 16 additions and 13 deletions

View File

@ -44,6 +44,21 @@
#define MSG_PREFIX "exynos/fimg2d: " #define MSG_PREFIX "exynos/fimg2d: "
#define G2D_MAX_CMD_NR 64
#define G2D_MAX_GEM_CMD_NR 64
#define G2D_MAX_CMD_LIST_NR 64
struct g2d_context {
int fd;
unsigned int major;
unsigned int minor;
struct drm_exynos_g2d_cmd cmd[G2D_MAX_CMD_NR];
struct drm_exynos_g2d_cmd cmd_buf[G2D_MAX_GEM_CMD_NR];
unsigned int cmd_nr;
unsigned int cmd_buf_nr;
unsigned int cmdlist_nr;
};
enum g2d_base_addr_reg { enum g2d_base_addr_reg {
g2d_dst = 0, g2d_dst = 0,
g2d_src g2d_src

View File

@ -13,9 +13,6 @@
#ifndef _FIMG2D_H_ #ifndef _FIMG2D_H_
#define _FIMG2D_H_ #define _FIMG2D_H_
#define G2D_MAX_CMD_NR 64
#define G2D_MAX_GEM_CMD_NR 64
#define G2D_MAX_CMD_LIST_NR 64
#define G2D_PLANE_MAX_NR 2 #define G2D_PLANE_MAX_NR 2
enum e_g2d_color_mode { enum e_g2d_color_mode {
@ -289,16 +286,7 @@ struct g2d_image {
void *mapped_ptr[G2D_PLANE_MAX_NR]; void *mapped_ptr[G2D_PLANE_MAX_NR];
}; };
struct g2d_context { struct g2d_context;
int fd;
unsigned int major;
unsigned int minor;
struct drm_exynos_g2d_cmd cmd[G2D_MAX_CMD_NR];
struct drm_exynos_g2d_cmd cmd_buf[G2D_MAX_GEM_CMD_NR];
unsigned int cmd_nr;
unsigned int cmd_buf_nr;
unsigned int cmdlist_nr;
};
struct g2d_context *g2d_init(int fd); struct g2d_context *g2d_init(int fd);
void g2d_fini(struct g2d_context *ctx); void g2d_fini(struct g2d_context *ctx);