1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26 #ifndef __DAL_LINK_SERVICE_TYPES_H__
27 #define __DAL_LINK_SERVICE_TYPES_H__
28
29 #include "grph_object_id.h"
30 #include "dal_types.h"
31 #include "irq_types.h"
32
33
34 struct ddc;
35 struct irq_manager;
36
37 enum {
38 MAX_CONTROLLER_NUM = 6
39 };
40
41 enum dp_power_state {
42 DP_POWER_STATE_D0 = 1,
43 DP_POWER_STATE_D3
44 };
45
46 enum edp_revision {
47
48 EDP_REVISION_11 = 0x00,
49
50 EDP_REVISION_12 = 0x01,
51
52 EDP_REVISION_13 = 0x02
53 };
54
55 enum {
56 LINK_RATE_REF_FREQ_IN_KHZ = 27000
57 };
58
59 enum link_training_result {
60 LINK_TRAINING_SUCCESS,
61 LINK_TRAINING_CR_FAIL_LANE0,
62 LINK_TRAINING_CR_FAIL_LANE1,
63 LINK_TRAINING_CR_FAIL_LANE23,
64
65 LINK_TRAINING_EQ_FAIL_CR,
66
67 LINK_TRAINING_EQ_FAIL_EQ,
68 LINK_TRAINING_LQA_FAIL,
69 };
70
71 struct link_training_settings {
72 struct dc_link_settings link_settings;
73 struct dc_lane_settings lane_settings[LANE_COUNT_DP_MAX];
74
75 enum dc_voltage_swing *voltage_swing;
76 enum dc_pre_emphasis *pre_emphasis;
77 enum dc_post_cursor2 *post_cursor2;
78
79 uint16_t cr_pattern_time;
80 uint16_t eq_pattern_time;
81 enum dc_dp_training_pattern pattern_for_eq;
82
83 bool enhanced_framing;
84 bool allow_invalid_msa_timing_param;
85 };
86
87
88
89 enum dp_test_pattern {
90
91
92 DP_TEST_PATTERN_VIDEO_MODE = 0,
93
94
95 DP_TEST_PATTERN_PHY_PATTERN_BEGIN,
96 DP_TEST_PATTERN_D102 = DP_TEST_PATTERN_PHY_PATTERN_BEGIN,
97 DP_TEST_PATTERN_SYMBOL_ERROR,
98 DP_TEST_PATTERN_PRBS7,
99 DP_TEST_PATTERN_80BIT_CUSTOM,
100 DP_TEST_PATTERN_CP2520_1,
101 DP_TEST_PATTERN_CP2520_2,
102 DP_TEST_PATTERN_HBR2_COMPLIANCE_EYE = DP_TEST_PATTERN_CP2520_2,
103 DP_TEST_PATTERN_CP2520_3,
104
105
106 DP_TEST_PATTERN_TRAINING_PATTERN1,
107 DP_TEST_PATTERN_TRAINING_PATTERN2,
108 DP_TEST_PATTERN_TRAINING_PATTERN3,
109 DP_TEST_PATTERN_TRAINING_PATTERN4,
110 DP_TEST_PATTERN_PHY_PATTERN_END = DP_TEST_PATTERN_TRAINING_PATTERN4,
111
112
113 DP_TEST_PATTERN_COLOR_SQUARES,
114 DP_TEST_PATTERN_COLOR_SQUARES_CEA,
115 DP_TEST_PATTERN_VERTICAL_BARS,
116 DP_TEST_PATTERN_HORIZONTAL_BARS,
117 DP_TEST_PATTERN_COLOR_RAMP,
118
119
120 DP_TEST_PATTERN_AUDIO_OPERATOR_DEFINED,
121 DP_TEST_PATTERN_AUDIO_SAWTOOTH,
122
123 DP_TEST_PATTERN_UNSUPPORTED
124 };
125
126 enum dp_panel_mode {
127
128 DP_PANEL_MODE_DEFAULT,
129
130 DP_PANEL_MODE_EDP,
131
132 DP_PANEL_MODE_SPECIAL
133 };
134
135
136 union dpcd_training_lane_set {
137 struct {
138 #if defined(LITTLEENDIAN_CPU)
139 uint8_t VOLTAGE_SWING_SET:2;
140 uint8_t MAX_SWING_REACHED:1;
141 uint8_t PRE_EMPHASIS_SET:2;
142 uint8_t MAX_PRE_EMPHASIS_REACHED:1;
143
144 uint8_t POST_CURSOR2_SET:2;
145 #elif defined(BIGENDIAN_CPU)
146 uint8_t POST_CURSOR2_SET:2;
147 uint8_t MAX_PRE_EMPHASIS_REACHED:1;
148 uint8_t PRE_EMPHASIS_SET:2;
149 uint8_t MAX_SWING_REACHED:1;
150 uint8_t VOLTAGE_SWING_SET:2;
151 #else
152 #error ARCH not defined!
153 #endif
154 } bits;
155
156 uint8_t raw;
157 };
158
159
160
161 struct dp_mst_stream_allocation {
162 uint8_t vcp_id;
163
164
165 uint8_t slot_count;
166 };
167
168
169 struct dp_mst_stream_allocation_table {
170
171 int stream_count;
172
173 struct dp_mst_stream_allocation stream_allocations[MAX_CONTROLLER_NUM];
174 };
175
176 #endif