Subversion Repositories Kolibri OS

Rev

Rev 5270 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5270 Rev 6082
Line 40... Line 40...
40
 * MST: Multistream Transport - part of DP 1.2a
40
 * MST: Multistream Transport - part of DP 1.2a
41
 *
41
 *
42
 * 1.2 formally includes both eDP and DPI definitions.
42
 * 1.2 formally includes both eDP and DPI definitions.
43
 */
43
 */
Line -... Line 44...
-
 
44
 
-
 
45
#define DP_AUX_MAX_PAYLOAD_BYTES	16
44
 
46
 
45
#define DP_AUX_I2C_WRITE		0x0
47
#define DP_AUX_I2C_WRITE		0x0
46
#define DP_AUX_I2C_READ			0x1
48
#define DP_AUX_I2C_READ			0x1
47
#define DP_AUX_I2C_STATUS		0x2
49
#define DP_AUX_I2C_WRITE_STATUS_UPDATE	0x2
48
#define DP_AUX_I2C_MOT			0x4
50
#define DP_AUX_I2C_MOT			0x4
49
#define DP_AUX_NATIVE_WRITE		0x8
51
#define DP_AUX_NATIVE_WRITE		0x8
Line 50... Line 52...
50
#define DP_AUX_NATIVE_READ		0x9
52
#define DP_AUX_NATIVE_READ		0x9
Line 90... Line 92...
90
#define DP_DOWN_STREAM_PORT_COUNT	    0x007
92
#define DP_DOWN_STREAM_PORT_COUNT	    0x007
91
# define DP_PORT_COUNT_MASK		    0x0f
93
# define DP_PORT_COUNT_MASK		    0x0f
92
# define DP_MSA_TIMING_PAR_IGNORED	    (1 << 6) /* eDP */
94
# define DP_MSA_TIMING_PAR_IGNORED	    (1 << 6) /* eDP */
93
# define DP_OUI_SUPPORT			    (1 << 7)
95
# define DP_OUI_SUPPORT			    (1 << 7)
Line -... Line 96...
-
 
96
 
-
 
97
#define DP_RECEIVE_PORT_0_CAP_0		    0x008
-
 
98
# define DP_LOCAL_EDID_PRESENT		    (1 << 1)
-
 
99
# define DP_ASSOCIATED_TO_PRECEDING_PORT    (1 << 2)
-
 
100
 
-
 
101
#define DP_RECEIVE_PORT_0_BUFFER_SIZE	    0x009
-
 
102
 
-
 
103
#define DP_RECEIVE_PORT_1_CAP_0		    0x00a
-
 
104
#define DP_RECEIVE_PORT_1_BUFFER_SIZE       0x00b
94
 
105
 
95
#define DP_I2C_SPEED_CAP		    0x00c    /* DPI */
106
#define DP_I2C_SPEED_CAP		    0x00c    /* DPI */
96
# define DP_I2C_SPEED_1K		    0x01
107
# define DP_I2C_SPEED_1K		    0x01
97
# define DP_I2C_SPEED_5K		    0x02
108
# define DP_I2C_SPEED_5K		    0x02
98
# define DP_I2C_SPEED_10K		    0x04
109
# define DP_I2C_SPEED_10K		    0x04
99
# define DP_I2C_SPEED_100K		    0x08
110
# define DP_I2C_SPEED_100K		    0x08
100
# define DP_I2C_SPEED_400K		    0x10
111
# define DP_I2C_SPEED_400K		    0x10
Line 101... Line 112...
101
# define DP_I2C_SPEED_1M		    0x20
112
# define DP_I2C_SPEED_1M		    0x20
-
 
113
 
-
 
114
#define DP_EDP_CONFIGURATION_CAP            0x00d   /* XXX 1.2? */
-
 
115
# define DP_ALTERNATE_SCRAMBLER_RESET_CAP   (1 << 0)
-
 
116
# define DP_FRAMING_CHANGE_CAP		    (1 << 1)
102
 
117
# define DP_DPCD_DISPLAY_CONTROL_CAPABLE     (1 << 3) /* edp v1.2 or higher */
Line -... Line 118...
-
 
118
 
-
 
119
#define DP_TRAINING_AUX_RD_INTERVAL         0x00e   /* XXX 1.2? */
-
 
120
 
-
 
121
#define DP_ADAPTER_CAP			    0x00f   /* 1.2 */
-
 
122
# define DP_FORCE_LOAD_SENSE_CAP	    (1 << 0)
-
 
123
# define DP_ALTERNATE_I2C_PATTERN_CAP	    (1 << 1)
-
 
124
 
103
#define DP_EDP_CONFIGURATION_CAP            0x00d   /* XXX 1.2? */
125
#define DP_SUPPORTED_LINK_RATES		    0x010 /* eDP 1.4 */
104
#define DP_TRAINING_AUX_RD_INTERVAL         0x00e   /* XXX 1.2? */
126
# define DP_MAX_SUPPORTED_RATES		     8	    /* 16-bit little-endian */
105
 
127
 
Line 106... Line 128...
106
/* Multiple stream transport */
128
/* Multiple stream transport */
107
#define DP_FAUX_CAP			    0x020   /* 1.2 */
129
#define DP_FAUX_CAP			    0x020   /* 1.2 */
Line -... Line 130...
-
 
130
# define DP_FAUX_CAP_1			    (1 << 0)
-
 
131
 
-
 
132
#define DP_MSTM_CAP			    0x021   /* 1.2 */
-
 
133
# define DP_MST_CAP			    (1 << 0)
-
 
134
 
-
 
135
#define DP_NUMBER_OF_AUDIO_ENDPOINTS	    0x022   /* 1.2 */
-
 
136
 
-
 
137
/* AV_SYNC_DATA_BLOCK                                  1.2 */
-
 
138
#define DP_AV_GRANULARITY		    0x023
-
 
139
# define DP_AG_FACTOR_MASK		    (0xf << 0)
-
 
140
# define DP_AG_FACTOR_3MS		    (0 << 0)
-
 
141
# define DP_AG_FACTOR_2MS		    (1 << 0)
-
 
142
# define DP_AG_FACTOR_1MS		    (2 << 0)
-
 
143
# define DP_AG_FACTOR_500US		    (3 << 0)
-
 
144
# define DP_AG_FACTOR_200US		    (4 << 0)
-
 
145
# define DP_AG_FACTOR_100US		    (5 << 0)
-
 
146
# define DP_AG_FACTOR_10US		    (6 << 0)
-
 
147
# define DP_AG_FACTOR_1US		    (7 << 0)
-
 
148
# define DP_VG_FACTOR_MASK		    (0xf << 4)
-
 
149
# define DP_VG_FACTOR_3MS		    (0 << 4)
-
 
150
# define DP_VG_FACTOR_2MS		    (1 << 4)
-
 
151
# define DP_VG_FACTOR_1MS		    (2 << 4)
-
 
152
# define DP_VG_FACTOR_500US		    (3 << 4)
-
 
153
# define DP_VG_FACTOR_200US		    (4 << 4)
-
 
154
# define DP_VG_FACTOR_100US		    (5 << 4)
-
 
155
 
-
 
156
#define DP_AUD_DEC_LAT0			    0x024
-
 
157
#define DP_AUD_DEC_LAT1			    0x025
-
 
158
 
-
 
159
#define DP_AUD_PP_LAT0			    0x026
-
 
160
#define DP_AUD_PP_LAT1			    0x027
-
 
161
 
-
 
162
#define DP_VID_INTER_LAT		    0x028
-
 
163
 
-
 
164
#define DP_VID_PROG_LAT			    0x029
-
 
165
 
-
 
166
#define DP_REP_LAT			    0x02a
-
 
167
 
-
 
168
#define DP_AUD_DEL_INS0			    0x02b
-
 
169
#define DP_AUD_DEL_INS1			    0x02c
-
 
170
#define DP_AUD_DEL_INS2			    0x02d
-
 
171
/* End of AV_SYNC_DATA_BLOCK */
-
 
172
 
-
 
173
#define DP_RECEIVER_ALPM_CAP		    0x02e   /* eDP 1.4 */
108
# define DP_FAUX_CAP_1			    (1 << 0)
174
# define DP_ALPM_CAP			    (1 << 0)
Line 109... Line 175...
109
 
175
 
110
#define DP_MSTM_CAP			    0x021   /* 1.2 */
176
#define DP_SINK_DEVICE_AUX_FRAME_SYNC_CAP   0x02f   /* eDP 1.4 */
-
 
177
# define DP_AUX_FRAME_SYNC_CAP		    (1 << 0)
-
 
178
 
111
# define DP_MST_CAP			    (1 << 0)
179
#define DP_GUID				    0x030   /* 1.2 */
112
 
180
 
113
#define DP_GUID				    0x030   /* 1.2 */
181
#define DP_PSR_SUPPORT                      0x070   /* XXX 1.2? */
114
 
182
# define DP_PSR_IS_SUPPORTED                1
115
#define DP_PSR_SUPPORT                      0x070   /* XXX 1.2? */
183
# define DP_PSR2_IS_SUPPORTED		    2	    /* eDP 1.4 */
Line 151... Line 219...
151
# define DP_DS_VGA_12BPC		    2
219
# define DP_DS_VGA_12BPC		    2
152
# define DP_DS_VGA_16BPC		    3
220
# define DP_DS_VGA_16BPC		    3
Line 153... Line 221...
153
 
221
 
154
/* link configuration */
222
/* link configuration */
-
 
223
#define	DP_LINK_BW_SET		            0x100
155
#define	DP_LINK_BW_SET		            0x100
224
# define DP_LINK_RATE_TABLE		    0x00    /* eDP 1.4 */
156
# define DP_LINK_BW_1_62		    0x06
225
# define DP_LINK_BW_1_62		    0x06
157
# define DP_LINK_BW_2_7			    0x0a
226
# define DP_LINK_BW_2_7			    0x0a
Line 158... Line 227...
158
# define DP_LINK_BW_5_4			    0x14    /* 1.2 */
227
# define DP_LINK_BW_5_4			    0x14    /* 1.2 */
Line 166... Line 235...
166
# define DP_TRAINING_PATTERN_1		    1
235
# define DP_TRAINING_PATTERN_1		    1
167
# define DP_TRAINING_PATTERN_2		    2
236
# define DP_TRAINING_PATTERN_2		    2
168
# define DP_TRAINING_PATTERN_3		    3	    /* 1.2 */
237
# define DP_TRAINING_PATTERN_3		    3	    /* 1.2 */
169
# define DP_TRAINING_PATTERN_MASK	    0x3
238
# define DP_TRAINING_PATTERN_MASK	    0x3
Line -... Line 239...
-
 
239
 
170
 
240
/* DPCD 1.1 only. For DPCD >= 1.2 see per-lane DP_LINK_QUAL_LANEn_SET */
171
# define DP_LINK_QUAL_PATTERN_DISABLE	    (0 << 2)
241
# define DP_LINK_QUAL_PATTERN_11_DISABLE    (0 << 2)
172
# define DP_LINK_QUAL_PATTERN_D10_2	    (1 << 2)
242
# define DP_LINK_QUAL_PATTERN_11_D10_2	    (1 << 2)
173
# define DP_LINK_QUAL_PATTERN_ERROR_RATE    (2 << 2)
243
# define DP_LINK_QUAL_PATTERN_11_ERROR_RATE (2 << 2)
174
# define DP_LINK_QUAL_PATTERN_PRBS7	    (3 << 2)
244
# define DP_LINK_QUAL_PATTERN_11_PRBS7	    (3 << 2)
Line 175... Line 245...
175
# define DP_LINK_QUAL_PATTERN_MASK	    (3 << 2)
245
# define DP_LINK_QUAL_PATTERN_11_MASK	    (3 << 2)
176
 
246
 
Line 177... Line 247...
177
# define DP_RECOVERED_CLOCK_OUT_EN	    (1 << 4)
247
# define DP_RECOVERED_CLOCK_OUT_EN	    (1 << 4)
Line 213... Line 283...
213
 
283
 
214
#define DP_I2C_SPEED_CONTROL_STATUS	    0x109   /* DPI */
284
#define DP_I2C_SPEED_CONTROL_STATUS	    0x109   /* DPI */
Line 215... Line 285...
215
/* bitmask as for DP_I2C_SPEED_CAP */
285
/* bitmask as for DP_I2C_SPEED_CAP */
-
 
286
 
-
 
287
#define DP_EDP_CONFIGURATION_SET            0x10a   /* XXX 1.2? */
-
 
288
# define DP_ALTERNATE_SCRAMBLER_RESET_ENABLE (1 << 0)
-
 
289
# define DP_FRAMING_CHANGE_ENABLE	    (1 << 1)
-
 
290
# define DP_PANEL_SELF_TEST_ENABLE	    (1 << 7)
-
 
291
 
-
 
292
#define DP_LINK_QUAL_LANE0_SET		    0x10b   /* DPCD >= 1.2 */
-
 
293
#define DP_LINK_QUAL_LANE1_SET		    0x10c
-
 
294
#define DP_LINK_QUAL_LANE2_SET		    0x10d
-
 
295
#define DP_LINK_QUAL_LANE3_SET		    0x10e
-
 
296
# define DP_LINK_QUAL_PATTERN_DISABLE	    0
-
 
297
# define DP_LINK_QUAL_PATTERN_D10_2	    1
-
 
298
# define DP_LINK_QUAL_PATTERN_ERROR_RATE    2
-
 
299
# define DP_LINK_QUAL_PATTERN_PRBS7	    3
-
 
300
# define DP_LINK_QUAL_PATTERN_80BIT_CUSTOM  4
-
 
301
# define DP_LINK_QUAL_PATTERN_HBR2_EYE      5
-
 
302
# define DP_LINK_QUAL_PATTERN_MASK	    7
-
 
303
 
-
 
304
#define DP_TRAINING_LANE0_1_SET2	    0x10f
-
 
305
#define DP_TRAINING_LANE2_3_SET2	    0x110
-
 
306
# define DP_LANE02_POST_CURSOR2_SET_MASK    (3 << 0)
-
 
307
# define DP_LANE02_MAX_POST_CURSOR2_REACHED (1 << 2)
Line 216... Line 308...
216
 
308
# define DP_LANE13_POST_CURSOR2_SET_MASK    (3 << 4)
217
#define DP_EDP_CONFIGURATION_SET            0x10a   /* XXX 1.2? */
309
# define DP_LANE13_MAX_POST_CURSOR2_REACHED (1 << 6)
218
 
310
 
219
#define DP_MSTM_CTRL			    0x111   /* 1.2 */
311
#define DP_MSTM_CTRL			    0x111   /* 1.2 */
Line -... Line 312...
-
 
312
# define DP_MST_EN			    (1 << 0)
-
 
313
# define DP_UP_REQ_EN			    (1 << 1)
-
 
314
# define DP_UPSTREAM_IS_SRC		    (1 << 2)
-
 
315
 
-
 
316
#define DP_AUDIO_DELAY0			    0x112   /* 1.2 */
-
 
317
#define DP_AUDIO_DELAY1			    0x113
-
 
318
#define DP_AUDIO_DELAY2			    0x114
-
 
319
 
-
 
320
#define DP_LINK_RATE_SET		    0x115   /* eDP 1.4 */
-
 
321
# define DP_LINK_RATE_SET_SHIFT		    0
-
 
322
# define DP_LINK_RATE_SET_MASK		    (7 << 0)
-
 
323
 
-
 
324
#define DP_RECEIVER_ALPM_CONFIG		    0x116   /* eDP 1.4 */
-
 
325
# define DP_ALPM_ENABLE			    (1 << 0)
-
 
326
# define DP_ALPM_LOCK_ERROR_IRQ_HPD_ENABLE  (1 << 1)
-
 
327
 
-
 
328
#define DP_SINK_DEVICE_AUX_FRAME_SYNC_CONF  0x117   /* eDP 1.4 */
-
 
329
# define DP_AUX_FRAME_SYNC_ENABLE	    (1 << 0)
-
 
330
# define DP_IRQ_HPD_ENABLE		    (1 << 1)
-
 
331
 
-
 
332
#define DP_UPSTREAM_DEVICE_DP_PWR_NEED	    0x118   /* 1.2 */
-
 
333
# define DP_PWR_NOT_NEEDED		    (1 << 0)
220
# define DP_MST_EN			    (1 << 0)
334
 
221
# define DP_UP_REQ_EN			    (1 << 1)
335
#define DP_AUX_FRAME_SYNC_VALUE		    0x15c   /* eDP 1.4 */
222
# define DP_UPSTREAM_IS_SRC		    (1 << 2)
336
# define DP_AUX_FRAME_SYNC_VALID	    (1 << 0)
223
 
337
 
224
#define DP_PSR_EN_CFG			    0x170   /* XXX 1.2? */
338
#define DP_PSR_EN_CFG			    0x170   /* XXX 1.2? */
-
 
339
# define DP_PSR_ENABLE			    (1 << 0)
-
 
340
# define DP_PSR_MAIN_LINK_ACTIVE	    (1 << 1)
Line 225... Line 341...
225
# define DP_PSR_ENABLE			    (1 << 0)
341
# define DP_PSR_CRC_VERIFICATION	    (1 << 2)
226
# define DP_PSR_MAIN_LINK_ACTIVE	    (1 << 1)
342
# define DP_PSR_FRAME_CAPTURE		    (1 << 3)
Line 227... Line 343...
227
# define DP_PSR_CRC_VERIFICATION	    (1 << 2)
343
# define DP_PSR_SELECTIVE_UPDATE	    (1 << 4)
Line 302... Line 418...
302
#define DP_TEST_CRC_G_Y			    0x242
418
#define DP_TEST_CRC_G_Y			    0x242
303
#define DP_TEST_CRC_B_CB		    0x244
419
#define DP_TEST_CRC_B_CB		    0x244
Line 304... Line 420...
304
 
420
 
305
#define DP_TEST_SINK_MISC		    0x246
421
#define DP_TEST_SINK_MISC		    0x246
306
# define DP_TEST_CRC_SUPPORTED		    (1 << 5)
422
# define DP_TEST_CRC_SUPPORTED		    (1 << 5)
Line 307... Line 423...
307
# define DP_TEST_COUNT_MASK		    0x7
423
# define DP_TEST_COUNT_MASK		    0xf
308
 
424
 
309
#define DP_TEST_RESPONSE		    0x260
425
#define DP_TEST_RESPONSE		    0x260
310
# define DP_TEST_ACK			    (1 << 0)
426
# define DP_TEST_ACK			    (1 << 0)
Line 330... Line 446...
330
#define DP_SET_POWER                        0x600
446
#define DP_SET_POWER                        0x600
331
# define DP_SET_POWER_D0                    0x1
447
# define DP_SET_POWER_D0                    0x1
332
# define DP_SET_POWER_D3                    0x2
448
# define DP_SET_POWER_D3                    0x2
333
# define DP_SET_POWER_MASK                  0x3
449
# define DP_SET_POWER_MASK                  0x3
Line -... Line 450...
-
 
450
 
-
 
451
#define DP_EDP_DPCD_REV			    0x700    /* eDP 1.2 */
-
 
452
# define DP_EDP_11			    0x00
-
 
453
# define DP_EDP_12			    0x01
-
 
454
# define DP_EDP_13			    0x02
-
 
455
# define DP_EDP_14			    0x03
-
 
456
 
-
 
457
#define DP_EDP_GENERAL_CAP_1		    0x701
-
 
458
 
-
 
459
#define DP_EDP_BACKLIGHT_ADJUSTMENT_CAP     0x702
-
 
460
 
-
 
461
#define DP_EDP_GENERAL_CAP_2		    0x703
-
 
462
 
-
 
463
#define DP_EDP_GENERAL_CAP_3		    0x704    /* eDP 1.4 */
-
 
464
 
-
 
465
#define DP_EDP_DISPLAY_CONTROL_REGISTER     0x720
-
 
466
 
-
 
467
#define DP_EDP_BACKLIGHT_MODE_SET_REGISTER  0x721
-
 
468
 
-
 
469
#define DP_EDP_BACKLIGHT_BRIGHTNESS_MSB     0x722
-
 
470
#define DP_EDP_BACKLIGHT_BRIGHTNESS_LSB     0x723
-
 
471
 
-
 
472
#define DP_EDP_PWMGEN_BIT_COUNT             0x724
-
 
473
#define DP_EDP_PWMGEN_BIT_COUNT_CAP_MIN     0x725
-
 
474
#define DP_EDP_PWMGEN_BIT_COUNT_CAP_MAX     0x726
-
 
475
 
-
 
476
#define DP_EDP_BACKLIGHT_CONTROL_STATUS     0x727
-
 
477
 
-
 
478
#define DP_EDP_BACKLIGHT_FREQ_SET           0x728
-
 
479
 
-
 
480
#define DP_EDP_BACKLIGHT_FREQ_CAP_MIN_MSB   0x72a
-
 
481
#define DP_EDP_BACKLIGHT_FREQ_CAP_MIN_MID   0x72b
-
 
482
#define DP_EDP_BACKLIGHT_FREQ_CAP_MIN_LSB   0x72c
-
 
483
 
-
 
484
#define DP_EDP_BACKLIGHT_FREQ_CAP_MAX_MSB   0x72d
-
 
485
#define DP_EDP_BACKLIGHT_FREQ_CAP_MAX_MID   0x72e
-
 
486
#define DP_EDP_BACKLIGHT_FREQ_CAP_MAX_LSB   0x72f
-
 
487
 
-
 
488
#define DP_EDP_DBC_MINIMUM_BRIGHTNESS_SET   0x732
-
 
489
#define DP_EDP_DBC_MAXIMUM_BRIGHTNESS_SET   0x733
-
 
490
 
-
 
491
#define DP_EDP_REGIONAL_BACKLIGHT_BASE      0x740    /* eDP 1.4 */
-
 
492
#define DP_EDP_REGIONAL_BACKLIGHT_0	    0x741    /* eDP 1.4 */
334
 
493
 
335
#define DP_SIDEBAND_MSG_DOWN_REQ_BASE	    0x1000   /* 1.2 MST */
494
#define DP_SIDEBAND_MSG_DOWN_REQ_BASE	    0x1000   /* 1.2 MST */
336
#define DP_SIDEBAND_MSG_UP_REP_BASE	    0x1200   /* 1.2 MST */
495
#define DP_SIDEBAND_MSG_UP_REP_BASE	    0x1200   /* 1.2 MST */
337
#define DP_SIDEBAND_MSG_DOWN_REP_BASE	    0x1400   /* 1.2 MST */
496
#define DP_SIDEBAND_MSG_DOWN_REP_BASE	    0x1400   /* 1.2 MST */
Line 348... Line 507...
348
#define DP_LINK_SERVICE_IRQ_VECTOR_ESI0     0x2005   /* 1.2 */
507
#define DP_LINK_SERVICE_IRQ_VECTOR_ESI0     0x2005   /* 1.2 */
Line 349... Line 508...
349
 
508
 
350
#define DP_PSR_ERROR_STATUS                 0x2006  /* XXX 1.2? */
509
#define DP_PSR_ERROR_STATUS                 0x2006  /* XXX 1.2? */
351
# define DP_PSR_LINK_CRC_ERROR              (1 << 0)
510
# define DP_PSR_LINK_CRC_ERROR              (1 << 0)
-
 
511
# define DP_PSR_RFB_STORAGE_ERROR           (1 << 1)
Line 352... Line 512...
352
# define DP_PSR_RFB_STORAGE_ERROR           (1 << 1)
512
# define DP_PSR_VSC_SDP_UNCORRECTABLE_ERROR (1 << 2) /* eDP 1.4 */
353
 
513
 
Line 354... Line 514...
354
#define DP_PSR_ESI                          0x2007  /* XXX 1.2? */
514
#define DP_PSR_ESI                          0x2007  /* XXX 1.2? */
Line 361... Line 521...
361
# define DP_PSR_SINK_ACTIVE_SINK_SYNCED     3
521
# define DP_PSR_SINK_ACTIVE_SINK_SYNCED     3
362
# define DP_PSR_SINK_ACTIVE_RESYNC          4
522
# define DP_PSR_SINK_ACTIVE_RESYNC          4
363
# define DP_PSR_SINK_INTERNAL_ERROR         7
523
# define DP_PSR_SINK_INTERNAL_ERROR         7
364
# define DP_PSR_SINK_STATE_MASK             0x07
524
# define DP_PSR_SINK_STATE_MASK             0x07
Line -... Line 525...
-
 
525
 
-
 
526
#define DP_RECEIVER_ALPM_STATUS		    0x200b  /* eDP 1.4 */
-
 
527
# define DP_ALPM_LOCK_TIMEOUT_ERROR	    (1 << 0)
365
 
528
 
366
/* DP 1.2 Sideband message defines */
529
/* DP 1.2 Sideband message defines */
367
/* peer device type - DP 1.2a Table 2-92 */
530
/* peer device type - DP 1.2a Table 2-92 */
368
#define DP_PEER_DEVICE_NONE		0x0
531
#define DP_PEER_DEVICE_NONE		0x0
369
#define DP_PEER_DEVICE_SOURCE_OR_SST	0x1
532
#define DP_PEER_DEVICE_SOURCE_OR_SST	0x1
Line 403... Line 566...
403
#define MODE_I2C_START	1
566
#define MODE_I2C_START	1
404
#define MODE_I2C_WRITE	2
567
#define MODE_I2C_WRITE	2
405
#define MODE_I2C_READ	4
568
#define MODE_I2C_READ	4
406
#define MODE_I2C_STOP	8
569
#define MODE_I2C_STOP	8
Line -... Line 570...
-
 
570
 
-
 
571
/* DP 1.2 MST PORTs - Section 2.5.1 v1.2a spec */
-
 
572
#define DP_MST_PHYSICAL_PORT_0 0
-
 
573
#define DP_MST_LOGICAL_PORT_0 8
407
 
574
 
408
#define DP_LINK_STATUS_SIZE	   6
575
#define DP_LINK_STATUS_SIZE	   6
409
bool drm_dp_channel_eq_ok(const u8 link_status[DP_LINK_STATUS_SIZE],
576
bool drm_dp_channel_eq_ok(const u8 link_status[DP_LINK_STATUS_SIZE],
410
			  int lane_count);
577
			  int lane_count);
411
bool drm_dp_clock_recovery_ok(const u8 link_status[DP_LINK_STATUS_SIZE],
578
bool drm_dp_clock_recovery_ok(const u8 link_status[DP_LINK_STATUS_SIZE],
412
			      int lane_count);
579
			      int lane_count);
413
u8 drm_dp_get_adjust_request_voltage(const u8 link_status[DP_LINK_STATUS_SIZE],
580
u8 drm_dp_get_adjust_request_voltage(const u8 link_status[DP_LINK_STATUS_SIZE],
414
				     int lane);
581
				     int lane);
415
u8 drm_dp_get_adjust_request_pre_emphasis(const u8 link_status[DP_LINK_STATUS_SIZE],
582
u8 drm_dp_get_adjust_request_pre_emphasis(const u8 link_status[DP_LINK_STATUS_SIZE],
Line -... Line 583...
-
 
583
					  int lane);
416
					  int lane);
584
 
417
 
585
#define DP_BRANCH_OUI_HEADER_SIZE	0xc
Line 418... Line 586...
418
#define DP_RECEIVER_CAP_SIZE	0xf
586
#define DP_RECEIVER_CAP_SIZE		0xf
419
#define EDP_PSR_RECEIVER_CAP_SIZE	2
587
#define EDP_PSR_RECEIVER_CAP_SIZE	2
Line 468... Line 636...
468
{
636
{
469
	return dpcd[DP_DPCD_REV] >= 0x11 &&
637
	return dpcd[DP_DPCD_REV] >= 0x11 &&
470
		(dpcd[DP_MAX_LANE_COUNT] & DP_ENHANCED_FRAME_CAP);
638
		(dpcd[DP_MAX_LANE_COUNT] & DP_ENHANCED_FRAME_CAP);
471
}
639
}
Line -... Line 640...
-
 
640
 
-
 
641
static inline bool
-
 
642
drm_dp_tps3_supported(const u8 dpcd[DP_RECEIVER_CAP_SIZE])
-
 
643
{
-
 
644
	return dpcd[DP_DPCD_REV] >= 0x12 &&
-
 
645
		dpcd[DP_MAX_LANE_COUNT] & DP_TPS3_SUPPORTED;
-
 
646
}
472
 
647
 
473
/*
648
/*
474
 * DisplayPort AUX channel
649
 * DisplayPort AUX channel
Line 475... Line 650...
475
 */
650
 */
Line 514... Line 689...
514
 * helpers will return -EPROTO to make it simpler to check for failure.
689
 * helpers will return -EPROTO to make it simpler to check for failure.
515
 *
690
 *
516
 * An AUX channel can also be used to transport I2C messages to a sink. A
691
 * An AUX channel can also be used to transport I2C messages to a sink. A
517
 * typical application of that is to access an EDID that's present in the
692
 * typical application of that is to access an EDID that's present in the
518
 * sink device. The .transfer() function can also be used to execute such
693
 * sink device. The .transfer() function can also be used to execute such
519
 * transactions. The drm_dp_aux_register_i2c_bus() function registers an
694
 * transactions. The drm_dp_aux_register() function registers an I2C
520
 * I2C adapter that can be passed to drm_probe_ddc(). Upon removal, drivers
695
 * adapter that can be passed to drm_probe_ddc(). Upon removal, drivers
521
 * should call drm_dp_aux_unregister_i2c_bus() to remove the I2C adapter.
696
 * should call drm_dp_aux_unregister() to remove the I2C adapter.
-
 
697
 * The I2C adapter uses long transfers by default; if a partial response is
-
 
698
 * received, the adapter will drop down to the size given by the partial
-
 
699
 * response for this transaction only.
522
 *
700
 *
523
 * Note that the aux helper code assumes that the .transfer() function
701
 * Note that the aux helper code assumes that the .transfer() function
524
 * only modifies the reply field of the drm_dp_aux_msg structure.  The
702
 * only modifies the reply field of the drm_dp_aux_msg structure.  The
525
 * retry logic and i2c helpers assume this is the case.
703
 * retry logic and i2c helpers assume this is the case.
526
 */
704
 */
Line 584... Line 762...
584
	unsigned long capabilities;
762
	unsigned long capabilities;
585
};
763
};
Line 586... Line 764...
586
 
764
 
587
int drm_dp_link_probe(struct drm_dp_aux *aux, struct drm_dp_link *link);
765
int drm_dp_link_probe(struct drm_dp_aux *aux, struct drm_dp_link *link);
-
 
766
int drm_dp_link_power_up(struct drm_dp_aux *aux, struct drm_dp_link *link);
588
int drm_dp_link_power_up(struct drm_dp_aux *aux, struct drm_dp_link *link);
767
int drm_dp_link_power_down(struct drm_dp_aux *aux, struct drm_dp_link *link);
Line 589... Line 768...
589
int drm_dp_link_configure(struct drm_dp_aux *aux, struct drm_dp_link *link);
768
int drm_dp_link_configure(struct drm_dp_aux *aux, struct drm_dp_link *link);
590
 
769