Move the drivers to a separate sub-directory
[profile/ivi/intel-emgd-kmod.git] / drivers / emgd / include / pi.h
1 /*
2  *-----------------------------------------------------------------------------
3  * Filename: pi.h
4  * $Revision: 1.7 $
5  *-----------------------------------------------------------------------------
6  * Copyright (c) 2002-2010, Intel Corporation.
7  *
8  * Permission is hereby granted, free of charge, to any person obtaining a copy
9  * of this software and associated documentation files (the "Software"), to deal
10  * in the Software without restriction, including without limitation the rights
11  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12  * copies of the Software, and to permit persons to whom the Software is
13  * furnished to do so, subject to the following conditions:
14  *
15  * The above copyright notice and this permission notice shall be included in
16  * all copies or substantial portions of the Software.
17  *
18  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24  * THE SOFTWARE.
25  *
26  *-----------------------------------------------------------------------------
27  * Description:
28  *
29  *-----------------------------------------------------------------------------
30  */
31
32 #ifndef _PI_H_
33 #define _PI_H_
34
35 #include <context.h>
36 #include <mode.h>
37 #include <pd.h>
38
39 /* power states */
40 #define IGD_DEVICE_ON 1
41 #define IGD_DEVICE_OFF 0
42
43 #define PI_FIRMWARE_EDID          0x1
44 #define PI_FIRMWARE_DISPLAYID     0x2
45
46 /* get_native_dtd() flags */
47 #define PI_ALL_TIMINGS            0x0001
48 #define PI_SUPPORTED_TIMINGS      0x0002
49 extern unsigned long get_native_dtd(igd_timing_info_t *timing_table,
50         unsigned long flags, pd_timing_t **native_dtd, unsigned long native_flags);
51
52 extern igd_timing_info_t crt_timing_table[];
53 extern int crt_timing_table_size;
54
55 #ifndef CONFIG_MICRO
56 extern igd_timing_info_t cea_timing_table[];
57 extern int cea_timing_table_size;
58 extern type_std_t cea_std_lookup[];
59 extern int cea_std_lookup_size;
60 #endif
61
62 extern int pi_pd_register(pd_driver_t *pd_driver);
63 extern int pi_pd_register(pd_driver_t *pd_driver);
64 extern int pi_read_regs(void *callback_context, pd_reg_t *list,
65                 unsigned long reg_type);
66 extern int pi_write_regs(void *callback_context, pd_reg_t *list,
67                 unsigned long reg_type);
68 extern int pi_program_port_dvo(igd_display_context_t *, unsigned long);
69 extern int pi_program_port_analog(igd_display_context_t *, unsigned long);
70 extern int pi_program_port_rgba(igd_display_context_t *, unsigned long);
71 extern int pi_program_port_lvds(igd_display_context_t *, unsigned long);
72
73 /* Function to get attr value from port driver attr list */
74 extern int pi_pd_find_attr_and_value(igd_display_port_t *port,
75                                                   unsigned long attr_id,
76                                                   unsigned long flag,
77                                                   pd_attr_t   **caller_pd_attr,
78                                                   unsigned long * attr_value);
79
80 /* Function to get attr value from user provided init attribute list */
81 extern int pi_get_port_init_attr(igd_display_port_t *port,
82                 unsigned long id,
83                 unsigned long *value);
84 extern int pi_save_mode_state(igd_display_port_t *port,
85                 reg_state_id_t reg_state_id);
86 #endif /* _PI_H_ */