1 /*
2  * Allwinner SoCs display driver.
3  *
4  * Copyright (C) 2016 Allwinner.
5  *
6  * This file is licensed under the terms of the GNU General Public
7  * License version 2.  This program is licensed "as is" without any
8  * warranty of any kind, whether express or implied.
9  */
10 #include "include.h"
11 #include "disp_features.h"
12 #include <sunxi_hal_common.h>
bsp_disp_feat_get_num_screens(void)13 s32 bsp_disp_feat_get_num_screens(void)
14 {
15     return de_feat_get_num_screens();
16 }
17 
bsp_disp_feat_get_num_devices(void)18 s32 bsp_disp_feat_get_num_devices(void)
19 {
20     return de_feat_get_num_devices();
21 }
22 
bsp_disp_feat_get_num_channels(u32 disp)23 s32 bsp_disp_feat_get_num_channels(u32 disp)
24 {
25     return de_feat_get_num_chns(disp);
26 }
27 
bsp_disp_feat_get_num_layers(u32 disp)28 s32 bsp_disp_feat_get_num_layers(u32 disp)
29 {
30     return de_feat_get_num_layers(disp);
31 }
32 
bsp_disp_feat_get_num_layers_by_chn(u32 disp,u32 chn)33 s32 bsp_disp_feat_get_num_layers_by_chn(u32 disp, u32 chn)
34 {
35     return de_feat_get_num_layers_by_chn(disp, chn);
36 }
37 
38 /**
39  * Query whether specified timing controller support the output_type spcified
40  * @disp: the index of timing controller
41  * @output_type: the display output type
42  * On support, returns 1. Otherwise, returns 0.
43  */
bsp_disp_feat_is_supported_output_types(u32 disp,u32 output_type)44 s32 bsp_disp_feat_is_supported_output_types(u32 disp,
45                         u32 output_type)
46 {
47     return de_feat_is_supported_output_types(disp, output_type);
48 }
49 
bsp_disp_feat_is_support_smbl(u32 disp)50 s32 bsp_disp_feat_is_support_smbl(u32 disp)
51 {
52     return de_feat_is_support_smbl(disp);
53 }
54 
bsp_disp_feat_is_support_capture(u32 disp)55 s32 bsp_disp_feat_is_support_capture(u32 disp)
56 {
57     return de_feat_is_support_wb(disp);
58 }
59 
bsp_disp_feat_is_support_enhance(u32 disp)60 s32 bsp_disp_feat_is_support_enhance(u32 disp)
61 {
62     return de_feat_is_support_vep(disp);
63 }
64 
disp_init_feat(void)65 s32 disp_init_feat(void)
66 {
67     return de_feat_init();
68 }
69 
disp_exit_feat(void)70 s32 disp_exit_feat(void)
71 {
72     return de_feat_exit();
73 }
74 
bsp_disp_feat_get_num_vdpo(void)75 u32 bsp_disp_feat_get_num_vdpo(void)
76 {
77     return de_feat_get_number_of_vdpo();
78 }
79