• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * g2d_ovl_u/g2d_ovl_u.h
3  *
4  * Copyright (c) 2007-2019 Allwinnertech Co., Ltd.
5  * Author: zhengxiaobin <zhengxiaobin@allwinnertech.com>
6  *
7  * This software is licensed under the terms of the GNU General Public
8  * License version 2, as published by the Free Software Foundation, and
9  * may be copied, distributed, and modified under those terms.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  */
17 #ifndef _G2D_OVL_U_H
18 #define _G2D_OVL_U_H
19 
20 #include "g2d_rcq.h"
21 #include "g2d_mixer_type.h"
22 #include "g2d_mixer.h"
23 
24 struct g2d_mixer_frame;
25 struct ovl_u_submodule {
26 	struct g2d_reg_block *reg_blks;
27 	__u32 reg_blk_num;
28 	struct g2d_reg_mem_info *reg_info;
29 	__s32 (*destory)(struct ovl_u_submodule *p_ovl_u);
30 	__s32 (*rcq_setup)(struct ovl_u_submodule *p_ovl_u, u8 __iomem *base,
31 			   struct g2d_rcq_mem_info *p_rcq_info);
32 	__u32 (*get_reg_block_num)(struct ovl_u_submodule *p_ovl_u);
33 	__u32 (*get_rcq_mem_size)(struct ovl_u_submodule *p_ovl_u);
34 	__s32 (*get_reg_block)(struct ovl_u_submodule *p_ovl_u, struct g2d_reg_block **blks);
35 	struct g2d_mixer_ovl_u_reg  *(*get_reg)(struct ovl_u_submodule *p_ovl_u, __u32 sel);
36 	void (*set_block_dirty)(struct ovl_u_submodule *p_ovl_u, __u32 blk_id, __u32 dirty);
37 };
38 
39 __s32 g2d_ovl_u_fc_set(struct ovl_u_submodule *p_ovl_u, __u32 sel,
40 		       __u32 color_value);
41 __s32 g2d_uilayer_set(struct ovl_u_submodule *p_ovl_u, __u32 sel,
42 		      g2d_image_enh *img);
43 
44 __s32 g2d_uilayer_overlay_set(struct ovl_u_submodule *p_ovl_u, __u32 sel,
45 					g2d_coor *coor,  __u32 w, __u32 h);
46 
47 struct ovl_u_submodule *
48 g2d_ovl_u_submodule_setup(struct g2d_mixer_frame *p_frame);
49 
50 #endif /*End of file*/
51