aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2015-02-27 06:10:38 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-03-10 04:59:33 -0400
commit9474675afa9fe9d1145df0acb9fc15b6ad56a9f9 (patch)
treedd340471f6e18954bd9e2b804ad419e24cf3bfeb /include/drm
parent220dd2bc43e23f72fcdf6cc6ced3107c7023f123 (diff)
drm/dp: add DPCD definitions from DP 1.1 and 1.2a
Add a number of DPCD definitions from DP 1.1 and 1.2a. v2: drop wrong DP version reference, rename DP training set macros (Sonika). Reviewed-by: Sonika Jindal <sonika.jindal@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/drm_dp_helper.h93
1 files changed, 88 insertions, 5 deletions
diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h
index a3ecaa06c9db..319d5edfb3b5 100644
--- a/include/drm/drm_dp_helper.h
+++ b/include/drm/drm_dp_helper.h
@@ -92,6 +92,15 @@
92# define DP_MSA_TIMING_PAR_IGNORED (1 << 6) /* eDP */ 92# define DP_MSA_TIMING_PAR_IGNORED (1 << 6) /* eDP */
93# define DP_OUI_SUPPORT (1 << 7) 93# define DP_OUI_SUPPORT (1 << 7)
94 94
95#define DP_RECEIVE_PORT_0_CAP_0 0x008
96# define DP_LOCAL_EDID_PRESENT (1 << 1)
97# define DP_ASSOCIATED_TO_PRECEDING_PORT (1 << 2)
98
99#define DP_RECEIVE_PORT_0_BUFFER_SIZE 0x009
100
101#define DP_RECEIVE_PORT_1_CAP_0 0x00a
102#define DP_RECEIVE_PORT_1_BUFFER_SIZE 0x00b
103
95#define DP_I2C_SPEED_CAP 0x00c /* DPI */ 104#define DP_I2C_SPEED_CAP 0x00c /* DPI */
96# define DP_I2C_SPEED_1K 0x01 105# define DP_I2C_SPEED_1K 0x01
97# define DP_I2C_SPEED_5K 0x02 106# define DP_I2C_SPEED_5K 0x02
@@ -101,10 +110,16 @@
101# define DP_I2C_SPEED_1M 0x20 110# define DP_I2C_SPEED_1M 0x20
102 111
103#define DP_EDP_CONFIGURATION_CAP 0x00d /* XXX 1.2? */ 112#define DP_EDP_CONFIGURATION_CAP 0x00d /* XXX 1.2? */
113# define DP_ALTERNATE_SCRAMBLER_RESET_CAP (1 << 0)
114# define DP_FRAMING_CHANGE_CAP (1 << 1)
104# define DP_DPCD_DISPLAY_CONTROL_CAPABLE (1 << 3) /* edp v1.2 or higher */ 115# define DP_DPCD_DISPLAY_CONTROL_CAPABLE (1 << 3) /* edp v1.2 or higher */
105 116
106#define DP_TRAINING_AUX_RD_INTERVAL 0x00e /* XXX 1.2? */ 117#define DP_TRAINING_AUX_RD_INTERVAL 0x00e /* XXX 1.2? */
107 118
119#define DP_ADAPTER_CAP 0x00f /* 1.2 */
120# define DP_FORCE_LOAD_SENSE_CAP (1 << 0)
121# define DP_ALTERNATE_I2C_PATTERN_CAP (1 << 1)
122
108#define DP_SUPPORTED_LINK_RATES 0x010 /* eDP 1.4 */ 123#define DP_SUPPORTED_LINK_RATES 0x010 /* eDP 1.4 */
109# define DP_MAX_SUPPORTED_RATES 8 /* 16-bit little-endian */ 124# define DP_MAX_SUPPORTED_RATES 8 /* 16-bit little-endian */
110 125
@@ -115,6 +130,44 @@
115#define DP_MSTM_CAP 0x021 /* 1.2 */ 130#define DP_MSTM_CAP 0x021 /* 1.2 */
116# define DP_MST_CAP (1 << 0) 131# define DP_MST_CAP (1 << 0)
117 132
133#define DP_NUMBER_OF_AUDIO_ENDPOINTS 0x022 /* 1.2 */
134
135/* AV_SYNC_DATA_BLOCK 1.2 */
136#define DP_AV_GRANULARITY 0x023
137# define DP_AG_FACTOR_MASK (0xf << 0)
138# define DP_AG_FACTOR_3MS (0 << 0)
139# define DP_AG_FACTOR_2MS (1 << 0)
140# define DP_AG_FACTOR_1MS (2 << 0)
141# define DP_AG_FACTOR_500US (3 << 0)
142# define DP_AG_FACTOR_200US (4 << 0)
143# define DP_AG_FACTOR_100US (5 << 0)
144# define DP_AG_FACTOR_10US (6 << 0)
145# define DP_AG_FACTOR_1US (7 << 0)
146# define DP_VG_FACTOR_MASK (0xf << 4)
147# define DP_VG_FACTOR_3MS (0 << 4)
148# define DP_VG_FACTOR_2MS (1 << 4)
149# define DP_VG_FACTOR_1MS (2 << 4)
150# define DP_VG_FACTOR_500US (3 << 4)
151# define DP_VG_FACTOR_200US (4 << 4)
152# define DP_VG_FACTOR_100US (5 << 4)
153
154#define DP_AUD_DEC_LAT0 0x024
155#define DP_AUD_DEC_LAT1 0x025
156
157#define DP_AUD_PP_LAT0 0x026
158#define DP_AUD_PP_LAT1 0x027
159
160#define DP_VID_INTER_LAT 0x028
161
162#define DP_VID_PROG_LAT 0x029
163
164#define DP_REP_LAT 0x02a
165
166#define DP_AUD_DEL_INS0 0x02b
167#define DP_AUD_DEL_INS1 0x02c
168#define DP_AUD_DEL_INS2 0x02d
169/* End of AV_SYNC_DATA_BLOCK */
170
118#define DP_GUID 0x030 /* 1.2 */ 171#define DP_GUID 0x030 /* 1.2 */
119 172
120#define DP_PSR_SUPPORT 0x070 /* XXX 1.2? */ 173#define DP_PSR_SUPPORT 0x070 /* XXX 1.2? */
@@ -173,11 +226,12 @@
173# define DP_TRAINING_PATTERN_3 3 /* 1.2 */ 226# define DP_TRAINING_PATTERN_3 3 /* 1.2 */
174# define DP_TRAINING_PATTERN_MASK 0x3 227# define DP_TRAINING_PATTERN_MASK 0x3
175 228
176# define DP_LINK_QUAL_PATTERN_DISABLE (0 << 2) 229/* DPCD 1.1 only. For DPCD >= 1.2 see per-lane DP_LINK_QUAL_LANEn_SET */
177# define DP_LINK_QUAL_PATTERN_D10_2 (1 << 2) 230# define DP_LINK_QUAL_PATTERN_11_DISABLE (0 << 2)
178# define DP_LINK_QUAL_PATTERN_ERROR_RATE (2 << 2) 231# define DP_LINK_QUAL_PATTERN_11_D10_2 (1 << 2)
179# define DP_LINK_QUAL_PATTERN_PRBS7 (3 << 2) 232# define DP_LINK_QUAL_PATTERN_11_ERROR_RATE (2 << 2)
180# define DP_LINK_QUAL_PATTERN_MASK (3 << 2) 233# define DP_LINK_QUAL_PATTERN_11_PRBS7 (3 << 2)
234# define DP_LINK_QUAL_PATTERN_11_MASK (3 << 2)
181 235
182# define DP_RECOVERED_CLOCK_OUT_EN (1 << 4) 236# define DP_RECOVERED_CLOCK_OUT_EN (1 << 4)
183# define DP_LINK_SCRAMBLING_DISABLE (1 << 5) 237# define DP_LINK_SCRAMBLING_DISABLE (1 << 5)
@@ -220,14 +274,43 @@
220/* bitmask as for DP_I2C_SPEED_CAP */ 274/* bitmask as for DP_I2C_SPEED_CAP */
221 275
222#define DP_EDP_CONFIGURATION_SET 0x10a /* XXX 1.2? */ 276#define DP_EDP_CONFIGURATION_SET 0x10a /* XXX 1.2? */
277# define DP_ALTERNATE_SCRAMBLER_RESET_ENABLE (1 << 0)
278# define DP_FRAMING_CHANGE_ENABLE (1 << 1)
279# define DP_PANEL_SELF_TEST_ENABLE (1 << 7)
280
281#define DP_LINK_QUAL_LANE0_SET 0x10b /* DPCD >= 1.2 */
282#define DP_LINK_QUAL_LANE1_SET 0x10c
283#define DP_LINK_QUAL_LANE2_SET 0x10d
284#define DP_LINK_QUAL_LANE3_SET 0x10e
285# define DP_LINK_QUAL_PATTERN_DISABLE 0
286# define DP_LINK_QUAL_PATTERN_D10_2 1
287# define DP_LINK_QUAL_PATTERN_ERROR_RATE 2
288# define DP_LINK_QUAL_PATTERN_PRBS7 3
289# define DP_LINK_QUAL_PATTERN_80BIT_CUSTOM 4
290# define DP_LINK_QUAL_PATTERN_HBR2_EYE 5
291# define DP_LINK_QUAL_PATTERN_MASK 7
292
293#define DP_TRAINING_LANE0_1_SET2 0x10f
294#define DP_TRAINING_LANE2_3_SET2 0x110
295# define DP_LANE02_POST_CURSOR2_SET_MASK (3 << 0)
296# define DP_LANE02_MAX_POST_CURSOR2_REACHED (1 << 2)
297# define DP_LANE13_POST_CURSOR2_SET_MASK (3 << 4)
298# define DP_LANE13_MAX_POST_CURSOR2_REACHED (1 << 6)
223 299
224#define DP_MSTM_CTRL 0x111 /* 1.2 */ 300#define DP_MSTM_CTRL 0x111 /* 1.2 */
225# define DP_MST_EN (1 << 0) 301# define DP_MST_EN (1 << 0)
226# define DP_UP_REQ_EN (1 << 1) 302# define DP_UP_REQ_EN (1 << 1)
227# define DP_UPSTREAM_IS_SRC (1 << 2) 303# define DP_UPSTREAM_IS_SRC (1 << 2)
228 304
305#define DP_AUDIO_DELAY0 0x112 /* 1.2 */
306#define DP_AUDIO_DELAY1 0x113
307#define DP_AUDIO_DELAY2 0x114
308
229#define DP_LINK_RATE_SET 0x115 /* eDP 1.4 */ 309#define DP_LINK_RATE_SET 0x115 /* eDP 1.4 */
230 310
311#define DP_UPSTREAM_DEVICE_DP_PWR_NEED 0x118 /* 1.2 */
312# define DP_PWR_NOT_NEEDED (1 << 0)
313
231#define DP_PSR_EN_CFG 0x170 /* XXX 1.2? */ 314#define DP_PSR_EN_CFG 0x170 /* XXX 1.2? */
232# define DP_PSR_ENABLE (1 << 0) 315# define DP_PSR_ENABLE (1 << 0)
233# define DP_PSR_MAIN_LINK_ACTIVE (1 << 1) 316# define DP_PSR_MAIN_LINK_ACTIVE (1 << 1)