aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2009-11-24 13:32:59 -0500
committerDave Airlie <airlied@redhat.com>2009-12-07 19:22:44 -0500
commit5801ead6bd6bddf5505d6eab55f84d8ee8106cd8 (patch)
tree60cc75789c50aab78299499e05411c9140616bc2 /include/drm
parentf92a8b6758bdc0f277c4f42aa7d736a205ac9ded (diff)
drm/radeon/kms: add support for DP modesetting
Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/drm_dp_helper.h57
1 files changed, 42 insertions, 15 deletions
diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h
index f09b0b2a99b7..a49e791db0b0 100644
--- a/include/drm/drm_dp_helper.h
+++ b/include/drm/drm_dp_helper.h
@@ -43,18 +43,41 @@
43#define AUX_I2C_REPLY_MASK (0x3 << 6) 43#define AUX_I2C_REPLY_MASK (0x3 << 6)
44 44
45/* AUX CH addresses */ 45/* AUX CH addresses */
46#define DP_DPCD_REV 0x0 46/* DPCD */
47#define DP_DPCD_REV 0x000
47 48
48#define DP_LINK_BW_SET 0x100 49#define DP_MAX_LINK_RATE 0x001
50
51#define DP_MAX_LANE_COUNT 0x002
52# define DP_MAX_LANE_COUNT_MASK 0x1f
53# define DP_ENHANCED_FRAME_CAP (1 << 7)
54
55#define DP_MAX_DOWNSPREAD 0x003
56# define DP_NO_AUX_HANDSHAKE_LINK_TRAINING (1 << 6)
57
58#define DP_NORP 0x004
59
60#define DP_DOWNSTREAMPORT_PRESENT 0x005
61# define DP_DWN_STRM_PORT_PRESENT (1 << 0)
62# define DP_DWN_STRM_PORT_TYPE_MASK 0x06
63/* 00b = DisplayPort */
64/* 01b = Analog */
65/* 10b = TMDS or HDMI */
66/* 11b = Other */
67# define DP_FORMAT_CONVERSION (1 << 3)
68
69#define DP_MAIN_LINK_CHANNEL_CODING 0x006
70
71/* link configuration */
72#define DP_LINK_BW_SET 0x100
49# define DP_LINK_BW_1_62 0x06 73# define DP_LINK_BW_1_62 0x06
50# define DP_LINK_BW_2_7 0x0a 74# define DP_LINK_BW_2_7 0x0a
51 75
52#define DP_LANE_COUNT_SET 0x101 76#define DP_LANE_COUNT_SET 0x101
53# define DP_LANE_COUNT_MASK 0x0f 77# define DP_LANE_COUNT_MASK 0x0f
54# define DP_LANE_COUNT_ENHANCED_FRAME_EN (1 << 7) 78# define DP_LANE_COUNT_ENHANCED_FRAME_EN (1 << 7)
55 79
56#define DP_TRAINING_PATTERN_SET 0x102 80#define DP_TRAINING_PATTERN_SET 0x102
57
58# define DP_TRAINING_PATTERN_DISABLE 0 81# define DP_TRAINING_PATTERN_DISABLE 0
59# define DP_TRAINING_PATTERN_1 1 82# define DP_TRAINING_PATTERN_1 1
60# define DP_TRAINING_PATTERN_2 2 83# define DP_TRAINING_PATTERN_2 2
@@ -104,11 +127,14 @@
104 127
105#define DP_LANE0_1_STATUS 0x202 128#define DP_LANE0_1_STATUS 0x202
106#define DP_LANE2_3_STATUS 0x203 129#define DP_LANE2_3_STATUS 0x203
107
108# define DP_LANE_CR_DONE (1 << 0) 130# define DP_LANE_CR_DONE (1 << 0)
109# define DP_LANE_CHANNEL_EQ_DONE (1 << 1) 131# define DP_LANE_CHANNEL_EQ_DONE (1 << 1)
110# define DP_LANE_SYMBOL_LOCKED (1 << 2) 132# define DP_LANE_SYMBOL_LOCKED (1 << 2)
111 133
134#define DP_CHANNEL_EQ_BITS (DP_LANE_CR_DONE | \
135 DP_LANE_CHANNEL_EQ_DONE | \
136 DP_LANE_SYMBOL_LOCKED)
137
112#define DP_LANE_ALIGN_STATUS_UPDATED 0x204 138#define DP_LANE_ALIGN_STATUS_UPDATED 0x204
113 139
114#define DP_INTERLANE_ALIGN_DONE (1 << 0) 140#define DP_INTERLANE_ALIGN_DONE (1 << 0)
@@ -122,17 +148,18 @@
122 148
123#define DP_ADJUST_REQUEST_LANE0_1 0x206 149#define DP_ADJUST_REQUEST_LANE0_1 0x206
124#define DP_ADJUST_REQUEST_LANE2_3 0x207 150#define DP_ADJUST_REQUEST_LANE2_3 0x207
125 151# define DP_ADJUST_VOLTAGE_SWING_LANE0_MASK 0x03
126#define DP_ADJUST_VOLTAGE_SWING_LANE0_MASK 0x03 152# define DP_ADJUST_VOLTAGE_SWING_LANE0_SHIFT 0
127#define DP_ADJUST_VOLTAGE_SWING_LANE0_SHIFT 0 153# define DP_ADJUST_PRE_EMPHASIS_LANE0_MASK 0x0c
128#define DP_ADJUST_PRE_EMPHASIS_LANE0_MASK 0x0c 154# define DP_ADJUST_PRE_EMPHASIS_LANE0_SHIFT 2
129#define DP_ADJUST_PRE_EMPHASIS_LANE0_SHIFT 2 155# define DP_ADJUST_VOLTAGE_SWING_LANE1_MASK 0x30
130#define DP_ADJUST_VOLTAGE_SWING_LANE1_MASK 0x30 156# define DP_ADJUST_VOLTAGE_SWING_LANE1_SHIFT 4
131#define DP_ADJUST_VOLTAGE_SWING_LANE1_SHIFT 4 157# define DP_ADJUST_PRE_EMPHASIS_LANE1_MASK 0xc0
132#define DP_ADJUST_PRE_EMPHASIS_LANE1_MASK 0xc0 158# define DP_ADJUST_PRE_EMPHASIS_LANE1_SHIFT 6
133#define DP_ADJUST_PRE_EMPHASIS_LANE1_SHIFT 6
134 159
135#define DP_SET_POWER 0x600 160#define DP_SET_POWER 0x600
161# define DP_SET_POWER_D0 0x1
162# define DP_SET_POWER_D3 0x2
136 163
137#define MODE_I2C_START 1 164#define MODE_I2C_START 1
138#define MODE_I2C_WRITE 2 165#define MODE_I2C_WRITE 2