diff options
Diffstat (limited to 'drivers/gpu/drm/radeon')
-rw-r--r-- | drivers/gpu/drm/radeon/r600.c | 33 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/r600_audio.c | 21 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/r600_hdmi.c | 54 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/r600_reg.h | 57 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon.h | 3 |
5 files changed, 112 insertions, 56 deletions
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c index c325cb121059..2ec423c3f3f8 100644 --- a/drivers/gpu/drm/radeon/r600.c +++ b/drivers/gpu/drm/radeon/r600.c | |||
@@ -2527,6 +2527,7 @@ int r600_irq_set(struct radeon_device *rdev) | |||
2527 | u32 cp_int_cntl = CNTX_BUSY_INT_ENABLE | CNTX_EMPTY_INT_ENABLE; | 2527 | u32 cp_int_cntl = CNTX_BUSY_INT_ENABLE | CNTX_EMPTY_INT_ENABLE; |
2528 | u32 mode_int = 0; | 2528 | u32 mode_int = 0; |
2529 | u32 hpd1, hpd2, hpd3, hpd4 = 0, hpd5 = 0, hpd6 = 0; | 2529 | u32 hpd1, hpd2, hpd3, hpd4 = 0, hpd5 = 0, hpd6 = 0; |
2530 | u32 hdmi1, hdmi2; | ||
2530 | 2531 | ||
2531 | if (!rdev->irq.installed) { | 2532 | if (!rdev->irq.installed) { |
2532 | WARN(1, "Can't enable IRQ/MSI because no handler is installed.\n"); | 2533 | WARN(1, "Can't enable IRQ/MSI because no handler is installed.\n"); |
@@ -2540,7 +2541,9 @@ int r600_irq_set(struct radeon_device *rdev) | |||
2540 | return 0; | 2541 | return 0; |
2541 | } | 2542 | } |
2542 | 2543 | ||
2544 | hdmi1 = RREG32(R600_HDMI_BLOCK1 + R600_HDMI_CNTL) & ~R600_HDMI_INT_EN; | ||
2543 | if (ASIC_IS_DCE3(rdev)) { | 2545 | if (ASIC_IS_DCE3(rdev)) { |
2546 | hdmi2 = RREG32(R600_HDMI_BLOCK3 + R600_HDMI_CNTL) & ~R600_HDMI_INT_EN; | ||
2544 | hpd1 = RREG32(DC_HPD1_INT_CONTROL) & ~DC_HPDx_INT_EN; | 2547 | hpd1 = RREG32(DC_HPD1_INT_CONTROL) & ~DC_HPDx_INT_EN; |
2545 | hpd2 = RREG32(DC_HPD2_INT_CONTROL) & ~DC_HPDx_INT_EN; | 2548 | hpd2 = RREG32(DC_HPD2_INT_CONTROL) & ~DC_HPDx_INT_EN; |
2546 | hpd3 = RREG32(DC_HPD3_INT_CONTROL) & ~DC_HPDx_INT_EN; | 2549 | hpd3 = RREG32(DC_HPD3_INT_CONTROL) & ~DC_HPDx_INT_EN; |
@@ -2550,6 +2553,7 @@ int r600_irq_set(struct radeon_device *rdev) | |||
2550 | hpd6 = RREG32(DC_HPD6_INT_CONTROL) & ~DC_HPDx_INT_EN; | 2553 | hpd6 = RREG32(DC_HPD6_INT_CONTROL) & ~DC_HPDx_INT_EN; |
2551 | } | 2554 | } |
2552 | } else { | 2555 | } else { |
2556 | hdmi2 = RREG32(R600_HDMI_BLOCK2 + R600_HDMI_CNTL) & ~R600_HDMI_INT_EN; | ||
2553 | hpd1 = RREG32(DC_HOT_PLUG_DETECT1_INT_CONTROL) & ~DC_HPDx_INT_EN; | 2557 | hpd1 = RREG32(DC_HOT_PLUG_DETECT1_INT_CONTROL) & ~DC_HPDx_INT_EN; |
2554 | hpd2 = RREG32(DC_HOT_PLUG_DETECT2_INT_CONTROL) & ~DC_HPDx_INT_EN; | 2558 | hpd2 = RREG32(DC_HOT_PLUG_DETECT2_INT_CONTROL) & ~DC_HPDx_INT_EN; |
2555 | hpd3 = RREG32(DC_HOT_PLUG_DETECT3_INT_CONTROL) & ~DC_HPDx_INT_EN; | 2559 | hpd3 = RREG32(DC_HOT_PLUG_DETECT3_INT_CONTROL) & ~DC_HPDx_INT_EN; |
@@ -2591,10 +2595,20 @@ int r600_irq_set(struct radeon_device *rdev) | |||
2591 | DRM_DEBUG("r600_irq_set: hpd 6\n"); | 2595 | DRM_DEBUG("r600_irq_set: hpd 6\n"); |
2592 | hpd6 |= DC_HPDx_INT_EN; | 2596 | hpd6 |= DC_HPDx_INT_EN; |
2593 | } | 2597 | } |
2598 | if (rdev->irq.hdmi[0]) { | ||
2599 | DRM_DEBUG("r600_irq_set: hdmi 1\n"); | ||
2600 | hdmi1 |= R600_HDMI_INT_EN; | ||
2601 | } | ||
2602 | if (rdev->irq.hdmi[1]) { | ||
2603 | DRM_DEBUG("r600_irq_set: hdmi 2\n"); | ||
2604 | hdmi2 |= R600_HDMI_INT_EN; | ||
2605 | } | ||
2594 | 2606 | ||
2595 | WREG32(CP_INT_CNTL, cp_int_cntl); | 2607 | WREG32(CP_INT_CNTL, cp_int_cntl); |
2596 | WREG32(DxMODE_INT_MASK, mode_int); | 2608 | WREG32(DxMODE_INT_MASK, mode_int); |
2609 | WREG32(R600_HDMI_BLOCK1 + R600_HDMI_CNTL, hdmi1); | ||
2597 | if (ASIC_IS_DCE3(rdev)) { | 2610 | if (ASIC_IS_DCE3(rdev)) { |
2611 | WREG32(R600_HDMI_BLOCK3 + R600_HDMI_CNTL, hdmi2); | ||
2598 | WREG32(DC_HPD1_INT_CONTROL, hpd1); | 2612 | WREG32(DC_HPD1_INT_CONTROL, hpd1); |
2599 | WREG32(DC_HPD2_INT_CONTROL, hpd2); | 2613 | WREG32(DC_HPD2_INT_CONTROL, hpd2); |
2600 | WREG32(DC_HPD3_INT_CONTROL, hpd3); | 2614 | WREG32(DC_HPD3_INT_CONTROL, hpd3); |
@@ -2604,6 +2618,7 @@ int r600_irq_set(struct radeon_device *rdev) | |||
2604 | WREG32(DC_HPD6_INT_CONTROL, hpd6); | 2618 | WREG32(DC_HPD6_INT_CONTROL, hpd6); |
2605 | } | 2619 | } |
2606 | } else { | 2620 | } else { |
2621 | WREG32(R600_HDMI_BLOCK2 + R600_HDMI_CNTL, hdmi2); | ||
2607 | WREG32(DC_HOT_PLUG_DETECT1_INT_CONTROL, hpd1); | 2622 | WREG32(DC_HOT_PLUG_DETECT1_INT_CONTROL, hpd1); |
2608 | WREG32(DC_HOT_PLUG_DETECT2_INT_CONTROL, hpd2); | 2623 | WREG32(DC_HOT_PLUG_DETECT2_INT_CONTROL, hpd2); |
2609 | WREG32(DC_HOT_PLUG_DETECT3_INT_CONTROL, hpd3); | 2624 | WREG32(DC_HOT_PLUG_DETECT3_INT_CONTROL, hpd3); |
@@ -2687,6 +2702,18 @@ static inline void r600_irq_ack(struct radeon_device *rdev, | |||
2687 | WREG32(DC_HPD6_INT_CONTROL, tmp); | 2702 | WREG32(DC_HPD6_INT_CONTROL, tmp); |
2688 | } | 2703 | } |
2689 | } | 2704 | } |
2705 | if (RREG32(R600_HDMI_BLOCK1 + R600_HDMI_STATUS) & R600_HDMI_INT_PENDING) { | ||
2706 | WREG32_P(R600_HDMI_BLOCK1 + R600_HDMI_CNTL, R600_HDMI_INT_ACK, ~R600_HDMI_INT_ACK); | ||
2707 | } | ||
2708 | if (ASIC_IS_DCE3(rdev)) { | ||
2709 | if (RREG32(R600_HDMI_BLOCK3 + R600_HDMI_STATUS) & R600_HDMI_INT_PENDING) { | ||
2710 | WREG32_P(R600_HDMI_BLOCK3 + R600_HDMI_CNTL, R600_HDMI_INT_ACK, ~R600_HDMI_INT_ACK); | ||
2711 | } | ||
2712 | } else { | ||
2713 | if (RREG32(R600_HDMI_BLOCK2 + R600_HDMI_STATUS) & R600_HDMI_INT_PENDING) { | ||
2714 | WREG32_P(R600_HDMI_BLOCK2 + R600_HDMI_CNTL, R600_HDMI_INT_ACK, ~R600_HDMI_INT_ACK); | ||
2715 | } | ||
2716 | } | ||
2690 | } | 2717 | } |
2691 | 2718 | ||
2692 | void r600_irq_disable(struct radeon_device *rdev) | 2719 | void r600_irq_disable(struct radeon_device *rdev) |
@@ -2740,6 +2767,8 @@ static inline u32 r600_get_ih_wptr(struct radeon_device *rdev) | |||
2740 | * 19 1 FP Hot plug detection B | 2767 | * 19 1 FP Hot plug detection B |
2741 | * 19 2 DAC A auto-detection | 2768 | * 19 2 DAC A auto-detection |
2742 | * 19 3 DAC B auto-detection | 2769 | * 19 3 DAC B auto-detection |
2770 | * 21 4 HDMI block A | ||
2771 | * 21 5 HDMI block B | ||
2743 | * 176 - CP_INT RB | 2772 | * 176 - CP_INT RB |
2744 | * 177 - CP_INT IB1 | 2773 | * 177 - CP_INT IB1 |
2745 | * 178 - CP_INT IB2 | 2774 | * 178 - CP_INT IB2 |
@@ -2879,6 +2908,10 @@ restart_ih: | |||
2879 | break; | 2908 | break; |
2880 | } | 2909 | } |
2881 | break; | 2910 | break; |
2911 | case 21: /* HDMI */ | ||
2912 | DRM_DEBUG("IH: HDMI: 0x%x\n", src_data); | ||
2913 | r600_audio_schedule_polling(rdev); | ||
2914 | break; | ||
2882 | case 176: /* CP_INT in ring buffer */ | 2915 | case 176: /* CP_INT in ring buffer */ |
2883 | case 177: /* CP_INT in IB1 */ | 2916 | case 177: /* CP_INT in IB1 */ |
2884 | case 178: /* CP_INT in IB2 */ | 2917 | case 178: /* CP_INT in IB2 */ |
diff --git a/drivers/gpu/drm/radeon/r600_audio.c b/drivers/gpu/drm/radeon/r600_audio.c index ed8d3989f172..2b26553c352c 100644 --- a/drivers/gpu/drm/radeon/r600_audio.c +++ b/drivers/gpu/drm/radeon/r600_audio.c | |||
@@ -104,6 +104,15 @@ uint8_t r600_audio_category_code(struct radeon_device *rdev) | |||
104 | } | 104 | } |
105 | 105 | ||
106 | /* | 106 | /* |
107 | * schedule next audio update event | ||
108 | */ | ||
109 | void r600_audio_schedule_polling(struct radeon_device *rdev) | ||
110 | { | ||
111 | mod_timer(&rdev->audio_timer, | ||
112 | jiffies + msecs_to_jiffies(AUDIO_TIMER_INTERVALL)); | ||
113 | } | ||
114 | |||
115 | /* | ||
107 | * update all hdmi interfaces with current audio parameters | 116 | * update all hdmi interfaces with current audio parameters |
108 | */ | 117 | */ |
109 | static void r600_audio_update_hdmi(unsigned long param) | 118 | static void r600_audio_update_hdmi(unsigned long param) |
@@ -136,16 +145,12 @@ static void r600_audio_update_hdmi(unsigned long param) | |||
136 | 145 | ||
137 | list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) { | 146 | list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) { |
138 | struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); | 147 | struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); |
139 | if (radeon_encoder->audio_polling_active) { | 148 | still_going |= radeon_encoder->audio_polling_active; |
140 | still_going = 1; | 149 | if (changes || r600_hdmi_buffer_status_changed(encoder)) |
141 | if (changes || r600_hdmi_buffer_status_changed(encoder)) | 150 | r600_hdmi_update_audio_settings(encoder); |
142 | r600_hdmi_update_audio_settings(encoder); | ||
143 | } | ||
144 | } | 151 | } |
145 | 152 | ||
146 | if(still_going) | 153 | if(still_going) r600_audio_schedule_polling(rdev); |
147 | mod_timer(&rdev->audio_timer, | ||
148 | jiffies + msecs_to_jiffies(AUDIO_TIMER_INTERVALL)); | ||
149 | } | 154 | } |
150 | 155 | ||
151 | /* | 156 | /* |
diff --git a/drivers/gpu/drm/radeon/r600_hdmi.c b/drivers/gpu/drm/radeon/r600_hdmi.c index d014472d0d3f..40b1aca6d1f4 100644 --- a/drivers/gpu/drm/radeon/r600_hdmi.c +++ b/drivers/gpu/drm/radeon/r600_hdmi.c | |||
@@ -290,17 +290,15 @@ void r600_hdmi_audio_workaround(struct drm_encoder *encoder) | |||
290 | if (!offset) | 290 | if (!offset) |
291 | return; | 291 | return; |
292 | 292 | ||
293 | if (r600_hdmi_is_audio_buffer_filled(encoder)) { | 293 | if (!radeon_encoder->hdmi_audio_workaround || |
294 | /* disable audio workaround and start delivering of audio frames */ | 294 | r600_hdmi_is_audio_buffer_filled(encoder)) { |
295 | WREG32_P(offset+R600_HDMI_CNTL, 0x00000001, ~0x00001001); | ||
296 | 295 | ||
297 | } else if (radeon_encoder->hdmi_audio_workaround) { | 296 | /* disable audio workaround */ |
298 | /* enable audio workaround and start delivering of audio frames */ | 297 | WREG32_P(offset+R600_HDMI_CNTL, 0x00000001, ~0x00001001); |
299 | WREG32_P(offset+R600_HDMI_CNTL, 0x00001001, ~0x00001001); | ||
300 | 298 | ||
301 | } else { | 299 | } else { |
302 | /* disable audio workaround and stop delivering of audio frames */ | 300 | /* enable audio workaround */ |
303 | WREG32_P(offset+R600_HDMI_CNTL, 0x00000000, ~0x00001001); | 301 | WREG32_P(offset+R600_HDMI_CNTL, 0x00001001, ~0x00001001); |
304 | } | 302 | } |
305 | } | 303 | } |
306 | 304 | ||
@@ -345,9 +343,6 @@ void r600_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode *mod | |||
345 | 343 | ||
346 | /* audio packets per line, does anyone know how to calc this ? */ | 344 | /* audio packets per line, does anyone know how to calc this ? */ |
347 | WREG32_P(offset+R600_HDMI_CNTL, 0x00040000, ~0x001F0000); | 345 | WREG32_P(offset+R600_HDMI_CNTL, 0x00040000, ~0x001F0000); |
348 | |||
349 | /* update? reset? don't realy know */ | ||
350 | WREG32_P(offset+R600_HDMI_CNTL, 0x14000000, ~0x14000000); | ||
351 | } | 346 | } |
352 | 347 | ||
353 | /* | 348 | /* |
@@ -416,9 +411,6 @@ void r600_hdmi_update_audio_settings(struct drm_encoder *encoder) | |||
416 | r600_hdmi_audioinfoframe(encoder, channels-1, 0, 0, 0, 0, 0, 0, 0); | 411 | r600_hdmi_audioinfoframe(encoder, channels-1, 0, 0, 0, 0, 0, 0, 0); |
417 | 412 | ||
418 | r600_hdmi_audio_workaround(encoder); | 413 | r600_hdmi_audio_workaround(encoder); |
419 | |||
420 | /* update? reset? don't realy know */ | ||
421 | WREG32_P(offset+R600_HDMI_CNTL, 0x04000000, ~0x04000000); | ||
422 | } | 414 | } |
423 | 415 | ||
424 | static int r600_hdmi_find_free_block(struct drm_device *dev) | 416 | static int r600_hdmi_find_free_block(struct drm_device *dev) |
@@ -487,6 +479,7 @@ void r600_hdmi_enable(struct drm_encoder *encoder) | |||
487 | struct drm_device *dev = encoder->dev; | 479 | struct drm_device *dev = encoder->dev; |
488 | struct radeon_device *rdev = dev->dev_private; | 480 | struct radeon_device *rdev = dev->dev_private; |
489 | struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); | 481 | struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); |
482 | uint32_t offset; | ||
490 | 483 | ||
491 | if (ASIC_IS_DCE4(rdev)) | 484 | if (ASIC_IS_DCE4(rdev)) |
492 | return; | 485 | return; |
@@ -500,10 +493,10 @@ void r600_hdmi_enable(struct drm_encoder *encoder) | |||
500 | } | 493 | } |
501 | } | 494 | } |
502 | 495 | ||
496 | offset = radeon_encoder->hdmi_offset; | ||
503 | if (ASIC_IS_DCE32(rdev) && !ASIC_IS_DCE4(rdev)) { | 497 | if (ASIC_IS_DCE32(rdev) && !ASIC_IS_DCE4(rdev)) { |
504 | WREG32_P(radeon_encoder->hdmi_config_offset + 0x4, 0x1, ~0x1); | 498 | WREG32_P(radeon_encoder->hdmi_config_offset + 0x4, 0x1, ~0x1); |
505 | } else if (rdev->family >= CHIP_R600 && !ASIC_IS_DCE3(rdev)) { | 499 | } else if (rdev->family >= CHIP_R600 && !ASIC_IS_DCE3(rdev)) { |
506 | int offset = radeon_encoder->hdmi_offset; | ||
507 | switch (radeon_encoder->encoder_id) { | 500 | switch (radeon_encoder->encoder_id) { |
508 | case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_TMDS1: | 501 | case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_TMDS1: |
509 | WREG32_P(AVIVO_TMDSA_CNTL, 0x4, ~0x4); | 502 | WREG32_P(AVIVO_TMDSA_CNTL, 0x4, ~0x4); |
@@ -519,7 +512,20 @@ void r600_hdmi_enable(struct drm_encoder *encoder) | |||
519 | } | 512 | } |
520 | } | 513 | } |
521 | 514 | ||
522 | r600_audio_enable_polling(encoder); | 515 | if (rdev->irq.installed |
516 | && rdev->family != CHIP_RS600 | ||
517 | && rdev->family != CHIP_RS690 | ||
518 | && rdev->family != CHIP_RS740) { | ||
519 | |||
520 | /* if irq is available use it */ | ||
521 | rdev->irq.hdmi[offset == R600_HDMI_BLOCK1 ? 0 : 1] = true; | ||
522 | radeon_irq_set(rdev); | ||
523 | |||
524 | r600_audio_disable_polling(encoder); | ||
525 | } else { | ||
526 | /* if not fallback to polling */ | ||
527 | r600_audio_enable_polling(encoder); | ||
528 | } | ||
523 | 529 | ||
524 | DRM_DEBUG("Enabling HDMI interface @ 0x%04X for encoder 0x%x\n", | 530 | DRM_DEBUG("Enabling HDMI interface @ 0x%04X for encoder 0x%x\n", |
525 | radeon_encoder->hdmi_offset, radeon_encoder->encoder_id); | 531 | radeon_encoder->hdmi_offset, radeon_encoder->encoder_id); |
@@ -533,24 +539,30 @@ void r600_hdmi_disable(struct drm_encoder *encoder) | |||
533 | struct drm_device *dev = encoder->dev; | 539 | struct drm_device *dev = encoder->dev; |
534 | struct radeon_device *rdev = dev->dev_private; | 540 | struct radeon_device *rdev = dev->dev_private; |
535 | struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); | 541 | struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); |
542 | uint8_t offset; | ||
536 | 543 | ||
537 | if (ASIC_IS_DCE4(rdev)) | 544 | if (ASIC_IS_DCE4(rdev)) |
538 | return; | 545 | return; |
539 | 546 | ||
540 | if (!radeon_encoder->hdmi_offset) { | 547 | offset = radeon_encoder->hdmi_offset; |
548 | if (!offset) { | ||
541 | dev_err(rdev->dev, "Disabling not enabled HDMI\n"); | 549 | dev_err(rdev->dev, "Disabling not enabled HDMI\n"); |
542 | return; | 550 | return; |
543 | } | 551 | } |
544 | 552 | ||
545 | r600_audio_disable_polling(encoder); | ||
546 | |||
547 | DRM_DEBUG("Disabling HDMI interface @ 0x%04X for encoder 0x%x\n", | 553 | DRM_DEBUG("Disabling HDMI interface @ 0x%04X for encoder 0x%x\n", |
548 | radeon_encoder->hdmi_offset, radeon_encoder->encoder_id); | 554 | offset, radeon_encoder->encoder_id); |
555 | |||
556 | /* disable irq */ | ||
557 | rdev->irq.hdmi[offset == R600_HDMI_BLOCK1 ? 0 : 1] = false; | ||
558 | radeon_irq_set(rdev); | ||
559 | |||
560 | /* disable polling */ | ||
561 | r600_audio_disable_polling(encoder); | ||
549 | 562 | ||
550 | if (ASIC_IS_DCE32(rdev) && !ASIC_IS_DCE4(rdev)) { | 563 | if (ASIC_IS_DCE32(rdev) && !ASIC_IS_DCE4(rdev)) { |
551 | WREG32_P(radeon_encoder->hdmi_config_offset + 0x4, 0, ~0x1); | 564 | WREG32_P(radeon_encoder->hdmi_config_offset + 0x4, 0, ~0x1); |
552 | } else if (rdev->family >= CHIP_R600 && !ASIC_IS_DCE3(rdev)) { | 565 | } else if (rdev->family >= CHIP_R600 && !ASIC_IS_DCE3(rdev)) { |
553 | int offset = radeon_encoder->hdmi_offset; | ||
554 | switch (radeon_encoder->encoder_id) { | 566 | switch (radeon_encoder->encoder_id) { |
555 | case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_TMDS1: | 567 | case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_TMDS1: |
556 | WREG32_P(AVIVO_TMDSA_CNTL, 0, ~0x4); | 568 | WREG32_P(AVIVO_TMDSA_CNTL, 0, ~0x4); |
diff --git a/drivers/gpu/drm/radeon/r600_reg.h b/drivers/gpu/drm/radeon/r600_reg.h index 7b1d22370f6e..d84612ae47e0 100644 --- a/drivers/gpu/drm/radeon/r600_reg.h +++ b/drivers/gpu/drm/radeon/r600_reg.h | |||
@@ -157,33 +157,36 @@ | |||
157 | #define R600_HDMI_BLOCK3 0x7800 | 157 | #define R600_HDMI_BLOCK3 0x7800 |
158 | 158 | ||
159 | /* HDMI registers */ | 159 | /* HDMI registers */ |
160 | #define R600_HDMI_ENABLE 0x00 | 160 | #define R600_HDMI_ENABLE 0x00 |
161 | #define R600_HDMI_STATUS 0x04 | 161 | #define R600_HDMI_STATUS 0x04 |
162 | #define R600_HDMI_CNTL 0x08 | 162 | # define R600_HDMI_INT_PENDING (1 << 29) |
163 | #define R600_HDMI_UNKNOWN_0 0x0C | 163 | #define R600_HDMI_CNTL 0x08 |
164 | #define R600_HDMI_AUDIOCNTL 0x10 | 164 | # define R600_HDMI_INT_EN (1 << 28) |
165 | #define R600_HDMI_VIDEOCNTL 0x14 | 165 | # define R600_HDMI_INT_ACK (1 << 29) |
166 | #define R600_HDMI_VERSION 0x18 | 166 | #define R600_HDMI_UNKNOWN_0 0x0C |
167 | #define R600_HDMI_UNKNOWN_1 0x28 | 167 | #define R600_HDMI_AUDIOCNTL 0x10 |
168 | #define R600_HDMI_VIDEOINFOFRAME_0 0x54 | 168 | #define R600_HDMI_VIDEOCNTL 0x14 |
169 | #define R600_HDMI_VIDEOINFOFRAME_1 0x58 | 169 | #define R600_HDMI_VERSION 0x18 |
170 | #define R600_HDMI_VIDEOINFOFRAME_2 0x5c | 170 | #define R600_HDMI_UNKNOWN_1 0x28 |
171 | #define R600_HDMI_VIDEOINFOFRAME_3 0x60 | 171 | #define R600_HDMI_VIDEOINFOFRAME_0 0x54 |
172 | #define R600_HDMI_32kHz_CTS 0xac | 172 | #define R600_HDMI_VIDEOINFOFRAME_1 0x58 |
173 | #define R600_HDMI_32kHz_N 0xb0 | 173 | #define R600_HDMI_VIDEOINFOFRAME_2 0x5c |
174 | #define R600_HDMI_44_1kHz_CTS 0xb4 | 174 | #define R600_HDMI_VIDEOINFOFRAME_3 0x60 |
175 | #define R600_HDMI_44_1kHz_N 0xb8 | 175 | #define R600_HDMI_32kHz_CTS 0xac |
176 | #define R600_HDMI_48kHz_CTS 0xbc | 176 | #define R600_HDMI_32kHz_N 0xb0 |
177 | #define R600_HDMI_48kHz_N 0xc0 | 177 | #define R600_HDMI_44_1kHz_CTS 0xb4 |
178 | #define R600_HDMI_AUDIOINFOFRAME_0 0xcc | 178 | #define R600_HDMI_44_1kHz_N 0xb8 |
179 | #define R600_HDMI_AUDIOINFOFRAME_1 0xd0 | 179 | #define R600_HDMI_48kHz_CTS 0xbc |
180 | #define R600_HDMI_IEC60958_1 0xd4 | 180 | #define R600_HDMI_48kHz_N 0xc0 |
181 | #define R600_HDMI_IEC60958_2 0xd8 | 181 | #define R600_HDMI_AUDIOINFOFRAME_0 0xcc |
182 | #define R600_HDMI_UNKNOWN_2 0xdc | 182 | #define R600_HDMI_AUDIOINFOFRAME_1 0xd0 |
183 | #define R600_HDMI_AUDIO_DEBUG_0 0xe0 | 183 | #define R600_HDMI_IEC60958_1 0xd4 |
184 | #define R600_HDMI_AUDIO_DEBUG_1 0xe4 | 184 | #define R600_HDMI_IEC60958_2 0xd8 |
185 | #define R600_HDMI_AUDIO_DEBUG_2 0xe8 | 185 | #define R600_HDMI_UNKNOWN_2 0xdc |
186 | #define R600_HDMI_AUDIO_DEBUG_3 0xec | 186 | #define R600_HDMI_AUDIO_DEBUG_0 0xe0 |
187 | #define R600_HDMI_AUDIO_DEBUG_1 0xe4 | ||
188 | #define R600_HDMI_AUDIO_DEBUG_2 0xe8 | ||
189 | #define R600_HDMI_AUDIO_DEBUG_3 0xec | ||
187 | 190 | ||
188 | /* HDMI additional config base register addresses */ | 191 | /* HDMI additional config base register addresses */ |
189 | #define R600_HDMI_CONFIG1 0x7600 | 192 | #define R600_HDMI_CONFIG1 0x7600 |
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index 42217af58145..ab29d972a167 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h | |||
@@ -376,6 +376,8 @@ struct radeon_irq { | |||
376 | wait_queue_head_t vblank_queue; | 376 | wait_queue_head_t vblank_queue; |
377 | /* FIXME: use defines for max hpd/dacs */ | 377 | /* FIXME: use defines for max hpd/dacs */ |
378 | bool hpd[6]; | 378 | bool hpd[6]; |
379 | /* FIXME: use defines for max HDMI blocks */ | ||
380 | bool hdmi[2]; | ||
379 | spinlock_t sw_lock; | 381 | spinlock_t sw_lock; |
380 | int sw_refcount; | 382 | int sw_refcount; |
381 | }; | 383 | }; |
@@ -1332,6 +1334,7 @@ extern int r600_audio_bits_per_sample(struct radeon_device *rdev); | |||
1332 | extern int r600_audio_rate(struct radeon_device *rdev); | 1334 | extern int r600_audio_rate(struct radeon_device *rdev); |
1333 | extern uint8_t r600_audio_status_bits(struct radeon_device *rdev); | 1335 | extern uint8_t r600_audio_status_bits(struct radeon_device *rdev); |
1334 | extern uint8_t r600_audio_category_code(struct radeon_device *rdev); | 1336 | extern uint8_t r600_audio_category_code(struct radeon_device *rdev); |
1337 | extern void r600_audio_schedule_polling(struct radeon_device *rdev); | ||
1335 | extern void r600_audio_enable_polling(struct drm_encoder *encoder); | 1338 | extern void r600_audio_enable_polling(struct drm_encoder *encoder); |
1336 | extern void r600_audio_disable_polling(struct drm_encoder *encoder); | 1339 | extern void r600_audio_disable_polling(struct drm_encoder *encoder); |
1337 | extern void r600_audio_fini(struct radeon_device *rdev); | 1340 | extern void r600_audio_fini(struct radeon_device *rdev); |