• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 __HI_VOU_DEV_EXT_H__
20 #define __HI_VOU_DEV_EXT_H__
21 
22 #include <hi_common.h>
23 #include "hi_comm_vo_adapt.h"
24 #include "hi_comm_video_adapt.h"
25 typedef enum {
26     DITHER_OUT_BITWIDTH_8 = 0x0, /* dither output 8bit */
27     DITHER_OUT_BITWIDTH_10 = 0x1, /* dither output 10bit */
28 
29     DITHER_OUT_BITWIDTH_BUTT
30 } vo_dither_out_bitwidth;
31 
32 typedef enum {
33     VO_HIFB_INTTYPE_VO,
34     VO_HIFB_INTTYPE_VO_DISP,
35     VO_HIFB_INTTYPE_WBC,
36     VO_HIFB_INTTYPE_BUTT,
37 } vo_fb_int_type;
38 
39 typedef enum {
40     VO_INPUTFMT_ARGB_4444 = 0x48,
41     VO_INPUTFMT_ARGB_1555 = 0x49,
42     VO_INPUTFMT_ARGB_8888 = 0x68,
43 
44     VO_DISP_PIXELFORMAT_BUTT
45 } vo_disp_pixel_format;
46 
47 typedef struct {
48     vo_disp_pixel_format pixel_fmt;  /* new */
49     hi_u64 ar_phy_addr;
50     hi_u64 gb_phy_addr;  /* new */
51     hi_u32 frame_size0;  /* new */
52     hi_u32 frame_size1;  /* new */
53     hi_u32 width;  /* new */
54     hi_u32 height;  /* new */
55     hi_bool is_lossless_a;  /* new */
56     hi_bool is_lossless;  /* new */
57     hi_u32 offset;
58     hi_u32 stride;
59 } vo_graphic_dcmp_info;
60 
61 
62 typedef hi_s32 (*vo_fb_int_call_back)(const hi_void *paraml, const hi_void *paramr);
63 /* set vo dither output bitwidth */
64 typedef hi_s32 fn_vou_set_dither_out_bit_width(hi_mod_id mod_id, hi_vo_dev dev, vo_dither_out_bitwidth out_bit_width);
65 
66 typedef hi_s32 fn_vou_graphics_open_layer(hi_graphic_layer gfx_layer);
67 
68 typedef hi_s32 fn_vou_graphics_set_callback(hi_graphic_layer gfx_layer, vo_fb_int_type int_type,
69                                             vo_fb_int_call_back call_back, hi_void *arg);
70 typedef struct {
71     fn_vou_set_dither_out_bit_width *pfn_vou_set_dither_out_bit_width;
72     fn_vou_graphics_open_layer *pfn_vou_graphics_open_layer;
73     fn_vou_graphics_set_callback *pfn_vou_graphics_set_callback;
74 } vou_export_func;
75 #endif /* __HI_VOU_DEV_EXT_H__ */
76