diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2012-03-28 13:19:06 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-04-24 04:50:13 -0400 |
commit | 3a2a67aa28725bb500505087067e7830cfa9c137 (patch) | |
tree | 86194e6e69f34092d19aa8970d9c09fba7423ade | |
parent | eccea7920cfb009c2fa40e9ecdce8c36f61cab66 (diff) |
drm/radeon/kms: add register definitions for audio
This adds register definitions for HDMI/DP audio on
DCE2/3/4/5 hardware.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | drivers/gpu/drm/radeon/evergreend.h | 220 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/r600d.h | 236 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/rs600d.h | 14 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/rv770d.h | 191 |
4 files changed, 661 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/evergreend.h b/drivers/gpu/drm/radeon/evergreend.h index b4eefc355f16..79130bfd1d6f 100644 --- a/drivers/gpu/drm/radeon/evergreend.h +++ b/drivers/gpu/drm/radeon/evergreend.h | |||
@@ -112,6 +112,226 @@ | |||
112 | #define CP_SEM_INCOMPLETE_TIMER_CNTL 0x85C8 | 112 | #define CP_SEM_INCOMPLETE_TIMER_CNTL 0x85C8 |
113 | #define CP_DEBUG 0xC1FC | 113 | #define CP_DEBUG 0xC1FC |
114 | 114 | ||
115 | /* Audio clocks */ | ||
116 | #define DCCG_AUDIO_DTO_SOURCE 0x05ac | ||
117 | # define DCCG_AUDIO_DTO0_SOURCE_SEL(x) ((x) << 0) /* crtc0 - crtc5 */ | ||
118 | # define DCCG_AUDIO_DTO_SEL (1 << 4) /* 0=dto0 1=dto1 */ | ||
119 | |||
120 | #define DCCG_AUDIO_DTO0_PHASE 0x05b0 | ||
121 | #define DCCG_AUDIO_DTO0_MODULE 0x05b4 | ||
122 | #define DCCG_AUDIO_DTO0_LOAD 0x05b8 | ||
123 | #define DCCG_AUDIO_DTO0_CNTL 0x05bc | ||
124 | |||
125 | #define DCCG_AUDIO_DTO1_PHASE 0x05c0 | ||
126 | #define DCCG_AUDIO_DTO1_MODULE 0x05c4 | ||
127 | #define DCCG_AUDIO_DTO1_LOAD 0x05c8 | ||
128 | #define DCCG_AUDIO_DTO1_CNTL 0x05cc | ||
129 | |||
130 | /* DCE 4.0 AFMT */ | ||
131 | #define HDMI_CONTROL 0x7030 | ||
132 | # define HDMI_KEEPOUT_MODE (1 << 0) | ||
133 | # define HDMI_PACKET_GEN_VERSION (1 << 4) /* 0 = r6xx compat */ | ||
134 | # define HDMI_ERROR_ACK (1 << 8) | ||
135 | # define HDMI_ERROR_MASK (1 << 9) | ||
136 | # define HDMI_DEEP_COLOR_ENABLE (1 << 24) | ||
137 | # define HDMI_DEEP_COLOR_DEPTH (((x) & 3) << 28) | ||
138 | # define HDMI_24BIT_DEEP_COLOR 0 | ||
139 | # define HDMI_30BIT_DEEP_COLOR 1 | ||
140 | # define HDMI_36BIT_DEEP_COLOR 2 | ||
141 | #define HDMI_STATUS 0x7034 | ||
142 | # define HDMI_ACTIVE_AVMUTE (1 << 0) | ||
143 | # define HDMI_AUDIO_PACKET_ERROR (1 << 16) | ||
144 | # define HDMI_VBI_PACKET_ERROR (1 << 20) | ||
145 | #define HDMI_AUDIO_PACKET_CONTROL 0x7038 | ||
146 | # define HDMI_AUDIO_DELAY_EN(x) (((x) & 3) << 4) | ||
147 | # define HDMI_AUDIO_PACKETS_PER_LINE(x) (((x) & 0x1f) << 16) | ||
148 | #define HDMI_ACR_PACKET_CONTROL 0x703c | ||
149 | # define HDMI_ACR_SEND (1 << 0) | ||
150 | # define HDMI_ACR_CONT (1 << 1) | ||
151 | # define HDMI_ACR_SELECT(x) (((x) & 3) << 4) | ||
152 | # define HDMI_ACR_HW 0 | ||
153 | # define HDMI_ACR_32 1 | ||
154 | # define HDMI_ACR_44 2 | ||
155 | # define HDMI_ACR_48 3 | ||
156 | # define HDMI_ACR_SOURCE (1 << 8) /* 0 - hw; 1 - cts value */ | ||
157 | # define HDMI_ACR_AUTO_SEND (1 << 12) | ||
158 | # define HDMI_ACR_N_MULTIPLE(x) (((x) & 7) << 16) | ||
159 | # define HDMI_ACR_X1 1 | ||
160 | # define HDMI_ACR_X2 2 | ||
161 | # define HDMI_ACR_X4 4 | ||
162 | # define HDMI_ACR_AUDIO_PRIORITY (1 << 31) | ||
163 | #define HDMI_VBI_PACKET_CONTROL 0x7040 | ||
164 | # define HDMI_NULL_SEND (1 << 0) | ||
165 | # define HDMI_GC_SEND (1 << 4) | ||
166 | # define HDMI_GC_CONT (1 << 5) /* 0 - once; 1 - every frame */ | ||
167 | #define HDMI_INFOFRAME_CONTROL0 0x7044 | ||
168 | # define HDMI_AVI_INFO_SEND (1 << 0) | ||
169 | # define HDMI_AVI_INFO_CONT (1 << 1) | ||
170 | # define HDMI_AUDIO_INFO_SEND (1 << 4) | ||
171 | # define HDMI_AUDIO_INFO_CONT (1 << 5) | ||
172 | # define HDMI_MPEG_INFO_SEND (1 << 8) | ||
173 | # define HDMI_MPEG_INFO_CONT (1 << 9) | ||
174 | #define HDMI_INFOFRAME_CONTROL1 0x7048 | ||
175 | # define HDMI_AVI_INFO_LINE(x) (((x) & 0x3f) << 0) | ||
176 | # define HDMI_AUDIO_INFO_LINE(x) (((x) & 0x3f) << 8) | ||
177 | # define HDMI_MPEG_INFO_LINE(x) (((x) & 0x3f) << 16) | ||
178 | #define HDMI_GENERIC_PACKET_CONTROL 0x704c | ||
179 | # define HDMI_GENERIC0_SEND (1 << 0) | ||
180 | # define HDMI_GENERIC0_CONT (1 << 1) | ||
181 | # define HDMI_GENERIC1_SEND (1 << 4) | ||
182 | # define HDMI_GENERIC1_CONT (1 << 5) | ||
183 | # define HDMI_GENERIC0_LINE(x) (((x) & 0x3f) << 16) | ||
184 | # define HDMI_GENERIC1_LINE(x) (((x) & 0x3f) << 24) | ||
185 | #define HDMI_GC 0x7058 | ||
186 | # define HDMI_GC_AVMUTE (1 << 0) | ||
187 | # define HDMI_GC_AVMUTE_CONT (1 << 2) | ||
188 | #define AFMT_AUDIO_PACKET_CONTROL2 0x705c | ||
189 | # define AFMT_AUDIO_LAYOUT_OVRD (1 << 0) | ||
190 | # define AFMT_AUDIO_LAYOUT_SELECT (1 << 1) | ||
191 | # define AFMT_60958_CS_SOURCE (1 << 4) | ||
192 | # define AFMT_AUDIO_CHANNEL_ENABLE(x) (((x) & 0xff) << 8) | ||
193 | # define AFMT_DP_AUDIO_STREAM_ID(x) (((x) & 0xff) << 16) | ||
194 | #define AFMT_AVI_INFO0 0x7084 | ||
195 | # define AFMT_AVI_INFO_CHECKSUM(x) (((x) & 0xff) << 0) | ||
196 | # define AFMT_AVI_INFO_S(x) (((x) & 3) << 8) | ||
197 | # define AFMT_AVI_INFO_B(x) (((x) & 3) << 10) | ||
198 | # define AFMT_AVI_INFO_A(x) (((x) & 1) << 12) | ||
199 | # define AFMT_AVI_INFO_Y(x) (((x) & 3) << 13) | ||
200 | # define AFMT_AVI_INFO_Y_RGB 0 | ||
201 | # define AFMT_AVI_INFO_Y_YCBCR422 1 | ||
202 | # define AFMT_AVI_INFO_Y_YCBCR444 2 | ||
203 | # define AFMT_AVI_INFO_Y_A_B_S(x) (((x) & 0xff) << 8) | ||
204 | # define AFMT_AVI_INFO_R(x) (((x) & 0xf) << 16) | ||
205 | # define AFMT_AVI_INFO_M(x) (((x) & 0x3) << 20) | ||
206 | # define AFMT_AVI_INFO_C(x) (((x) & 0x3) << 22) | ||
207 | # define AFMT_AVI_INFO_C_M_R(x) (((x) & 0xff) << 16) | ||
208 | # define AFMT_AVI_INFO_SC(x) (((x) & 0x3) << 24) | ||
209 | # define AFMT_AVI_INFO_Q(x) (((x) & 0x3) << 26) | ||
210 | # define AFMT_AVI_INFO_EC(x) (((x) & 0x3) << 28) | ||
211 | # define AFMT_AVI_INFO_ITC(x) (((x) & 0x1) << 31) | ||
212 | # define AFMT_AVI_INFO_ITC_EC_Q_SC(x) (((x) & 0xff) << 24) | ||
213 | #define AFMT_AVI_INFO1 0x7088 | ||
214 | # define AFMT_AVI_INFO_VIC(x) (((x) & 0x7f) << 0) /* don't use avi infoframe v1 */ | ||
215 | # define AFMT_AVI_INFO_PR(x) (((x) & 0xf) << 8) /* don't use avi infoframe v1 */ | ||
216 | # define AFMT_AVI_INFO_CN(x) (((x) & 0x3) << 12) | ||
217 | # define AFMT_AVI_INFO_YQ(x) (((x) & 0x3) << 14) | ||
218 | # define AFMT_AVI_INFO_TOP(x) (((x) & 0xffff) << 16) | ||
219 | #define AFMT_AVI_INFO2 0x708c | ||
220 | # define AFMT_AVI_INFO_BOTTOM(x) (((x) & 0xffff) << 0) | ||
221 | # define AFMT_AVI_INFO_LEFT(x) (((x) & 0xffff) << 16) | ||
222 | #define AFMT_AVI_INFO3 0x7090 | ||
223 | # define AFMT_AVI_INFO_RIGHT(x) (((x) & 0xffff) << 0) | ||
224 | # define AFMT_AVI_INFO_VERSION(x) (((x) & 3) << 24) | ||
225 | #define AFMT_MPEG_INFO0 0x7094 | ||
226 | # define AFMT_MPEG_INFO_CHECKSUM(x) (((x) & 0xff) << 0) | ||
227 | # define AFMT_MPEG_INFO_MB0(x) (((x) & 0xff) << 8) | ||
228 | # define AFMT_MPEG_INFO_MB1(x) (((x) & 0xff) << 16) | ||
229 | # define AFMT_MPEG_INFO_MB2(x) (((x) & 0xff) << 24) | ||
230 | #define AFMT_MPEG_INFO1 0x7098 | ||
231 | # define AFMT_MPEG_INFO_MB3(x) (((x) & 0xff) << 0) | ||
232 | # define AFMT_MPEG_INFO_MF(x) (((x) & 3) << 8) | ||
233 | # define AFMT_MPEG_INFO_FR(x) (((x) & 1) << 12) | ||
234 | #define AFMT_GENERIC0_HDR 0x709c | ||
235 | #define AFMT_GENERIC0_0 0x70a0 | ||
236 | #define AFMT_GENERIC0_1 0x70a4 | ||
237 | #define AFMT_GENERIC0_2 0x70a8 | ||
238 | #define AFMT_GENERIC0_3 0x70ac | ||
239 | #define AFMT_GENERIC0_4 0x70b0 | ||
240 | #define AFMT_GENERIC0_5 0x70b4 | ||
241 | #define AFMT_GENERIC0_6 0x70b8 | ||
242 | #define AFMT_GENERIC1_HDR 0x70bc | ||
243 | #define AFMT_GENERIC1_0 0x70c0 | ||
244 | #define AFMT_GENERIC1_1 0x70c4 | ||
245 | #define AFMT_GENERIC1_2 0x70c8 | ||
246 | #define AFMT_GENERIC1_3 0x70cc | ||
247 | #define AFMT_GENERIC1_4 0x70d0 | ||
248 | #define AFMT_GENERIC1_5 0x70d4 | ||
249 | #define AFMT_GENERIC1_6 0x70d8 | ||
250 | #define HDMI_ACR_32_0 0x70dc | ||
251 | # define HDMI_ACR_CTS_32(x) (((x) & 0xfffff) << 12) | ||
252 | #define HDMI_ACR_32_1 0x70e0 | ||
253 | # define HDMI_ACR_N_32(x) (((x) & 0xfffff) << 0) | ||
254 | #define HDMI_ACR_44_0 0x70e4 | ||
255 | # define HDMI_ACR_CTS_44(x) (((x) & 0xfffff) << 12) | ||
256 | #define HDMI_ACR_44_1 0x70e8 | ||
257 | # define HDMI_ACR_N_44(x) (((x) & 0xfffff) << 0) | ||
258 | #define HDMI_ACR_48_0 0x70ec | ||
259 | # define HDMI_ACR_CTS_48(x) (((x) & 0xfffff) << 12) | ||
260 | #define HDMI_ACR_48_1 0x70f0 | ||
261 | # define HDMI_ACR_N_48(x) (((x) & 0xfffff) << 0) | ||
262 | #define HDMI_ACR_STATUS_0 0x70f4 | ||
263 | #define HDMI_ACR_STATUS_1 0x70f8 | ||
264 | #define AFMT_AUDIO_INFO0 0x70fc | ||
265 | # define AFMT_AUDIO_INFO_CHECKSUM(x) (((x) & 0xff) << 0) | ||
266 | # define AFMT_AUDIO_INFO_CC(x) (((x) & 7) << 8) | ||
267 | # define AFMT_AUDIO_INFO_CT(x) (((x) & 0xf) << 11) | ||
268 | # define AFMT_AUDIO_INFO_CHECKSUM_OFFSET(x) (((x) & 0xff) << 16) | ||
269 | # define AFMT_AUDIO_INFO_CXT(x) (((x) & 0x1f) << 24) | ||
270 | #define AFMT_AUDIO_INFO1 0x7100 | ||
271 | # define AFMT_AUDIO_INFO_CA(x) (((x) & 0xff) << 0) | ||
272 | # define AFMT_AUDIO_INFO_LSV(x) (((x) & 0xf) << 11) | ||
273 | # define AFMT_AUDIO_INFO_DM_INH(x) (((x) & 1) << 15) | ||
274 | # define AFMT_AUDIO_INFO_DM_INH_LSV(x) (((x) & 0xff) << 8) | ||
275 | # define AFMT_AUDIO_INFO_LFEBPL(x) (((x) & 3) << 16) | ||
276 | #define AFMT_60958_0 0x7104 | ||
277 | # define AFMT_60958_CS_A(x) (((x) & 1) << 0) | ||
278 | # define AFMT_60958_CS_B(x) (((x) & 1) << 1) | ||
279 | # define AFMT_60958_CS_C(x) (((x) & 1) << 2) | ||
280 | # define AFMT_60958_CS_D(x) (((x) & 3) << 3) | ||
281 | # define AFMT_60958_CS_MODE(x) (((x) & 3) << 6) | ||
282 | # define AFMT_60958_CS_CATEGORY_CODE(x) (((x) & 0xff) << 8) | ||
283 | # define AFMT_60958_CS_SOURCE_NUMBER(x) (((x) & 0xf) << 16) | ||
284 | # define AFMT_60958_CS_CHANNEL_NUMBER_L(x) (((x) & 0xf) << 20) | ||
285 | # define AFMT_60958_CS_SAMPLING_FREQUENCY(x) (((x) & 0xf) << 24) | ||
286 | # define AFMT_60958_CS_CLOCK_ACCURACY(x) (((x) & 3) << 28) | ||
287 | #define AFMT_60958_1 0x7108 | ||
288 | # define AFMT_60958_CS_WORD_LENGTH(x) (((x) & 0xf) << 0) | ||
289 | # define AFMT_60958_CS_ORIGINAL_SAMPLING_FREQUENCY(x) (((x) & 0xf) << 4) | ||
290 | # define AFMT_60958_CS_VALID_L(x) (((x) & 1) << 16) | ||
291 | # define AFMT_60958_CS_VALID_R(x) (((x) & 1) << 18) | ||
292 | # define AFMT_60958_CS_CHANNEL_NUMBER_R(x) (((x) & 0xf) << 20) | ||
293 | #define AFMT_AUDIO_CRC_CONTROL 0x710c | ||
294 | # define AFMT_AUDIO_CRC_EN (1 << 0) | ||
295 | #define AFMT_RAMP_CONTROL0 0x7110 | ||
296 | # define AFMT_RAMP_MAX_COUNT(x) (((x) & 0xffffff) << 0) | ||
297 | # define AFMT_RAMP_DATA_SIGN (1 << 31) | ||
298 | #define AFMT_RAMP_CONTROL1 0x7114 | ||
299 | # define AFMT_RAMP_MIN_COUNT(x) (((x) & 0xffffff) << 0) | ||
300 | # define AFMT_AUDIO_TEST_CH_DISABLE(x) (((x) & 0xff) << 24) | ||
301 | #define AFMT_RAMP_CONTROL2 0x7118 | ||
302 | # define AFMT_RAMP_INC_COUNT(x) (((x) & 0xffffff) << 0) | ||
303 | #define AFMT_RAMP_CONTROL3 0x711c | ||
304 | # define AFMT_RAMP_DEC_COUNT(x) (((x) & 0xffffff) << 0) | ||
305 | #define AFMT_60958_2 0x7120 | ||
306 | # define AFMT_60958_CS_CHANNEL_NUMBER_2(x) (((x) & 0xf) << 0) | ||
307 | # define AFMT_60958_CS_CHANNEL_NUMBER_3(x) (((x) & 0xf) << 4) | ||
308 | # define AFMT_60958_CS_CHANNEL_NUMBER_4(x) (((x) & 0xf) << 8) | ||
309 | # define AFMT_60958_CS_CHANNEL_NUMBER_5(x) (((x) & 0xf) << 12) | ||
310 | # define AFMT_60958_CS_CHANNEL_NUMBER_6(x) (((x) & 0xf) << 16) | ||
311 | # define AFMT_60958_CS_CHANNEL_NUMBER_7(x) (((x) & 0xf) << 20) | ||
312 | #define AFMT_STATUS 0x7128 | ||
313 | # define AFMT_AUDIO_ENABLE (1 << 4) | ||
314 | # define AFMT_AUDIO_HBR_ENABLE (1 << 8) | ||
315 | # define AFMT_AZ_FORMAT_WTRIG (1 << 28) | ||
316 | # define AFMT_AZ_FORMAT_WTRIG_INT (1 << 29) | ||
317 | # define AFMT_AZ_AUDIO_ENABLE_CHG (1 << 30) | ||
318 | #define AFMT_AUDIO_PACKET_CONTROL 0x712c | ||
319 | # define AFMT_AUDIO_SAMPLE_SEND (1 << 0) | ||
320 | # define AFMT_RESET_FIFO_WHEN_AUDIO_DIS (1 << 11) /* set to 1 */ | ||
321 | # define AFMT_AUDIO_TEST_EN (1 << 12) | ||
322 | # define AFMT_AUDIO_CHANNEL_SWAP (1 << 24) | ||
323 | # define AFMT_60958_CS_UPDATE (1 << 26) | ||
324 | # define AFMT_AZ_AUDIO_ENABLE_CHG_MASK (1 << 27) | ||
325 | # define AFMT_AZ_FORMAT_WTRIG_MASK (1 << 28) | ||
326 | # define AFMT_AZ_FORMAT_WTRIG_ACK (1 << 29) | ||
327 | # define AFMT_AZ_AUDIO_ENABLE_CHG_ACK (1 << 30) | ||
328 | #define AFMT_VBI_PACKET_CONTROL 0x7130 | ||
329 | # define AFMT_GENERIC0_UPDATE (1 << 2) | ||
330 | #define AFMT_INFOFRAME_CONTROL0 0x7134 | ||
331 | # define AFMT_AUDIO_INFO_SOURCE (1 << 6) /* 0 - sound block; 1 - afmt regs */ | ||
332 | # define AFMT_AUDIO_INFO_UPDATE (1 << 7) | ||
333 | # define AFMT_MPEG_INFO_UPDATE (1 << 10) | ||
334 | #define AFMT_GENERIC0_7 0x7138 | ||
115 | 335 | ||
116 | #define GC_USER_SHADER_PIPE_CONFIG 0x8954 | 336 | #define GC_USER_SHADER_PIPE_CONFIG 0x8954 |
117 | #define INACTIVE_QD_PIPES(x) ((x) << 8) | 337 | #define INACTIVE_QD_PIPES(x) ((x) << 8) |
diff --git a/drivers/gpu/drm/radeon/r600d.h b/drivers/gpu/drm/radeon/r600d.h index 59f9c993cc31..426e5a7de778 100644 --- a/drivers/gpu/drm/radeon/r600d.h +++ b/drivers/gpu/drm/radeon/r600d.h | |||
@@ -824,6 +824,242 @@ | |||
824 | # define TARGET_LINK_SPEED_MASK (0xf << 0) | 824 | # define TARGET_LINK_SPEED_MASK (0xf << 0) |
825 | # define SELECTABLE_DEEMPHASIS (1 << 6) | 825 | # define SELECTABLE_DEEMPHASIS (1 << 6) |
826 | 826 | ||
827 | /* Audio clocks */ | ||
828 | #define DCCG_AUDIO_DTO0_PHASE 0x0514 | ||
829 | #define DCCG_AUDIO_DTO0_MODULE 0x0518 | ||
830 | #define DCCG_AUDIO_DTO0_LOAD 0x051c | ||
831 | # define DTO_LOAD (1 << 31) | ||
832 | #define DCCG_AUDIO_DTO0_CNTL 0x0520 | ||
833 | |||
834 | #define DCCG_AUDIO_DTO1_PHASE 0x0524 | ||
835 | #define DCCG_AUDIO_DTO1_MODULE 0x0528 | ||
836 | #define DCCG_AUDIO_DTO1_LOAD 0x052c | ||
837 | #define DCCG_AUDIO_DTO1_CNTL 0x0530 | ||
838 | |||
839 | #define DCCG_AUDIO_DTO_SELECT 0x0534 | ||
840 | |||
841 | /* digital blocks */ | ||
842 | #define TMDSA_CNTL 0x7880 | ||
843 | # define TMDSA_HDMI_EN (1 << 2) | ||
844 | #define LVTMA_CNTL 0x7a80 | ||
845 | # define LVTMA_HDMI_EN (1 << 2) | ||
846 | #define DDIA_CNTL 0x7200 | ||
847 | # define DDIA_HDMI_EN (1 << 2) | ||
848 | #define DIG0_CNTL 0x75a0 | ||
849 | # define DIG_MODE(x) (((x) & 7) << 8) | ||
850 | # define DIG_MODE_DP 0 | ||
851 | # define DIG_MODE_LVDS 1 | ||
852 | # define DIG_MODE_TMDS_DVI 2 | ||
853 | # define DIG_MODE_TMDS_HDMI 3 | ||
854 | # define DIG_MODE_SDVO 4 | ||
855 | #define DIG1_CNTL 0x79a0 | ||
856 | |||
857 | /* rs6xx/rs740 and r6xx share the same HDMI blocks, however, rs6xx has only one | ||
858 | * instance of the blocks while r6xx has 2. DCE 3.0 cards are slightly | ||
859 | * different due to the new DIG blocks, but also have 2 instances. | ||
860 | * DCE 3.0 HDMI blocks are part of each DIG encoder. | ||
861 | */ | ||
862 | |||
863 | /* rs6xx/rs740/r6xx/dce3 */ | ||
864 | #define HDMI0_CONTROL 0x7400 | ||
865 | /* rs6xx/rs740/r6xx */ | ||
866 | # define HDMI0_ENABLE (1 << 0) | ||
867 | # define HDMI0_STREAM(x) (((x) & 3) << 2) | ||
868 | # define HDMI0_STREAM_TMDSA 0 | ||
869 | # define HDMI0_STREAM_LVTMA 1 | ||
870 | # define HDMI0_STREAM_DVOA 2 | ||
871 | # define HDMI0_STREAM_DDIA 3 | ||
872 | /* rs6xx/r6xx/dce3 */ | ||
873 | # define HDMI0_ERROR_ACK (1 << 8) | ||
874 | # define HDMI0_ERROR_MASK (1 << 9) | ||
875 | #define HDMI0_STATUS 0x7404 | ||
876 | # define HDMI0_ACTIVE_AVMUTE (1 << 0) | ||
877 | # define HDMI0_AUDIO_ENABLE (1 << 4) | ||
878 | # define HDMI0_AZ_FORMAT_WTRIG (1 << 28) | ||
879 | # define HDMI0_AZ_FORMAT_WTRIG_INT (1 << 29) | ||
880 | #define HDMI0_AUDIO_PACKET_CONTROL 0x7408 | ||
881 | # define HDMI0_AUDIO_SAMPLE_SEND (1 << 0) | ||
882 | # define HDMI0_AUDIO_DELAY_EN(x) (((x) & 3) << 4) | ||
883 | # define HDMI0_AUDIO_SEND_MAX_PACKETS (1 << 8) | ||
884 | # define HDMI0_AUDIO_TEST_EN (1 << 12) | ||
885 | # define HDMI0_AUDIO_PACKETS_PER_LINE(x) (((x) & 0x1f) << 16) | ||
886 | # define HDMI0_AUDIO_CHANNEL_SWAP (1 << 24) | ||
887 | # define HDMI0_60958_CS_UPDATE (1 << 26) | ||
888 | # define HDMI0_AZ_FORMAT_WTRIG_MASK (1 << 28) | ||
889 | # define HDMI0_AZ_FORMAT_WTRIG_ACK (1 << 29) | ||
890 | #define HDMI0_AUDIO_CRC_CONTROL 0x740c | ||
891 | # define HDMI0_AUDIO_CRC_EN (1 << 0) | ||
892 | #define HDMI0_VBI_PACKET_CONTROL 0x7410 | ||
893 | # define HDMI0_NULL_SEND (1 << 0) | ||
894 | # define HDMI0_GC_SEND (1 << 4) | ||
895 | # define HDMI0_GC_CONT (1 << 5) /* 0 - once; 1 - every frame */ | ||
896 | #define HDMI0_INFOFRAME_CONTROL0 0x7414 | ||
897 | # define HDMI0_AVI_INFO_SEND (1 << 0) | ||
898 | # define HDMI0_AVI_INFO_CONT (1 << 1) | ||
899 | # define HDMI0_AUDIO_INFO_SEND (1 << 4) | ||
900 | # define HDMI0_AUDIO_INFO_CONT (1 << 5) | ||
901 | # define HDMI0_AUDIO_INFO_SOURCE (1 << 6) /* 0 - sound block; 1 - hmdi regs */ | ||
902 | # define HDMI0_AUDIO_INFO_UPDATE (1 << 7) | ||
903 | # define HDMI0_MPEG_INFO_SEND (1 << 8) | ||
904 | # define HDMI0_MPEG_INFO_CONT (1 << 9) | ||
905 | # define HDMI0_MPEG_INFO_UPDATE (1 << 10) | ||
906 | #define HDMI0_INFOFRAME_CONTROL1 0x7418 | ||
907 | # define HDMI0_AVI_INFO_LINE(x) (((x) & 0x3f) << 0) | ||
908 | # define HDMI0_AUDIO_INFO_LINE(x) (((x) & 0x3f) << 8) | ||
909 | # define HDMI0_MPEG_INFO_LINE(x) (((x) & 0x3f) << 16) | ||
910 | #define HDMI0_GENERIC_PACKET_CONTROL 0x741c | ||
911 | # define HDMI0_GENERIC0_SEND (1 << 0) | ||
912 | # define HDMI0_GENERIC0_CONT (1 << 1) | ||
913 | # define HDMI0_GENERIC0_UPDATE (1 << 2) | ||
914 | # define HDMI0_GENERIC1_SEND (1 << 4) | ||
915 | # define HDMI0_GENERIC1_CONT (1 << 5) | ||
916 | # define HDMI0_GENERIC0_LINE(x) (((x) & 0x3f) << 16) | ||
917 | # define HDMI0_GENERIC1_LINE(x) (((x) & 0x3f) << 24) | ||
918 | #define HDMI0_GC 0x7428 | ||
919 | # define HDMI0_GC_AVMUTE (1 << 0) | ||
920 | #define HDMI0_AVI_INFO0 0x7454 | ||
921 | # define HDMI0_AVI_INFO_CHECKSUM(x) (((x) & 0xff) << 0) | ||
922 | # define HDMI0_AVI_INFO_S(x) (((x) & 3) << 8) | ||
923 | # define HDMI0_AVI_INFO_B(x) (((x) & 3) << 10) | ||
924 | # define HDMI0_AVI_INFO_A(x) (((x) & 1) << 12) | ||
925 | # define HDMI0_AVI_INFO_Y(x) (((x) & 3) << 13) | ||
926 | # define HDMI0_AVI_INFO_Y_RGB 0 | ||
927 | # define HDMI0_AVI_INFO_Y_YCBCR422 1 | ||
928 | # define HDMI0_AVI_INFO_Y_YCBCR444 2 | ||
929 | # define HDMI0_AVI_INFO_Y_A_B_S(x) (((x) & 0xff) << 8) | ||
930 | # define HDMI0_AVI_INFO_R(x) (((x) & 0xf) << 16) | ||
931 | # define HDMI0_AVI_INFO_M(x) (((x) & 0x3) << 20) | ||
932 | # define HDMI0_AVI_INFO_C(x) (((x) & 0x3) << 22) | ||
933 | # define HDMI0_AVI_INFO_C_M_R(x) (((x) & 0xff) << 16) | ||
934 | # define HDMI0_AVI_INFO_SC(x) (((x) & 0x3) << 24) | ||
935 | # define HDMI0_AVI_INFO_ITC_EC_Q_SC(x) (((x) & 0xff) << 24) | ||
936 | #define HDMI0_AVI_INFO1 0x7458 | ||
937 | # define HDMI0_AVI_INFO_VIC(x) (((x) & 0x7f) << 0) /* don't use avi infoframe v1 */ | ||
938 | # define HDMI0_AVI_INFO_PR(x) (((x) & 0xf) << 8) /* don't use avi infoframe v1 */ | ||
939 | # define HDMI0_AVI_INFO_TOP(x) (((x) & 0xffff) << 16) | ||
940 | #define HDMI0_AVI_INFO2 0x745c | ||
941 | # define HDMI0_AVI_INFO_BOTTOM(x) (((x) & 0xffff) << 0) | ||
942 | # define HDMI0_AVI_INFO_LEFT(x) (((x) & 0xffff) << 16) | ||
943 | #define HDMI0_AVI_INFO3 0x7460 | ||
944 | # define HDMI0_AVI_INFO_RIGHT(x) (((x) & 0xffff) << 0) | ||
945 | # define HDMI0_AVI_INFO_VERSION(x) (((x) & 3) << 24) | ||
946 | #define HDMI0_MPEG_INFO0 0x7464 | ||
947 | # define HDMI0_MPEG_INFO_CHECKSUM(x) (((x) & 0xff) << 0) | ||
948 | # define HDMI0_MPEG_INFO_MB0(x) (((x) & 0xff) << 8) | ||
949 | # define HDMI0_MPEG_INFO_MB1(x) (((x) & 0xff) << 16) | ||
950 | # define HDMI0_MPEG_INFO_MB2(x) (((x) & 0xff) << 24) | ||
951 | #define HDMI0_MPEG_INFO1 0x7468 | ||
952 | # define HDMI0_MPEG_INFO_MB3(x) (((x) & 0xff) << 0) | ||
953 | # define HDMI0_MPEG_INFO_MF(x) (((x) & 3) << 8) | ||
954 | # define HDMI0_MPEG_INFO_FR(x) (((x) & 1) << 12) | ||
955 | #define HDMI0_GENERIC0_HDR 0x746c | ||
956 | #define HDMI0_GENERIC0_0 0x7470 | ||
957 | #define HDMI0_GENERIC0_1 0x7474 | ||
958 | #define HDMI0_GENERIC0_2 0x7478 | ||
959 | #define HDMI0_GENERIC0_3 0x747c | ||
960 | #define HDMI0_GENERIC0_4 0x7480 | ||
961 | #define HDMI0_GENERIC0_5 0x7484 | ||
962 | #define HDMI0_GENERIC0_6 0x7488 | ||
963 | #define HDMI0_GENERIC1_HDR 0x748c | ||
964 | #define HDMI0_GENERIC1_0 0x7490 | ||
965 | #define HDMI0_GENERIC1_1 0x7494 | ||
966 | #define HDMI0_GENERIC1_2 0x7498 | ||
967 | #define HDMI0_GENERIC1_3 0x749c | ||
968 | #define HDMI0_GENERIC1_4 0x74a0 | ||
969 | #define HDMI0_GENERIC1_5 0x74a4 | ||
970 | #define HDMI0_GENERIC1_6 0x74a8 | ||
971 | #define HDMI0_ACR_32_0 0x74ac | ||
972 | # define HDMI0_ACR_CTS_32(x) (((x) & 0xfffff) << 12) | ||
973 | #define HDMI0_ACR_32_1 0x74b0 | ||
974 | # define HDMI0_ACR_N_32(x) (((x) & 0xfffff) << 0) | ||
975 | #define HDMI0_ACR_44_0 0x74b4 | ||
976 | # define HDMI0_ACR_CTS_44(x) (((x) & 0xfffff) << 12) | ||
977 | #define HDMI0_ACR_44_1 0x74b8 | ||
978 | # define HDMI0_ACR_N_44(x) (((x) & 0xfffff) << 0) | ||
979 | #define HDMI0_ACR_48_0 0x74bc | ||
980 | # define HDMI0_ACR_CTS_48(x) (((x) & 0xfffff) << 12) | ||
981 | #define HDMI0_ACR_48_1 0x74c0 | ||
982 | # define HDMI0_ACR_N_48(x) (((x) & 0xfffff) << 0) | ||
983 | #define HDMI0_ACR_STATUS_0 0x74c4 | ||
984 | #define HDMI0_ACR_STATUS_1 0x74c8 | ||
985 | #define HDMI0_AUDIO_INFO0 0x74cc | ||
986 | # define HDMI0_AUDIO_INFO_CHECKSUM(x) (((x) & 0xff) << 0) | ||
987 | # define HDMI0_AUDIO_INFO_CC(x) (((x) & 7) << 8) | ||
988 | #define HDMI0_AUDIO_INFO1 0x74d0 | ||
989 | # define HDMI0_AUDIO_INFO_CA(x) (((x) & 0xff) << 0) | ||
990 | # define HDMI0_AUDIO_INFO_LSV(x) (((x) & 0xf) << 11) | ||
991 | # define HDMI0_AUDIO_INFO_DM_INH(x) (((x) & 1) << 15) | ||
992 | # define HDMI0_AUDIO_INFO_DM_INH_LSV(x) (((x) & 0xff) << 8) | ||
993 | #define HDMI0_60958_0 0x74d4 | ||
994 | # define HDMI0_60958_CS_A(x) (((x) & 1) << 0) | ||
995 | # define HDMI0_60958_CS_B(x) (((x) & 1) << 1) | ||
996 | # define HDMI0_60958_CS_C(x) (((x) & 1) << 2) | ||
997 | # define HDMI0_60958_CS_D(x) (((x) & 3) << 3) | ||
998 | # define HDMI0_60958_CS_MODE(x) (((x) & 3) << 6) | ||
999 | # define HDMI0_60958_CS_CATEGORY_CODE(x) (((x) & 0xff) << 8) | ||
1000 | # define HDMI0_60958_CS_SOURCE_NUMBER(x) (((x) & 0xf) << 16) | ||
1001 | # define HDMI0_60958_CS_CHANNEL_NUMBER_L(x) (((x) & 0xf) << 20) | ||
1002 | # define HDMI0_60958_CS_SAMPLING_FREQUENCY(x) (((x) & 0xf) << 24) | ||
1003 | # define HDMI0_60958_CS_CLOCK_ACCURACY(x) (((x) & 3) << 28) | ||
1004 | #define HDMI0_60958_1 0x74d8 | ||
1005 | # define HDMI0_60958_CS_WORD_LENGTH(x) (((x) & 0xf) << 0) | ||
1006 | # define HDMI0_60958_CS_ORIGINAL_SAMPLING_FREQUENCY(x) (((x) & 0xf) << 4) | ||
1007 | # define HDMI0_60958_CS_VALID_L(x) (((x) & 1) << 16) | ||
1008 | # define HDMI0_60958_CS_VALID_R(x) (((x) & 1) << 18) | ||
1009 | # define HDMI0_60958_CS_CHANNEL_NUMBER_R(x) (((x) & 0xf) << 20) | ||
1010 | #define HDMI0_ACR_PACKET_CONTROL 0x74dc | ||
1011 | # define HDMI0_ACR_SEND (1 << 0) | ||
1012 | # define HDMI0_ACR_CONT (1 << 1) | ||
1013 | # define HDMI0_ACR_SELECT(x) (((x) & 3) << 4) | ||
1014 | # define HDMI0_ACR_HW 0 | ||
1015 | # define HDMI0_ACR_32 1 | ||
1016 | # define HDMI0_ACR_44 2 | ||
1017 | # define HDMI0_ACR_48 3 | ||
1018 | # define HDMI0_ACR_SOURCE (1 << 8) /* 0 - hw; 1 - cts value */ | ||
1019 | # define HDMI0_ACR_AUTO_SEND (1 << 12) | ||
1020 | #define HDMI0_RAMP_CONTROL0 0x74e0 | ||
1021 | # define HDMI0_RAMP_MAX_COUNT(x) (((x) & 0xffffff) << 0) | ||
1022 | #define HDMI0_RAMP_CONTROL1 0x74e4 | ||
1023 | # define HDMI0_RAMP_MIN_COUNT(x) (((x) & 0xffffff) << 0) | ||
1024 | #define HDMI0_RAMP_CONTROL2 0x74e8 | ||
1025 | # define HDMI0_RAMP_INC_COUNT(x) (((x) & 0xffffff) << 0) | ||
1026 | #define HDMI0_RAMP_CONTROL3 0x74ec | ||
1027 | # define HDMI0_RAMP_DEC_COUNT(x) (((x) & 0xffffff) << 0) | ||
1028 | /* HDMI0_60958_2 is r7xx only */ | ||
1029 | #define HDMI0_60958_2 0x74f0 | ||
1030 | # define HDMI0_60958_CS_CHANNEL_NUMBER_2(x) (((x) & 0xf) << 0) | ||
1031 | # define HDMI0_60958_CS_CHANNEL_NUMBER_3(x) (((x) & 0xf) << 4) | ||
1032 | # define HDMI0_60958_CS_CHANNEL_NUMBER_4(x) (((x) & 0xf) << 8) | ||
1033 | # define HDMI0_60958_CS_CHANNEL_NUMBER_5(x) (((x) & 0xf) << 12) | ||
1034 | # define HDMI0_60958_CS_CHANNEL_NUMBER_6(x) (((x) & 0xf) << 16) | ||
1035 | # define HDMI0_60958_CS_CHANNEL_NUMBER_7(x) (((x) & 0xf) << 20) | ||
1036 | /* r6xx only; second instance starts at 0x7700 */ | ||
1037 | #define HDMI1_CONTROL 0x7700 | ||
1038 | #define HDMI1_STATUS 0x7704 | ||
1039 | #define HDMI1_AUDIO_PACKET_CONTROL 0x7708 | ||
1040 | /* DCE3; second instance starts at 0x7800 NOT 0x7700 */ | ||
1041 | #define DCE3_HDMI1_CONTROL 0x7800 | ||
1042 | #define DCE3_HDMI1_STATUS 0x7804 | ||
1043 | #define DCE3_HDMI1_AUDIO_PACKET_CONTROL 0x7808 | ||
1044 | /* DCE3.2 (for interrupts) */ | ||
1045 | #define AFMT_STATUS 0x7600 | ||
1046 | # define AFMT_AUDIO_ENABLE (1 << 4) | ||
1047 | # define AFMT_AZ_FORMAT_WTRIG (1 << 28) | ||
1048 | # define AFMT_AZ_FORMAT_WTRIG_INT (1 << 29) | ||
1049 | # define AFMT_AZ_AUDIO_ENABLE_CHG (1 << 30) | ||
1050 | #define AFMT_AUDIO_PACKET_CONTROL 0x7604 | ||
1051 | # define AFMT_AUDIO_SAMPLE_SEND (1 << 0) | ||
1052 | # define AFMT_AUDIO_TEST_EN (1 << 12) | ||
1053 | # define AFMT_AUDIO_CHANNEL_SWAP (1 << 24) | ||
1054 | # define AFMT_60958_CS_UPDATE (1 << 26) | ||
1055 | # define AFMT_AZ_AUDIO_ENABLE_CHG_MASK (1 << 27) | ||
1056 | # define AFMT_AZ_FORMAT_WTRIG_MASK (1 << 28) | ||
1057 | # define AFMT_AZ_FORMAT_WTRIG_ACK (1 << 29) | ||
1058 | # define AFMT_AZ_AUDIO_ENABLE_CHG_ACK (1 << 30) | ||
1059 | /* DCE3.2 second instance starts at 0x7800 */ | ||
1060 | #define HDMI_OFFSET0 (0x7400 - 0x7400) | ||
1061 | #define HDMI_OFFSET1 (0x7800 - 0x7400) | ||
1062 | |||
827 | /* | 1063 | /* |
828 | * PM4 | 1064 | * PM4 |
829 | */ | 1065 | */ |
diff --git a/drivers/gpu/drm/radeon/rs600d.h b/drivers/gpu/drm/radeon/rs600d.h index a27c13ac47c3..f1f89414dc63 100644 --- a/drivers/gpu/drm/radeon/rs600d.h +++ b/drivers/gpu/drm/radeon/rs600d.h | |||
@@ -485,6 +485,20 @@ | |||
485 | #define S_007D18_DC_HOT_PLUG_DETECT2_INT_EN(x) (((x) & 0x1) << 16) | 485 | #define S_007D18_DC_HOT_PLUG_DETECT2_INT_EN(x) (((x) & 0x1) << 16) |
486 | #define G_007D18_DC_HOT_PLUG_DETECT2_INT_EN(x) (((x) >> 16) & 0x1) | 486 | #define G_007D18_DC_HOT_PLUG_DETECT2_INT_EN(x) (((x) >> 16) & 0x1) |
487 | #define C_007D18_DC_HOT_PLUG_DETECT2_INT_EN 0xFFFEFFFF | 487 | #define C_007D18_DC_HOT_PLUG_DETECT2_INT_EN 0xFFFEFFFF |
488 | #define R_007404_HDMI0_STATUS 0x007404 | ||
489 | #define S_007404_HDMI0_AZ_FORMAT_WTRIG(x) (((x) & 0x1) << 28) | ||
490 | #define G_007404_HDMI0_AZ_FORMAT_WTRIG(x) (((x) >> 28) & 0x1) | ||
491 | #define C_007404_HDMI0_AZ_FORMAT_WTRIG 0xEFFFFFFF | ||
492 | #define S_007404_HDMI0_AZ_FORMAT_WTRIG_INT(x) (((x) & 0x1) << 29) | ||
493 | #define G_007404_HDMI0_AZ_FORMAT_WTRIG_INT(x) (((x) >> 29) & 0x1) | ||
494 | #define C_007404_HDMI0_AZ_FORMAT_WTRIG_INT 0xDFFFFFFF | ||
495 | #define R_007408_HDMI0_AUDIO_PACKET_CONTROL 0x007408 | ||
496 | #define S_007408_HDMI0_AZ_FORMAT_WTRIG_MASK(x) (((x) & 0x1) << 28) | ||
497 | #define G_007408_HDMI0_AZ_FORMAT_WTRIG_MASK(x) (((x) >> 28) & 0x1) | ||
498 | #define C_007408_HDMI0_AZ_FORMAT_WTRIG_MASK 0xEFFFFFFF | ||
499 | #define S_007408_HDMI0_AZ_FORMAT_WTRIG_ACK(x) (((x) & 0x1) << 29) | ||
500 | #define G_007408_HDMI0_AZ_FORMAT_WTRIG_ACK(x) (((x) >> 29) & 0x1) | ||
501 | #define C_007408_HDMI0_AZ_FORMAT_WTRIG_ACK 0xDFFFFFFF | ||
488 | 502 | ||
489 | /* MC registers */ | 503 | /* MC registers */ |
490 | #define R_000000_MC_STATUS 0x000000 | 504 | #define R_000000_MC_STATUS 0x000000 |
diff --git a/drivers/gpu/drm/radeon/rv770d.h b/drivers/gpu/drm/radeon/rv770d.h index 79fa588e9ed5..9c549f702f2f 100644 --- a/drivers/gpu/drm/radeon/rv770d.h +++ b/drivers/gpu/drm/radeon/rv770d.h | |||
@@ -353,6 +353,197 @@ | |||
353 | 353 | ||
354 | #define SRBM_STATUS 0x0E50 | 354 | #define SRBM_STATUS 0x0E50 |
355 | 355 | ||
356 | /* DCE 3.2 HDMI */ | ||
357 | #define HDMI_CONTROL 0x7400 | ||
358 | # define HDMI_KEEPOUT_MODE (1 << 0) | ||
359 | # define HDMI_PACKET_GEN_VERSION (1 << 4) /* 0 = r6xx compat */ | ||
360 | # define HDMI_ERROR_ACK (1 << 8) | ||
361 | # define HDMI_ERROR_MASK (1 << 9) | ||
362 | #define HDMI_STATUS 0x7404 | ||
363 | # define HDMI_ACTIVE_AVMUTE (1 << 0) | ||
364 | # define HDMI_AUDIO_PACKET_ERROR (1 << 16) | ||
365 | # define HDMI_VBI_PACKET_ERROR (1 << 20) | ||
366 | #define HDMI_AUDIO_PACKET_CONTROL 0x7408 | ||
367 | # define HDMI_AUDIO_DELAY_EN(x) (((x) & 3) << 4) | ||
368 | # define HDMI_AUDIO_PACKETS_PER_LINE(x) (((x) & 0x1f) << 16) | ||
369 | #define HDMI_ACR_PACKET_CONTROL 0x740c | ||
370 | # define HDMI_ACR_SEND (1 << 0) | ||
371 | # define HDMI_ACR_CONT (1 << 1) | ||
372 | # define HDMI_ACR_SELECT(x) (((x) & 3) << 4) | ||
373 | # define HDMI_ACR_HW 0 | ||
374 | # define HDMI_ACR_32 1 | ||
375 | # define HDMI_ACR_44 2 | ||
376 | # define HDMI_ACR_48 3 | ||
377 | # define HDMI_ACR_SOURCE (1 << 8) /* 0 - hw; 1 - cts value */ | ||
378 | # define HDMI_ACR_AUTO_SEND (1 << 12) | ||
379 | #define HDMI_VBI_PACKET_CONTROL 0x7410 | ||
380 | # define HDMI_NULL_SEND (1 << 0) | ||
381 | # define HDMI_GC_SEND (1 << 4) | ||
382 | # define HDMI_GC_CONT (1 << 5) /* 0 - once; 1 - every frame */ | ||
383 | #define HDMI_INFOFRAME_CONTROL0 0x7414 | ||
384 | # define HDMI_AVI_INFO_SEND (1 << 0) | ||
385 | # define HDMI_AVI_INFO_CONT (1 << 1) | ||
386 | # define HDMI_AUDIO_INFO_SEND (1 << 4) | ||
387 | # define HDMI_AUDIO_INFO_CONT (1 << 5) | ||
388 | # define HDMI_MPEG_INFO_SEND (1 << 8) | ||
389 | # define HDMI_MPEG_INFO_CONT (1 << 9) | ||
390 | #define HDMI_INFOFRAME_CONTROL1 0x7418 | ||
391 | # define HDMI_AVI_INFO_LINE(x) (((x) & 0x3f) << 0) | ||
392 | # define HDMI_AUDIO_INFO_LINE(x) (((x) & 0x3f) << 8) | ||
393 | # define HDMI_MPEG_INFO_LINE(x) (((x) & 0x3f) << 16) | ||
394 | #define HDMI_GENERIC_PACKET_CONTROL 0x741c | ||
395 | # define HDMI_GENERIC0_SEND (1 << 0) | ||
396 | # define HDMI_GENERIC0_CONT (1 << 1) | ||
397 | # define HDMI_GENERIC1_SEND (1 << 4) | ||
398 | # define HDMI_GENERIC1_CONT (1 << 5) | ||
399 | # define HDMI_GENERIC0_LINE(x) (((x) & 0x3f) << 16) | ||
400 | # define HDMI_GENERIC1_LINE(x) (((x) & 0x3f) << 24) | ||
401 | #define HDMI_GC 0x7428 | ||
402 | # define HDMI_GC_AVMUTE (1 << 0) | ||
403 | #define AFMT_AUDIO_PACKET_CONTROL2 0x742c | ||
404 | # define AFMT_AUDIO_LAYOUT_OVRD (1 << 0) | ||
405 | # define AFMT_AUDIO_LAYOUT_SELECT (1 << 1) | ||
406 | # define AFMT_60958_CS_SOURCE (1 << 4) | ||
407 | # define AFMT_AUDIO_CHANNEL_ENABLE(x) (((x) & 0xff) << 8) | ||
408 | # define AFMT_DP_AUDIO_STREAM_ID(x) (((x) & 0xff) << 16) | ||
409 | #define AFMT_AVI_INFO0 0x7454 | ||
410 | # define AFMT_AVI_INFO_CHECKSUM(x) (((x) & 0xff) << 0) | ||
411 | # define AFMT_AVI_INFO_S(x) (((x) & 3) << 8) | ||
412 | # define AFMT_AVI_INFO_B(x) (((x) & 3) << 10) | ||
413 | # define AFMT_AVI_INFO_A(x) (((x) & 1) << 12) | ||
414 | # define AFMT_AVI_INFO_Y(x) (((x) & 3) << 13) | ||
415 | # define AFMT_AVI_INFO_Y_RGB 0 | ||
416 | # define AFMT_AVI_INFO_Y_YCBCR422 1 | ||
417 | # define AFMT_AVI_INFO_Y_YCBCR444 2 | ||
418 | # define AFMT_AVI_INFO_Y_A_B_S(x) (((x) & 0xff) << 8) | ||
419 | # define AFMT_AVI_INFO_R(x) (((x) & 0xf) << 16) | ||
420 | # define AFMT_AVI_INFO_M(x) (((x) & 0x3) << 20) | ||
421 | # define AFMT_AVI_INFO_C(x) (((x) & 0x3) << 22) | ||
422 | # define AFMT_AVI_INFO_C_M_R(x) (((x) & 0xff) << 16) | ||
423 | # define AFMT_AVI_INFO_SC(x) (((x) & 0x3) << 24) | ||
424 | # define AFMT_AVI_INFO_Q(x) (((x) & 0x3) << 26) | ||
425 | # define AFMT_AVI_INFO_EC(x) (((x) & 0x3) << 28) | ||
426 | # define AFMT_AVI_INFO_ITC(x) (((x) & 0x1) << 31) | ||
427 | # define AFMT_AVI_INFO_ITC_EC_Q_SC(x) (((x) & 0xff) << 24) | ||
428 | #define AFMT_AVI_INFO1 0x7458 | ||
429 | # define AFMT_AVI_INFO_VIC(x) (((x) & 0x7f) << 0) /* don't use avi infoframe v1 */ | ||
430 | # define AFMT_AVI_INFO_PR(x) (((x) & 0xf) << 8) /* don't use avi infoframe v1 */ | ||
431 | # define AFMT_AVI_INFO_TOP(x) (((x) & 0xffff) << 16) | ||
432 | #define AFMT_AVI_INFO2 0x745c | ||
433 | # define AFMT_AVI_INFO_BOTTOM(x) (((x) & 0xffff) << 0) | ||
434 | # define AFMT_AVI_INFO_LEFT(x) (((x) & 0xffff) << 16) | ||
435 | #define AFMT_AVI_INFO3 0x7460 | ||
436 | # define AFMT_AVI_INFO_RIGHT(x) (((x) & 0xffff) << 0) | ||
437 | # define AFMT_AVI_INFO_VERSION(x) (((x) & 3) << 24) | ||
438 | #define AFMT_MPEG_INFO0 0x7464 | ||
439 | # define AFMT_MPEG_INFO_CHECKSUM(x) (((x) & 0xff) << 0) | ||
440 | # define AFMT_MPEG_INFO_MB0(x) (((x) & 0xff) << 8) | ||
441 | # define AFMT_MPEG_INFO_MB1(x) (((x) & 0xff) << 16) | ||
442 | # define AFMT_MPEG_INFO_MB2(x) (((x) & 0xff) << 24) | ||
443 | #define AFMT_MPEG_INFO1 0x7468 | ||
444 | # define AFMT_MPEG_INFO_MB3(x) (((x) & 0xff) << 0) | ||
445 | # define AFMT_MPEG_INFO_MF(x) (((x) & 3) << 8) | ||
446 | # define AFMT_MPEG_INFO_FR(x) (((x) & 1) << 12) | ||
447 | #define AFMT_GENERIC0_HDR 0x746c | ||
448 | #define AFMT_GENERIC0_0 0x7470 | ||
449 | #define AFMT_GENERIC0_1 0x7474 | ||
450 | #define AFMT_GENERIC0_2 0x7478 | ||
451 | #define AFMT_GENERIC0_3 0x747c | ||
452 | #define AFMT_GENERIC0_4 0x7480 | ||
453 | #define AFMT_GENERIC0_5 0x7484 | ||
454 | #define AFMT_GENERIC0_6 0x7488 | ||
455 | #define AFMT_GENERIC1_HDR 0x748c | ||
456 | #define AFMT_GENERIC1_0 0x7490 | ||
457 | #define AFMT_GENERIC1_1 0x7494 | ||
458 | #define AFMT_GENERIC1_2 0x7498 | ||
459 | #define AFMT_GENERIC1_3 0x749c | ||
460 | #define AFMT_GENERIC1_4 0x74a0 | ||
461 | #define AFMT_GENERIC1_5 0x74a4 | ||
462 | #define AFMT_GENERIC1_6 0x74a8 | ||
463 | #define HDMI_ACR_32_0 0x74ac | ||
464 | # define HDMI_ACR_CTS_32(x) (((x) & 0xfffff) << 12) | ||
465 | #define HDMI_ACR_32_1 0x74b0 | ||
466 | # define HDMI_ACR_N_32(x) (((x) & 0xfffff) << 0) | ||
467 | #define HDMI_ACR_44_0 0x74b4 | ||
468 | # define HDMI_ACR_CTS_44(x) (((x) & 0xfffff) << 12) | ||
469 | #define HDMI_ACR_44_1 0x74b8 | ||
470 | # define HDMI_ACR_N_44(x) (((x) & 0xfffff) << 0) | ||
471 | #define HDMI_ACR_48_0 0x74bc | ||
472 | # define HDMI_ACR_CTS_48(x) (((x) & 0xfffff) << 12) | ||
473 | #define HDMI_ACR_48_1 0x74c0 | ||
474 | # define HDMI_ACR_N_48(x) (((x) & 0xfffff) << 0) | ||
475 | #define HDMI_ACR_STATUS_0 0x74c4 | ||
476 | #define HDMI_ACR_STATUS_1 0x74c8 | ||
477 | #define AFMT_AUDIO_INFO0 0x74cc | ||
478 | # define AFMT_AUDIO_INFO_CHECKSUM(x) (((x) & 0xff) << 0) | ||
479 | # define AFMT_AUDIO_INFO_CC(x) (((x) & 7) << 8) | ||
480 | # define AFMT_AUDIO_INFO_CHECKSUM_OFFSET(x) (((x) & 0xff) << 16) | ||
481 | #define AFMT_AUDIO_INFO1 0x74d0 | ||
482 | # define AFMT_AUDIO_INFO_CA(x) (((x) & 0xff) << 0) | ||
483 | # define AFMT_AUDIO_INFO_LSV(x) (((x) & 0xf) << 11) | ||
484 | # define AFMT_AUDIO_INFO_DM_INH(x) (((x) & 1) << 15) | ||
485 | # define AFMT_AUDIO_INFO_DM_INH_LSV(x) (((x) & 0xff) << 8) | ||
486 | #define AFMT_60958_0 0x74d4 | ||
487 | # define AFMT_60958_CS_A(x) (((x) & 1) << 0) | ||
488 | # define AFMT_60958_CS_B(x) (((x) & 1) << 1) | ||
489 | # define AFMT_60958_CS_C(x) (((x) & 1) << 2) | ||
490 | # define AFMT_60958_CS_D(x) (((x) & 3) << 3) | ||
491 | # define AFMT_60958_CS_MODE(x) (((x) & 3) << 6) | ||
492 | # define AFMT_60958_CS_CATEGORY_CODE(x) (((x) & 0xff) << 8) | ||
493 | # define AFMT_60958_CS_SOURCE_NUMBER(x) (((x) & 0xf) << 16) | ||
494 | # define AFMT_60958_CS_CHANNEL_NUMBER_L(x) (((x) & 0xf) << 20) | ||
495 | # define AFMT_60958_CS_SAMPLING_FREQUENCY(x) (((x) & 0xf) << 24) | ||
496 | # define AFMT_60958_CS_CLOCK_ACCURACY(x) (((x) & 3) << 28) | ||
497 | #define AFMT_60958_1 0x74d8 | ||
498 | # define AFMT_60958_CS_WORD_LENGTH(x) (((x) & 0xf) << 0) | ||
499 | # define AFMT_60958_CS_ORIGINAL_SAMPLING_FREQUENCY(x) (((x) & 0xf) << 4) | ||
500 | # define AFMT_60958_CS_VALID_L(x) (((x) & 1) << 16) | ||
501 | # define AFMT_60958_CS_VALID_R(x) (((x) & 1) << 18) | ||
502 | # define AFMT_60958_CS_CHANNEL_NUMBER_R(x) (((x) & 0xf) << 20) | ||
503 | #define AFMT_AUDIO_CRC_CONTROL 0x74dc | ||
504 | # define AFMT_AUDIO_CRC_EN (1 << 0) | ||
505 | #define AFMT_RAMP_CONTROL0 0x74e0 | ||
506 | # define AFMT_RAMP_MAX_COUNT(x) (((x) & 0xffffff) << 0) | ||
507 | # define AFMT_RAMP_DATA_SIGN (1 << 31) | ||
508 | #define AFMT_RAMP_CONTROL1 0x74e4 | ||
509 | # define AFMT_RAMP_MIN_COUNT(x) (((x) & 0xffffff) << 0) | ||
510 | # define AFMT_AUDIO_TEST_CH_DISABLE(x) (((x) & 0xff) << 24) | ||
511 | #define AFMT_RAMP_CONTROL2 0x74e8 | ||
512 | # define AFMT_RAMP_INC_COUNT(x) (((x) & 0xffffff) << 0) | ||
513 | #define AFMT_RAMP_CONTROL3 0x74ec | ||
514 | # define AFMT_RAMP_DEC_COUNT(x) (((x) & 0xffffff) << 0) | ||
515 | #define AFMT_60958_2 0x74f0 | ||
516 | # define AFMT_60958_CS_CHANNEL_NUMBER_2(x) (((x) & 0xf) << 0) | ||
517 | # define AFMT_60958_CS_CHANNEL_NUMBER_3(x) (((x) & 0xf) << 4) | ||
518 | # define AFMT_60958_CS_CHANNEL_NUMBER_4(x) (((x) & 0xf) << 8) | ||
519 | # define AFMT_60958_CS_CHANNEL_NUMBER_5(x) (((x) & 0xf) << 12) | ||
520 | # define AFMT_60958_CS_CHANNEL_NUMBER_6(x) (((x) & 0xf) << 16) | ||
521 | # define AFMT_60958_CS_CHANNEL_NUMBER_7(x) (((x) & 0xf) << 20) | ||
522 | #define AFMT_STATUS 0x7600 | ||
523 | # define AFMT_AUDIO_ENABLE (1 << 4) | ||
524 | # define AFMT_AZ_FORMAT_WTRIG (1 << 28) | ||
525 | # define AFMT_AZ_FORMAT_WTRIG_INT (1 << 29) | ||
526 | # define AFMT_AZ_AUDIO_ENABLE_CHG (1 << 30) | ||
527 | #define AFMT_AUDIO_PACKET_CONTROL 0x7604 | ||
528 | # define AFMT_AUDIO_SAMPLE_SEND (1 << 0) | ||
529 | # define AFMT_AUDIO_TEST_EN (1 << 12) | ||
530 | # define AFMT_AUDIO_CHANNEL_SWAP (1 << 24) | ||
531 | # define AFMT_60958_CS_UPDATE (1 << 26) | ||
532 | # define AFMT_AZ_AUDIO_ENABLE_CHG_MASK (1 << 27) | ||
533 | # define AFMT_AZ_FORMAT_WTRIG_MASK (1 << 28) | ||
534 | # define AFMT_AZ_FORMAT_WTRIG_ACK (1 << 29) | ||
535 | # define AFMT_AZ_AUDIO_ENABLE_CHG_ACK (1 << 30) | ||
536 | #define AFMT_VBI_PACKET_CONTROL 0x7608 | ||
537 | # define AFMT_GENERIC0_UPDATE (1 << 2) | ||
538 | #define AFMT_INFOFRAME_CONTROL0 0x760c | ||
539 | # define AFMT_AUDIO_INFO_SOURCE (1 << 6) /* 0 - sound block; 1 - hmdi regs */ | ||
540 | # define AFMT_AUDIO_INFO_UPDATE (1 << 7) | ||
541 | # define AFMT_MPEG_INFO_UPDATE (1 << 10) | ||
542 | #define AFMT_GENERIC0_7 0x7610 | ||
543 | /* second instance starts at 0x7800 */ | ||
544 | #define HDMI_OFFSET0 (0x7400 - 0x7400) | ||
545 | #define HDMI_OFFSET1 (0x7800 - 0x7400) | ||
546 | |||
356 | #define D1GRPH_PRIMARY_SURFACE_ADDRESS 0x6110 | 547 | #define D1GRPH_PRIMARY_SURFACE_ADDRESS 0x6110 |
357 | #define D1GRPH_PRIMARY_SURFACE_ADDRESS_HIGH 0x6914 | 548 | #define D1GRPH_PRIMARY_SURFACE_ADDRESS_HIGH 0x6914 |
358 | #define D2GRPH_PRIMARY_SURFACE_ADDRESS_HIGH 0x6114 | 549 | #define D2GRPH_PRIMARY_SURFACE_ADDRESS_HIGH 0x6114 |