1 /* 2 * Copyright (C) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED. 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License 6 * as published by the Free Software Foundation; either version 2 7 * of the License, or (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 */ 18 19 #ifndef __HIFB_VSYNC_H__ 20 #define __HIFB_VSYNC_H__ 21 22 #include "hi_type.h" 23 #include "hifb_vou_graphics.h" 24 #include "hifb.h" 25 #ifndef __HuaweiLite__ 26 #include <linux/dma-buf.h> 27 #endif 28 29 #ifdef __cplusplus 30 #if __cplusplus 31 extern "C" { 32 #endif 33 #endif /* __cplusplus */ 34 35 hi_void set_hifb_irq(unsigned int temp_hifb_irq); 36 hi_void set_hifb_soft_irq(unsigned int temp_hifb_soft_irq); 37 hi_void set_update_rotate_rect(bool temp_update_rotate_rect); 38 hi_void set_video_name(char *temp_video); 39 char *hifb_get_layer_mmz_names(hi_u32 layer_id); 40 #ifndef __HuaweiLite__ 41 hi_s32 hifb_init(hi_void); 42 struct dma_buf *hifb_memblock_export(phys_addr_t base, size_t size, int flags); 43 #endif 44 hi_void hifb_cleanup(hi_void); 45 46 int hifb_pts_init(void); 47 48 void hifb_pts_exit(void); 49 50 int hifb_vsync_init(void); 51 52 void hifb_vsync_exit(void); 53 54 int hifb_vsync_notify(void); 55 56 hi_u32 hifb_get_module_para(hi_void *args); 57 58 #ifdef __cplusplus 59 #if __cplusplus 60 } 61 #endif 62 #endif /* __cplusplus */ 63 64 #endif /* __HIFB_VSYNC_H__ */ 65 66