Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2008 Advanced Micro Devices, Inc. |
| 3 | * Copyright 2008 Red Hat Inc. |
| 4 | * Copyright 2009 Christian König. |
| 5 | * |
| 6 | * Permission is hereby granted, free of charge, to any person obtaining a |
| 7 | * copy of this software and associated documentation files (the "Software"), |
| 8 | * to deal in the Software without restriction, including without limitation |
| 9 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 10 | * and/or sell copies of the Software, and to permit persons to whom the |
| 11 | * Software is furnished to do so, subject to the following conditions: |
| 12 | * |
| 13 | * The above copyright notice and this permission notice shall be included in |
| 14 | * all copies or substantial portions of the Software. |
| 15 | * |
| 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 19 | * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR |
| 20 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
| 21 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
| 22 | * OTHER DEALINGS IN THE SOFTWARE. |
| 23 | * |
| 24 | * Authors: Christian König |
| 25 | */ |
| 26 | #include "drmP.h" |
| 27 | #include "radeon_drm.h" |
| 28 | #include "radeon.h" |
Daniel Vetter | 3574dda | 2011-02-18 17:59:19 +0100 | [diff] [blame] | 29 | #include "radeon_asic.h" |
Rafał Miłecki | c6543a6 | 2012-04-28 23:35:24 +0200 | [diff] [blame] | 30 | #include "r600d.h" |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 31 | #include "atom.h" |
| 32 | |
| 33 | /* |
| 34 | * HDMI color format |
| 35 | */ |
| 36 | enum r600_hdmi_color_format { |
| 37 | RGB = 0, |
| 38 | YCC_422 = 1, |
| 39 | YCC_444 = 2 |
| 40 | }; |
| 41 | |
| 42 | /* |
| 43 | * IEC60958 status bits |
| 44 | */ |
| 45 | enum r600_hdmi_iec_status_bits { |
| 46 | AUDIO_STATUS_DIG_ENABLE = 0x01, |
Rafał Miłecki | 3fe373d | 2010-03-06 13:03:38 +0000 | [diff] [blame] | 47 | AUDIO_STATUS_V = 0x02, |
| 48 | AUDIO_STATUS_VCFG = 0x04, |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 49 | AUDIO_STATUS_EMPHASIS = 0x08, |
| 50 | AUDIO_STATUS_COPYRIGHT = 0x10, |
| 51 | AUDIO_STATUS_NONAUDIO = 0x20, |
| 52 | AUDIO_STATUS_PROFESSIONAL = 0x40, |
Rafał Miłecki | 3fe373d | 2010-03-06 13:03:38 +0000 | [diff] [blame] | 53 | AUDIO_STATUS_LEVEL = 0x80 |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 54 | }; |
| 55 | |
| 56 | struct { |
| 57 | uint32_t Clock; |
| 58 | |
| 59 | int N_32kHz; |
| 60 | int CTS_32kHz; |
| 61 | |
| 62 | int N_44_1kHz; |
| 63 | int CTS_44_1kHz; |
| 64 | |
| 65 | int N_48kHz; |
| 66 | int CTS_48kHz; |
| 67 | |
| 68 | } r600_hdmi_ACR[] = { |
| 69 | /* 32kHz 44.1kHz 48kHz */ |
| 70 | /* Clock N CTS N CTS N CTS */ |
| 71 | { 25174, 4576, 28125, 7007, 31250, 6864, 28125 }, /* 25,20/1.001 MHz */ |
| 72 | { 25200, 4096, 25200, 6272, 28000, 6144, 25200 }, /* 25.20 MHz */ |
| 73 | { 27000, 4096, 27000, 6272, 30000, 6144, 27000 }, /* 27.00 MHz */ |
| 74 | { 27027, 4096, 27027, 6272, 30030, 6144, 27027 }, /* 27.00*1.001 MHz */ |
| 75 | { 54000, 4096, 54000, 6272, 60000, 6144, 54000 }, /* 54.00 MHz */ |
| 76 | { 54054, 4096, 54054, 6272, 60060, 6144, 54054 }, /* 54.00*1.001 MHz */ |
| 77 | { 74175, 11648, 210937, 17836, 234375, 11648, 140625 }, /* 74.25/1.001 MHz */ |
| 78 | { 74250, 4096, 74250, 6272, 82500, 6144, 74250 }, /* 74.25 MHz */ |
| 79 | { 148351, 11648, 421875, 8918, 234375, 5824, 140625 }, /* 148.50/1.001 MHz */ |
| 80 | { 148500, 4096, 148500, 6272, 165000, 6144, 148500 }, /* 148.50 MHz */ |
| 81 | { 0, 4096, 0, 6272, 0, 6144, 0 } /* Other */ |
| 82 | }; |
| 83 | |
| 84 | /* |
| 85 | * calculate CTS value if it's not found in the table |
| 86 | */ |
| 87 | static void r600_hdmi_calc_CTS(uint32_t clock, int *CTS, int N, int freq) |
| 88 | { |
| 89 | if (*CTS == 0) |
Rafał Miłecki | 3fe373d | 2010-03-06 13:03:38 +0000 | [diff] [blame] | 90 | *CTS = clock * N / (128 * freq) * 1000; |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 91 | DRM_DEBUG("Using ACR timing N=%d CTS=%d for frequency %d\n", |
| 92 | N, *CTS, freq); |
| 93 | } |
| 94 | |
| 95 | /* |
| 96 | * update the N and CTS parameters for a given pixel clock rate |
| 97 | */ |
| 98 | static void r600_hdmi_update_ACR(struct drm_encoder *encoder, uint32_t clock) |
| 99 | { |
| 100 | struct drm_device *dev = encoder->dev; |
| 101 | struct radeon_device *rdev = dev->dev_private; |
| 102 | uint32_t offset = to_radeon_encoder(encoder)->hdmi_offset; |
| 103 | int CTS; |
| 104 | int N; |
| 105 | int i; |
| 106 | |
| 107 | for (i = 0; r600_hdmi_ACR[i].Clock != clock && r600_hdmi_ACR[i].Clock != 0; i++); |
| 108 | |
| 109 | CTS = r600_hdmi_ACR[i].CTS_32kHz; |
| 110 | N = r600_hdmi_ACR[i].N_32kHz; |
| 111 | r600_hdmi_calc_CTS(clock, &CTS, N, 32000); |
Rafał Miłecki | c6543a6 | 2012-04-28 23:35:24 +0200 | [diff] [blame] | 112 | WREG32(HDMI0_ACR_32_0 + offset, HDMI0_ACR_CTS_32(CTS)); |
| 113 | WREG32(HDMI0_ACR_32_1 + offset, N); |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 114 | |
| 115 | CTS = r600_hdmi_ACR[i].CTS_44_1kHz; |
| 116 | N = r600_hdmi_ACR[i].N_44_1kHz; |
| 117 | r600_hdmi_calc_CTS(clock, &CTS, N, 44100); |
Rafał Miłecki | c6543a6 | 2012-04-28 23:35:24 +0200 | [diff] [blame] | 118 | WREG32(HDMI0_ACR_44_0 + offset, HDMI0_ACR_CTS_44(CTS)); |
| 119 | WREG32(HDMI0_ACR_44_1 + offset, N); |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 120 | |
| 121 | CTS = r600_hdmi_ACR[i].CTS_48kHz; |
| 122 | N = r600_hdmi_ACR[i].N_48kHz; |
| 123 | r600_hdmi_calc_CTS(clock, &CTS, N, 48000); |
Rafał Miłecki | c6543a6 | 2012-04-28 23:35:24 +0200 | [diff] [blame] | 124 | WREG32(HDMI0_ACR_48_0 + offset, HDMI0_ACR_CTS_48(CTS)); |
| 125 | WREG32(HDMI0_ACR_48_1 + offset, N); |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 126 | } |
| 127 | |
| 128 | /* |
| 129 | * calculate the crc for a given info frame |
| 130 | */ |
| 131 | static void r600_hdmi_infoframe_checksum(uint8_t packetType, |
| 132 | uint8_t versionNumber, |
| 133 | uint8_t length, |
| 134 | uint8_t *frame) |
| 135 | { |
Rafał Miłecki | 3fe373d | 2010-03-06 13:03:38 +0000 | [diff] [blame] | 136 | int i; |
| 137 | frame[0] = packetType + versionNumber + length; |
| 138 | for (i = 1; i <= length; i++) |
| 139 | frame[0] += frame[i]; |
| 140 | frame[0] = 0x100 - frame[0]; |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 141 | } |
| 142 | |
| 143 | /* |
| 144 | * build a HDMI Video Info Frame |
| 145 | */ |
| 146 | static void r600_hdmi_videoinfoframe( |
| 147 | struct drm_encoder *encoder, |
| 148 | enum r600_hdmi_color_format color_format, |
| 149 | int active_information_present, |
| 150 | uint8_t active_format_aspect_ratio, |
| 151 | uint8_t scan_information, |
| 152 | uint8_t colorimetry, |
| 153 | uint8_t ex_colorimetry, |
| 154 | uint8_t quantization, |
| 155 | int ITC, |
| 156 | uint8_t picture_aspect_ratio, |
| 157 | uint8_t video_format_identification, |
| 158 | uint8_t pixel_repetition, |
| 159 | uint8_t non_uniform_picture_scaling, |
| 160 | uint8_t bar_info_data_valid, |
| 161 | uint16_t top_bar, |
| 162 | uint16_t bottom_bar, |
| 163 | uint16_t left_bar, |
| 164 | uint16_t right_bar |
| 165 | ) |
| 166 | { |
| 167 | struct drm_device *dev = encoder->dev; |
| 168 | struct radeon_device *rdev = dev->dev_private; |
| 169 | uint32_t offset = to_radeon_encoder(encoder)->hdmi_offset; |
| 170 | |
| 171 | uint8_t frame[14]; |
| 172 | |
| 173 | frame[0x0] = 0; |
| 174 | frame[0x1] = |
| 175 | (scan_information & 0x3) | |
| 176 | ((bar_info_data_valid & 0x3) << 2) | |
| 177 | ((active_information_present & 0x1) << 4) | |
| 178 | ((color_format & 0x3) << 5); |
| 179 | frame[0x2] = |
| 180 | (active_format_aspect_ratio & 0xF) | |
| 181 | ((picture_aspect_ratio & 0x3) << 4) | |
| 182 | ((colorimetry & 0x3) << 6); |
| 183 | frame[0x3] = |
| 184 | (non_uniform_picture_scaling & 0x3) | |
| 185 | ((quantization & 0x3) << 2) | |
| 186 | ((ex_colorimetry & 0x7) << 4) | |
| 187 | ((ITC & 0x1) << 7); |
| 188 | frame[0x4] = (video_format_identification & 0x7F); |
| 189 | frame[0x5] = (pixel_repetition & 0xF); |
| 190 | frame[0x6] = (top_bar & 0xFF); |
| 191 | frame[0x7] = (top_bar >> 8); |
| 192 | frame[0x8] = (bottom_bar & 0xFF); |
| 193 | frame[0x9] = (bottom_bar >> 8); |
| 194 | frame[0xA] = (left_bar & 0xFF); |
| 195 | frame[0xB] = (left_bar >> 8); |
| 196 | frame[0xC] = (right_bar & 0xFF); |
| 197 | frame[0xD] = (right_bar >> 8); |
| 198 | |
| 199 | r600_hdmi_infoframe_checksum(0x82, 0x02, 0x0D, frame); |
Rafał Miłecki | 92db7f6 | 2011-12-23 20:32:18 +0100 | [diff] [blame] | 200 | /* Our header values (type, version, length) should be alright, Intel |
| 201 | * is using the same. Checksum function also seems to be OK, it works |
| 202 | * fine for audio infoframe. However calculated value is always lower |
| 203 | * by 2 in comparison to fglrx. It breaks displaying anything in case |
| 204 | * of TVs that strictly check the checksum. Hack it manually here to |
| 205 | * workaround this issue. */ |
| 206 | frame[0x0] += 2; |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 207 | |
Rafał Miłecki | c6543a6 | 2012-04-28 23:35:24 +0200 | [diff] [blame] | 208 | WREG32(HDMI0_AVI_INFO0 + offset, |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 209 | frame[0x0] | (frame[0x1] << 8) | (frame[0x2] << 16) | (frame[0x3] << 24)); |
Rafał Miłecki | c6543a6 | 2012-04-28 23:35:24 +0200 | [diff] [blame] | 210 | WREG32(HDMI0_AVI_INFO1 + offset, |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 211 | frame[0x4] | (frame[0x5] << 8) | (frame[0x6] << 16) | (frame[0x7] << 24)); |
Rafał Miłecki | c6543a6 | 2012-04-28 23:35:24 +0200 | [diff] [blame] | 212 | WREG32(HDMI0_AVI_INFO2 + offset, |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 213 | frame[0x8] | (frame[0x9] << 8) | (frame[0xA] << 16) | (frame[0xB] << 24)); |
Rafał Miłecki | c6543a6 | 2012-04-28 23:35:24 +0200 | [diff] [blame] | 214 | WREG32(HDMI0_AVI_INFO3 + offset, |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 215 | frame[0xC] | (frame[0xD] << 8)); |
| 216 | } |
| 217 | |
| 218 | /* |
| 219 | * build a Audio Info Frame |
| 220 | */ |
| 221 | static void r600_hdmi_audioinfoframe( |
| 222 | struct drm_encoder *encoder, |
| 223 | uint8_t channel_count, |
| 224 | uint8_t coding_type, |
| 225 | uint8_t sample_size, |
| 226 | uint8_t sample_frequency, |
| 227 | uint8_t format, |
| 228 | uint8_t channel_allocation, |
| 229 | uint8_t level_shift, |
| 230 | int downmix_inhibit |
| 231 | ) |
| 232 | { |
| 233 | struct drm_device *dev = encoder->dev; |
| 234 | struct radeon_device *rdev = dev->dev_private; |
| 235 | uint32_t offset = to_radeon_encoder(encoder)->hdmi_offset; |
| 236 | |
| 237 | uint8_t frame[11]; |
| 238 | |
| 239 | frame[0x0] = 0; |
| 240 | frame[0x1] = (channel_count & 0x7) | ((coding_type & 0xF) << 4); |
| 241 | frame[0x2] = (sample_size & 0x3) | ((sample_frequency & 0x7) << 2); |
| 242 | frame[0x3] = format; |
| 243 | frame[0x4] = channel_allocation; |
| 244 | frame[0x5] = ((level_shift & 0xF) << 3) | ((downmix_inhibit & 0x1) << 7); |
| 245 | frame[0x6] = 0; |
| 246 | frame[0x7] = 0; |
| 247 | frame[0x8] = 0; |
| 248 | frame[0x9] = 0; |
| 249 | frame[0xA] = 0; |
| 250 | |
| 251 | r600_hdmi_infoframe_checksum(0x84, 0x01, 0x0A, frame); |
| 252 | |
Rafał Miłecki | c6543a6 | 2012-04-28 23:35:24 +0200 | [diff] [blame] | 253 | WREG32(HDMI0_AUDIO_INFO0 + offset, |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 254 | frame[0x0] | (frame[0x1] << 8) | (frame[0x2] << 16) | (frame[0x3] << 24)); |
Rafał Miłecki | c6543a6 | 2012-04-28 23:35:24 +0200 | [diff] [blame] | 255 | WREG32(HDMI0_AUDIO_INFO1 + offset, |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 256 | frame[0x4] | (frame[0x5] << 8) | (frame[0x6] << 16) | (frame[0x8] << 24)); |
| 257 | } |
| 258 | |
| 259 | /* |
| 260 | * test if audio buffer is filled enough to start playing |
| 261 | */ |
| 262 | static int r600_hdmi_is_audio_buffer_filled(struct drm_encoder *encoder) |
| 263 | { |
| 264 | struct drm_device *dev = encoder->dev; |
| 265 | struct radeon_device *rdev = dev->dev_private; |
| 266 | uint32_t offset = to_radeon_encoder(encoder)->hdmi_offset; |
| 267 | |
Rafał Miłecki | c6543a6 | 2012-04-28 23:35:24 +0200 | [diff] [blame] | 268 | return (RREG32(HDMI0_STATUS + offset) & 0x10) != 0; |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 269 | } |
| 270 | |
| 271 | /* |
| 272 | * have buffer status changed since last call? |
| 273 | */ |
| 274 | int r600_hdmi_buffer_status_changed(struct drm_encoder *encoder) |
| 275 | { |
| 276 | struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); |
| 277 | int status, result; |
| 278 | |
Rafał Miłecki | af0b574 | 2012-04-28 23:35:23 +0200 | [diff] [blame] | 279 | if (!radeon_encoder->hdmi_enabled) |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 280 | return 0; |
| 281 | |
| 282 | status = r600_hdmi_is_audio_buffer_filled(encoder); |
| 283 | result = radeon_encoder->hdmi_buffer_status != status; |
| 284 | radeon_encoder->hdmi_buffer_status = status; |
| 285 | |
| 286 | return result; |
| 287 | } |
| 288 | |
| 289 | /* |
| 290 | * write the audio workaround status to the hardware |
| 291 | */ |
| 292 | void r600_hdmi_audio_workaround(struct drm_encoder *encoder) |
| 293 | { |
| 294 | struct drm_device *dev = encoder->dev; |
| 295 | struct radeon_device *rdev = dev->dev_private; |
| 296 | struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); |
| 297 | uint32_t offset = radeon_encoder->hdmi_offset; |
| 298 | |
Rafał Miłecki | af0b574 | 2012-04-28 23:35:23 +0200 | [diff] [blame] | 299 | if (!radeon_encoder->hdmi_enabled) |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 300 | return; |
| 301 | |
Christian Koenig | f259493 | 2010-04-10 03:13:16 +0200 | [diff] [blame] | 302 | if (!radeon_encoder->hdmi_audio_workaround || |
| 303 | r600_hdmi_is_audio_buffer_filled(encoder)) { |
| 304 | |
| 305 | /* disable audio workaround */ |
Rafał Miłecki | a273a90 | 2012-04-30 15:44:52 +0200 | [diff] [blame] | 306 | WREG32_P(HDMI0_AUDIO_PACKET_CONTROL + offset, |
| 307 | 0, ~HDMI0_AUDIO_TEST_EN); |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 308 | |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 309 | } else { |
Christian Koenig | f259493 | 2010-04-10 03:13:16 +0200 | [diff] [blame] | 310 | /* enable audio workaround */ |
Rafał Miłecki | a273a90 | 2012-04-30 15:44:52 +0200 | [diff] [blame] | 311 | WREG32_P(HDMI0_AUDIO_PACKET_CONTROL + offset, |
| 312 | HDMI0_AUDIO_TEST_EN, ~HDMI0_AUDIO_TEST_EN); |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 313 | } |
| 314 | } |
| 315 | |
| 316 | |
| 317 | /* |
| 318 | * update the info frames with the data from the current display mode |
| 319 | */ |
| 320 | void r600_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode *mode) |
| 321 | { |
| 322 | struct drm_device *dev = encoder->dev; |
| 323 | struct radeon_device *rdev = dev->dev_private; |
| 324 | uint32_t offset = to_radeon_encoder(encoder)->hdmi_offset; |
| 325 | |
Rafał Miłecki | f83d926 | 2011-12-23 20:36:06 +0100 | [diff] [blame] | 326 | if (ASIC_IS_DCE5(rdev)) |
Alex Deucher | 16823d1 | 2010-04-16 11:35:30 -0400 | [diff] [blame] | 327 | return; |
| 328 | |
Rafał Miłecki | af0b574 | 2012-04-28 23:35:23 +0200 | [diff] [blame] | 329 | if (!to_radeon_encoder(encoder)->hdmi_enabled) |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 330 | return; |
| 331 | |
| 332 | r600_audio_set_clock(encoder, mode->clock); |
| 333 | |
Rafał Miłecki | c6543a6 | 2012-04-28 23:35:24 +0200 | [diff] [blame] | 334 | WREG32(HDMI0_AUDIO_CRC_CONTROL + offset, 0x1000); |
| 335 | WREG32(HDMI0_GC + offset, 0x0); |
Rafał Miłecki | a273a90 | 2012-04-30 15:44:52 +0200 | [diff] [blame] | 336 | |
| 337 | /* Send audio packets */ |
| 338 | if (ASIC_IS_DCE4(rdev)) |
| 339 | WREG32_P(0x74fc + offset, |
| 340 | AFMT_AUDIO_SAMPLE_SEND, ~AFMT_AUDIO_SAMPLE_SEND); |
| 341 | else if (ASIC_IS_DCE32(rdev)) |
| 342 | WREG32_P(AFMT_AUDIO_PACKET_CONTROL + offset, |
| 343 | AFMT_AUDIO_SAMPLE_SEND, ~AFMT_AUDIO_SAMPLE_SEND); |
| 344 | else |
| 345 | WREG32_P(HDMI0_AUDIO_PACKET_CONTROL + offset, |
| 346 | HDMI0_AUDIO_SAMPLE_SEND, ~HDMI0_AUDIO_SAMPLE_SEND); |
| 347 | |
Rafał Miłecki | c6543a6 | 2012-04-28 23:35:24 +0200 | [diff] [blame] | 348 | WREG32(HDMI0_ACR_PACKET_CONTROL + offset, 0x1000); |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 349 | |
| 350 | r600_hdmi_update_ACR(encoder, mode->clock); |
| 351 | |
Rafał Miłecki | c6543a6 | 2012-04-28 23:35:24 +0200 | [diff] [blame] | 352 | WREG32(HDMI0_INFOFRAME_CONTROL0 + offset, 0x13); |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 353 | |
Rafał Miłecki | c6543a6 | 2012-04-28 23:35:24 +0200 | [diff] [blame] | 354 | WREG32(HDMI0_INFOFRAME_CONTROL1 + offset, 0x202); |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 355 | |
| 356 | r600_hdmi_videoinfoframe(encoder, RGB, 0, 0, 0, 0, |
| 357 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); |
| 358 | |
Lucas De Marchi | 25985ed | 2011-03-30 22:57:33 -0300 | [diff] [blame] | 359 | /* it's unknown what these bits do excatly, but it's indeed quite useful for debugging */ |
Rafał Miłecki | c6543a6 | 2012-04-28 23:35:24 +0200 | [diff] [blame] | 360 | WREG32(HDMI0_RAMP_CONTROL0 + offset, 0x00FFFFFF); |
| 361 | WREG32(HDMI0_RAMP_CONTROL1 + offset, 0x007FFFFF); |
| 362 | WREG32(HDMI0_RAMP_CONTROL2 + offset, 0x00000001); |
| 363 | WREG32(HDMI0_RAMP_CONTROL3 + offset, 0x00000001); |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 364 | |
| 365 | r600_hdmi_audio_workaround(encoder); |
| 366 | |
| 367 | /* audio packets per line, does anyone know how to calc this ? */ |
Rafał Miłecki | c6543a6 | 2012-04-28 23:35:24 +0200 | [diff] [blame] | 368 | WREG32_P(HDMI0_AUDIO_PACKET_CONTROL + offset, 0x00040000, ~0x001F0000); |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 369 | } |
| 370 | |
| 371 | /* |
| 372 | * update settings with current parameters from audio engine |
| 373 | */ |
Christian König | 58bd086 | 2010-04-05 22:14:55 +0200 | [diff] [blame] | 374 | void r600_hdmi_update_audio_settings(struct drm_encoder *encoder) |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 375 | { |
| 376 | struct drm_device *dev = encoder->dev; |
| 377 | struct radeon_device *rdev = dev->dev_private; |
| 378 | uint32_t offset = to_radeon_encoder(encoder)->hdmi_offset; |
| 379 | |
Christian König | 58bd086 | 2010-04-05 22:14:55 +0200 | [diff] [blame] | 380 | int channels = r600_audio_channels(rdev); |
| 381 | int rate = r600_audio_rate(rdev); |
| 382 | int bps = r600_audio_bits_per_sample(rdev); |
| 383 | uint8_t status_bits = r600_audio_status_bits(rdev); |
| 384 | uint8_t category_code = r600_audio_category_code(rdev); |
| 385 | |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 386 | uint32_t iec; |
| 387 | |
Rafał Miłecki | af0b574 | 2012-04-28 23:35:23 +0200 | [diff] [blame] | 388 | if (!to_radeon_encoder(encoder)->hdmi_enabled) |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 389 | return; |
| 390 | |
| 391 | DRM_DEBUG("%s with %d channels, %d Hz sampling rate, %d bits per sample,\n", |
| 392 | r600_hdmi_is_audio_buffer_filled(encoder) ? "playing" : "stopped", |
| 393 | channels, rate, bps); |
| 394 | DRM_DEBUG("0x%02X IEC60958 status bits and 0x%02X category code\n", |
| 395 | (int)status_bits, (int)category_code); |
| 396 | |
| 397 | iec = 0; |
| 398 | if (status_bits & AUDIO_STATUS_PROFESSIONAL) |
| 399 | iec |= 1 << 0; |
| 400 | if (status_bits & AUDIO_STATUS_NONAUDIO) |
| 401 | iec |= 1 << 1; |
| 402 | if (status_bits & AUDIO_STATUS_COPYRIGHT) |
| 403 | iec |= 1 << 2; |
| 404 | if (status_bits & AUDIO_STATUS_EMPHASIS) |
| 405 | iec |= 1 << 3; |
| 406 | |
| 407 | iec |= category_code << 8; |
| 408 | |
| 409 | switch (rate) { |
| 410 | case 32000: iec |= 0x3 << 24; break; |
| 411 | case 44100: iec |= 0x0 << 24; break; |
| 412 | case 88200: iec |= 0x8 << 24; break; |
| 413 | case 176400: iec |= 0xc << 24; break; |
| 414 | case 48000: iec |= 0x2 << 24; break; |
| 415 | case 96000: iec |= 0xa << 24; break; |
| 416 | case 192000: iec |= 0xe << 24; break; |
| 417 | } |
| 418 | |
Rafał Miłecki | c6543a6 | 2012-04-28 23:35:24 +0200 | [diff] [blame] | 419 | WREG32(HDMI0_60958_0 + offset, iec); |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 420 | |
| 421 | iec = 0; |
| 422 | switch (bps) { |
| 423 | case 16: iec |= 0x2; break; |
| 424 | case 20: iec |= 0x3; break; |
| 425 | case 24: iec |= 0xb; break; |
| 426 | } |
| 427 | if (status_bits & AUDIO_STATUS_V) |
| 428 | iec |= 0x5 << 16; |
| 429 | |
Rafał Miłecki | c6543a6 | 2012-04-28 23:35:24 +0200 | [diff] [blame] | 430 | WREG32_P(HDMI0_60958_1 + offset, iec, ~0x5000f); |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 431 | |
| 432 | /* 0x021 or 0x031 sets the audio frame length */ |
Rafał Miłecki | c6543a6 | 2012-04-28 23:35:24 +0200 | [diff] [blame] | 433 | WREG32(HDMI0_VBI_PACKET_CONTROL + offset, 0x31); |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 434 | r600_hdmi_audioinfoframe(encoder, channels-1, 0, 0, 0, 0, 0, 0, 0); |
| 435 | |
| 436 | r600_hdmi_audio_workaround(encoder); |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 437 | } |
| 438 | |
Rafał Miłecki | 2cd6218 | 2010-03-08 22:14:01 +0000 | [diff] [blame] | 439 | static void r600_hdmi_assign_block(struct drm_encoder *encoder) |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 440 | { |
| 441 | struct drm_device *dev = encoder->dev; |
| 442 | struct radeon_device *rdev = dev->dev_private; |
| 443 | struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); |
Rafał Miłecki | 2cd6218 | 2010-03-08 22:14:01 +0000 | [diff] [blame] | 444 | struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 445 | |
Rafał Miłecki | f83d926 | 2011-12-23 20:36:06 +0100 | [diff] [blame] | 446 | u16 eg_offsets[] = { |
| 447 | EVERGREEN_CRTC0_REGISTER_OFFSET, |
| 448 | EVERGREEN_CRTC1_REGISTER_OFFSET, |
| 449 | EVERGREEN_CRTC2_REGISTER_OFFSET, |
| 450 | EVERGREEN_CRTC3_REGISTER_OFFSET, |
| 451 | EVERGREEN_CRTC4_REGISTER_OFFSET, |
| 452 | EVERGREEN_CRTC5_REGISTER_OFFSET, |
| 453 | }; |
| 454 | |
Rafał Miłecki | 2cd6218 | 2010-03-08 22:14:01 +0000 | [diff] [blame] | 455 | if (!dig) { |
| 456 | dev_err(rdev->dev, "Enabling HDMI on non-dig encoder\n"); |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 457 | return; |
Rafał Miłecki | 2cd6218 | 2010-03-08 22:14:01 +0000 | [diff] [blame] | 458 | } |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 459 | |
Rafał Miłecki | ebcb796 | 2011-12-04 11:23:51 +0100 | [diff] [blame] | 460 | if (ASIC_IS_DCE5(rdev)) { |
| 461 | /* TODO */ |
| 462 | } else if (ASIC_IS_DCE4(rdev)) { |
Rafał Miłecki | f83d926 | 2011-12-23 20:36:06 +0100 | [diff] [blame] | 463 | if (dig->dig_encoder >= ARRAY_SIZE(eg_offsets)) { |
| 464 | dev_err(rdev->dev, "Enabling HDMI on unknown dig\n"); |
| 465 | return; |
| 466 | } |
Rafał Miłecki | c6543a6 | 2012-04-28 23:35:24 +0200 | [diff] [blame] | 467 | radeon_encoder->hdmi_offset = eg_offsets[dig->dig_encoder]; |
| 468 | /* Temp hack for Evergreen until we split r600_hdmi.c |
| 469 | * Evergreen first block is 0x7030 instead of 0x7400. |
| 470 | */ |
| 471 | radeon_encoder->hdmi_offset -= 0x3d0; |
Rafał Miłecki | 2cd6218 | 2010-03-08 22:14:01 +0000 | [diff] [blame] | 472 | } else if (ASIC_IS_DCE3(rdev)) { |
| 473 | radeon_encoder->hdmi_offset = dig->dig_encoder ? |
Rafał Miłecki | c6543a6 | 2012-04-28 23:35:24 +0200 | [diff] [blame] | 474 | DCE3_HDMI_OFFSET1 : DCE3_HDMI_OFFSET0; |
Rafał Miłecki | 816ce43 | 2012-04-28 23:35:22 +0200 | [diff] [blame] | 475 | } else if (rdev->family >= CHIP_R600) { |
| 476 | /* 2 routable blocks, but using dig_encoder should be fine */ |
| 477 | radeon_encoder->hdmi_offset = dig->dig_encoder ? |
Rafał Miłecki | c6543a6 | 2012-04-28 23:35:24 +0200 | [diff] [blame] | 478 | DCE2_HDMI_OFFSET1 : DCE2_HDMI_OFFSET0; |
Rafał Miłecki | 816ce43 | 2012-04-28 23:35:22 +0200 | [diff] [blame] | 479 | } else if (rdev->family == CHIP_RS600 || rdev->family == CHIP_RS690 || |
| 480 | rdev->family == CHIP_RS740) { |
| 481 | /* Only 1 routable block */ |
Rafał Miłecki | c6543a6 | 2012-04-28 23:35:24 +0200 | [diff] [blame] | 482 | radeon_encoder->hdmi_offset = DCE2_HDMI_OFFSET0; |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 483 | } |
Rafał Miłecki | af0b574 | 2012-04-28 23:35:23 +0200 | [diff] [blame] | 484 | radeon_encoder->hdmi_enabled = true; |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 485 | } |
| 486 | |
| 487 | /* |
Rafał Miłecki | 2cd6218 | 2010-03-08 22:14:01 +0000 | [diff] [blame] | 488 | * enable the HDMI engine |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 489 | */ |
Rafał Miłecki | 2cd6218 | 2010-03-08 22:14:01 +0000 | [diff] [blame] | 490 | void r600_hdmi_enable(struct drm_encoder *encoder) |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 491 | { |
Rafał Miłecki | 2cd6218 | 2010-03-08 22:14:01 +0000 | [diff] [blame] | 492 | struct drm_device *dev = encoder->dev; |
| 493 | struct radeon_device *rdev = dev->dev_private; |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 494 | struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); |
Christian Koenig | f259493 | 2010-04-10 03:13:16 +0200 | [diff] [blame] | 495 | uint32_t offset; |
Rafał Miłecki | 64fb4fb | 2012-04-30 15:44:53 +0200 | [diff] [blame^] | 496 | u32 hdmi; |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 497 | |
Rafał Miłecki | f83d926 | 2011-12-23 20:36:06 +0100 | [diff] [blame] | 498 | if (ASIC_IS_DCE5(rdev)) |
Alex Deucher | 16823d1 | 2010-04-16 11:35:30 -0400 | [diff] [blame] | 499 | return; |
| 500 | |
Rafał Miłecki | af0b574 | 2012-04-28 23:35:23 +0200 | [diff] [blame] | 501 | if (!radeon_encoder->hdmi_enabled) { |
Rafał Miłecki | 2cd6218 | 2010-03-08 22:14:01 +0000 | [diff] [blame] | 502 | r600_hdmi_assign_block(encoder); |
Rafał Miłecki | af0b574 | 2012-04-28 23:35:23 +0200 | [diff] [blame] | 503 | if (!radeon_encoder->hdmi_enabled) { |
Rafał Miłecki | 2cd6218 | 2010-03-08 22:14:01 +0000 | [diff] [blame] | 504 | dev_warn(rdev->dev, "Could not find HDMI block for " |
| 505 | "0x%x encoder\n", radeon_encoder->encoder_id); |
| 506 | return; |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 507 | } |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 508 | } |
| 509 | |
Christian Koenig | f259493 | 2010-04-10 03:13:16 +0200 | [diff] [blame] | 510 | offset = radeon_encoder->hdmi_offset; |
Rafał Miłecki | 64fb4fb | 2012-04-30 15:44:53 +0200 | [diff] [blame^] | 511 | |
| 512 | /* Older chipsets require setting HDMI and routing manually */ |
| 513 | if (rdev->family >= CHIP_R600 && !ASIC_IS_DCE3(rdev)) { |
| 514 | hdmi = HDMI0_ERROR_ACK | HDMI0_ENABLE; |
Rafał Miłecki | 5715f67 | 2010-03-06 13:03:35 +0000 | [diff] [blame] | 515 | switch (radeon_encoder->encoder_id) { |
| 516 | case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_TMDS1: |
Rafał Miłecki | 93a4ed8 | 2011-12-24 12:25:36 +0100 | [diff] [blame] | 517 | WREG32_P(AVIVO_TMDSA_CNTL, AVIVO_TMDSA_CNTL_HDMI_EN, |
| 518 | ~AVIVO_TMDSA_CNTL_HDMI_EN); |
Rafał Miłecki | 64fb4fb | 2012-04-30 15:44:53 +0200 | [diff] [blame^] | 519 | hdmi |= HDMI0_STREAM(HDMI0_STREAM_TMDSA); |
Rafał Miłecki | 5715f67 | 2010-03-06 13:03:35 +0000 | [diff] [blame] | 520 | break; |
| 521 | case ENCODER_OBJECT_ID_INTERNAL_LVTM1: |
Rafał Miłecki | 93a4ed8 | 2011-12-24 12:25:36 +0100 | [diff] [blame] | 522 | WREG32_P(AVIVO_LVTMA_CNTL, AVIVO_LVTMA_CNTL_HDMI_EN, |
| 523 | ~AVIVO_LVTMA_CNTL_HDMI_EN); |
Rafał Miłecki | 64fb4fb | 2012-04-30 15:44:53 +0200 | [diff] [blame^] | 524 | hdmi |= HDMI0_STREAM(HDMI0_STREAM_LVTMA); |
| 525 | break; |
| 526 | case ENCODER_OBJECT_ID_INTERNAL_DDI: |
| 527 | WREG32_P(DDIA_CNTL, DDIA_HDMI_EN, ~DDIA_HDMI_EN); |
| 528 | hdmi |= HDMI0_STREAM(HDMI0_STREAM_DDIA); |
| 529 | break; |
| 530 | case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DVO1: |
| 531 | hdmi |= HDMI0_STREAM(HDMI0_STREAM_DVOA); |
Rafał Miłecki | 5715f67 | 2010-03-06 13:03:35 +0000 | [diff] [blame] | 532 | break; |
| 533 | default: |
Rafał Miłecki | 64fb4fb | 2012-04-30 15:44:53 +0200 | [diff] [blame^] | 534 | dev_err(rdev->dev, "Invalid encoder for HDMI: 0x%X\n", |
| 535 | radeon_encoder->encoder_id); |
Rafał Miłecki | 5715f67 | 2010-03-06 13:03:35 +0000 | [diff] [blame] | 536 | break; |
| 537 | } |
Rafał Miłecki | 64fb4fb | 2012-04-30 15:44:53 +0200 | [diff] [blame^] | 538 | WREG32(HDMI0_CONTROL + offset, hdmi); |
Rafał Miłecki | 5715f67 | 2010-03-06 13:03:35 +0000 | [diff] [blame] | 539 | } |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 540 | |
Alex Deucher | f122c61 | 2012-03-30 08:59:57 -0400 | [diff] [blame] | 541 | if (rdev->irq.installed) { |
Christian Koenig | f259493 | 2010-04-10 03:13:16 +0200 | [diff] [blame] | 542 | /* if irq is available use it */ |
Rafał Miłecki | c6543a6 | 2012-04-28 23:35:24 +0200 | [diff] [blame] | 543 | rdev->irq.afmt[offset == 0 ? 0 : 1] = true; |
Christian Koenig | f259493 | 2010-04-10 03:13:16 +0200 | [diff] [blame] | 544 | radeon_irq_set(rdev); |
Christian Koenig | f259493 | 2010-04-10 03:13:16 +0200 | [diff] [blame] | 545 | } |
Christian König | 58bd086 | 2010-04-05 22:14:55 +0200 | [diff] [blame] | 546 | |
Rafał Miłecki | 2cd6218 | 2010-03-08 22:14:01 +0000 | [diff] [blame] | 547 | DRM_DEBUG("Enabling HDMI interface @ 0x%04X for encoder 0x%x\n", |
| 548 | radeon_encoder->hdmi_offset, radeon_encoder->encoder_id); |
| 549 | } |
| 550 | |
| 551 | /* |
| 552 | * disable the HDMI engine |
| 553 | */ |
| 554 | void r600_hdmi_disable(struct drm_encoder *encoder) |
| 555 | { |
| 556 | struct drm_device *dev = encoder->dev; |
| 557 | struct radeon_device *rdev = dev->dev_private; |
| 558 | struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); |
Dave Airlie | 6698998 | 2010-05-19 10:35:02 +1000 | [diff] [blame] | 559 | uint32_t offset; |
Rafał Miłecki | 2cd6218 | 2010-03-08 22:14:01 +0000 | [diff] [blame] | 560 | |
Rafał Miłecki | f83d926 | 2011-12-23 20:36:06 +0100 | [diff] [blame] | 561 | if (ASIC_IS_DCE5(rdev)) |
Alex Deucher | 16823d1 | 2010-04-16 11:35:30 -0400 | [diff] [blame] | 562 | return; |
| 563 | |
Christian Koenig | f259493 | 2010-04-10 03:13:16 +0200 | [diff] [blame] | 564 | offset = radeon_encoder->hdmi_offset; |
Rafał Miłecki | af0b574 | 2012-04-28 23:35:23 +0200 | [diff] [blame] | 565 | if (!radeon_encoder->hdmi_enabled) { |
Rafał Miłecki | 2cd6218 | 2010-03-08 22:14:01 +0000 | [diff] [blame] | 566 | dev_err(rdev->dev, "Disabling not enabled HDMI\n"); |
| 567 | return; |
| 568 | } |
| 569 | |
| 570 | DRM_DEBUG("Disabling HDMI interface @ 0x%04X for encoder 0x%x\n", |
Christian Koenig | f259493 | 2010-04-10 03:13:16 +0200 | [diff] [blame] | 571 | offset, radeon_encoder->encoder_id); |
| 572 | |
| 573 | /* disable irq */ |
Rafał Miłecki | c6543a6 | 2012-04-28 23:35:24 +0200 | [diff] [blame] | 574 | rdev->irq.afmt[offset == 0 ? 0 : 1] = false; |
Christian Koenig | f259493 | 2010-04-10 03:13:16 +0200 | [diff] [blame] | 575 | radeon_irq_set(rdev); |
| 576 | |
Rafał Miłecki | 64fb4fb | 2012-04-30 15:44:53 +0200 | [diff] [blame^] | 577 | /* Older chipsets not handled by AtomBIOS */ |
| 578 | if (rdev->family >= CHIP_R600 && !ASIC_IS_DCE3(rdev)) { |
Rafał Miłecki | 5715f67 | 2010-03-06 13:03:35 +0000 | [diff] [blame] | 579 | switch (radeon_encoder->encoder_id) { |
| 580 | case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_TMDS1: |
Rafał Miłecki | 93a4ed8 | 2011-12-24 12:25:36 +0100 | [diff] [blame] | 581 | WREG32_P(AVIVO_TMDSA_CNTL, 0, |
| 582 | ~AVIVO_TMDSA_CNTL_HDMI_EN); |
Rafał Miłecki | 5715f67 | 2010-03-06 13:03:35 +0000 | [diff] [blame] | 583 | break; |
| 584 | case ENCODER_OBJECT_ID_INTERNAL_LVTM1: |
Rafał Miłecki | 93a4ed8 | 2011-12-24 12:25:36 +0100 | [diff] [blame] | 585 | WREG32_P(AVIVO_LVTMA_CNTL, 0, |
| 586 | ~AVIVO_LVTMA_CNTL_HDMI_EN); |
Rafał Miłecki | 64fb4fb | 2012-04-30 15:44:53 +0200 | [diff] [blame^] | 587 | break; |
| 588 | case ENCODER_OBJECT_ID_INTERNAL_DDI: |
| 589 | WREG32_P(DDIA_CNTL, 0, ~DDIA_HDMI_EN); |
| 590 | break; |
| 591 | case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DVO1: |
Rafał Miłecki | 5715f67 | 2010-03-06 13:03:35 +0000 | [diff] [blame] | 592 | break; |
| 593 | default: |
Rafał Miłecki | 64fb4fb | 2012-04-30 15:44:53 +0200 | [diff] [blame^] | 594 | dev_err(rdev->dev, "Invalid encoder for HDMI: 0x%X\n", |
| 595 | radeon_encoder->encoder_id); |
Rafał Miłecki | 5715f67 | 2010-03-06 13:03:35 +0000 | [diff] [blame] | 596 | break; |
| 597 | } |
Rafał Miłecki | 64fb4fb | 2012-04-30 15:44:53 +0200 | [diff] [blame^] | 598 | WREG32(HDMI0_CONTROL + offset, HDMI0_ERROR_ACK); |
Rafał Miłecki | 5715f67 | 2010-03-06 13:03:35 +0000 | [diff] [blame] | 599 | } |
Rafał Miłecki | 2cd6218 | 2010-03-08 22:14:01 +0000 | [diff] [blame] | 600 | |
Rafał Miłecki | af0b574 | 2012-04-28 23:35:23 +0200 | [diff] [blame] | 601 | radeon_encoder->hdmi_enabled = false; |
Rafał Miłecki | 2cd6218 | 2010-03-08 22:14:01 +0000 | [diff] [blame] | 602 | radeon_encoder->hdmi_offset = 0; |
Christian Koenig | dafc3bd | 2009-10-11 23:49:13 +0200 | [diff] [blame] | 603 | } |