• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * g2d_ovl_v.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_H
18 #define _G2D_OVL_H
19 #include "g2d_rcq.h"
20 #include "g2d_mixer_type.h"
21 #include "g2d_mixer.h"
22 
23 struct g2d_mixer_frame;
24 struct ovl_v_submodule {
25 	struct g2d_reg_block *reg_blks;
26 	__u32 reg_blk_num;
27 	struct g2d_reg_mem_info *reg_info;
28 	__s32 (*destory)(struct ovl_v_submodule *p_ovl_v);
29 	__s32 (*apply)(struct ovl_v_submodule *p_ovl_v, g2d_image_enh *p_image);
30 	__s32 (*rcq_setup)(struct ovl_v_submodule *p_ovl_v, u8 __iomem *base,
31 			   struct g2d_rcq_mem_info *p_rcq_info);
32 	__u32 (*get_reg_block_num)(struct ovl_v_submodule *p_ovl_v);
33 	__u32 (*get_rcq_mem_size)(struct ovl_v_submodule *p_ovl_v);
34 	__s32 (*get_reg_block)(struct ovl_v_submodule *p_ovl_v, struct g2d_reg_block **blks);
35 	struct g2d_mixer_ovl_v_reg  *(*get_reg)(struct ovl_v_submodule *p_ovl_v);
36 	void (*set_block_dirty)(struct ovl_v_submodule *p_ovl_v, __u32 blk_id, __u32 dirty);
37 };
38 __s32 g2d_ovl_v_fc_set(struct ovl_v_submodule *p_ovl_v, __u32 color_value);
39 __s32 g2d_vlayer_set(struct ovl_v_submodule *p_ovl_v, __u32 sel,
40 		     g2d_image_enh *p_image);
41 
42 __s32 g2d_vlayer_overlay_set(struct ovl_v_submodule *p_ovl_v, __u32 sel,
43 					g2d_coor *coor,  __u32 w, __u32 h);
44 struct ovl_v_submodule *
45 g2d_ovl_v_submodule_setup(struct g2d_mixer_frame *p_frame);
46 __s32 g2d_ovl_v_calc_coarse(struct ovl_v_submodule *p_ovl_v, __u32 format, __u32 inw,
47 		      __u32 inh, __u32 outw, __u32 outh, __u32 *midw,
48 		      __u32 *midh);
49 
50 #endif /*End of file*/
51