• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * g2d_scal.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_SCAL_H
18 #define _G2D_SCAL_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 scaler_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 scaler_submodule *p_scal);
29 	__s32 (*rcq_setup)(struct scaler_submodule *p_scal, u8 __iomem *base,
30 			  struct g2d_rcq_mem_info *p_rcq_info);
31 	__u32 (*get_reg_block_num)(struct scaler_submodule *p_scal);
32 	__s32 (*apply)(struct scaler_submodule *p_scal, g2d_image_enh *p_image);
33 	__u32 (*get_rcq_mem_size)(struct scaler_submodule *p_scal);
34 	__s32 (*get_reg_block)(struct scaler_submodule *p_scal, struct g2d_reg_block **blks);
35 	struct g2d_mixer_video_scaler_reg  *(*get_reg)(struct scaler_submodule *p_scal);
36 	void (*set_block_dirty)(struct scaler_submodule *p_scal, __u32 blk_id, __u32 dirty);
37 };
38 
39 __s32 g2d_vsu_para_set(struct scaler_submodule *p_scal, __u32 fmt, __u32 in_w,
40 		       __u32 in_h, __u32 out_w, __u32 out_h, __u8 alpha);
41 struct scaler_submodule *g2d_scaler_submodule_setup(struct g2d_mixer_frame *p_frame);
42 
43 #endif /*End of file*/
44