1 /* 2 * g2d_wb/g2d_wb.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_WB_H 18 #define _G2D_WB_H 19 #include "g2d_rcq.h" 20 #include "g2d_mixer_type.h" 21 #include "g2d_mixer.h" 22 23 struct g2d_mixer_frame; 24 25 struct wb_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 wb_submodule *p_wb); 30 __s32 (*apply)(struct wb_submodule *p_wb, g2d_image_enh *p_image); 31 __s32 (*rcq_setup)(struct wb_submodule *p_wb, u8 __iomem *base, 32 struct g2d_rcq_mem_info *p_rcq_info); 33 __u32 (*get_reg_block_num)(struct wb_submodule *p_wb); 34 __u32 (*get_rcq_mem_size)(struct wb_submodule *p_wb); 35 __s32 (*get_reg_block)(struct wb_submodule *p_wb, struct g2d_reg_block **blks); 36 struct g2d_mixer_write_back_reg *(*get_reg)(struct wb_submodule *p_wb); 37 void (*set_block_dirty)(struct wb_submodule *p_wb, __u32 blk_id, __u32 dirty); 38 }; 39 struct wb_submodule *g2d_wb_submodule_setup(struct g2d_mixer_frame *p_frame); 40 __s32 g2d_wb_set(struct wb_submodule *p_wb, g2d_image_enh *p_image); 41 42 #endif 43