diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2013-04-18 11:32:16 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2013-04-23 18:03:53 -0400 |
commit | a973bea11c91bf8283cc13eb17d3ef7086f679d6 (patch) | |
tree | 8f406b2083834344788d539c0b8c9498c64da544 /drivers/gpu | |
parent | b1f6f47e3e33c4a74534f1301aca241ffabbb3a0 (diff) |
drm/radeon: switch audio handling to use callbacks
Register audio callbacks for asic where we support
audio. Cleans up the code and makes it easier to
add support for newer asics.
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/radeon/atombios_encoders.c | 17 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/evergreen_hdmi.c | 17 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/r600_hdmi.c | 109 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon.h | 10 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_asic.c | 18 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_asic.h | 4 |
6 files changed, 87 insertions, 88 deletions
diff --git a/drivers/gpu/drm/radeon/atombios_encoders.c b/drivers/gpu/drm/radeon/atombios_encoders.c index 4552d4aff317..44a7da66e081 100644 --- a/drivers/gpu/drm/radeon/atombios_encoders.c +++ b/drivers/gpu/drm/radeon/atombios_encoders.c | |||
@@ -2150,13 +2150,10 @@ radeon_atom_encoder_mode_set(struct drm_encoder *encoder, | |||
2150 | atombios_apply_encoder_quirks(encoder, adjusted_mode); | 2150 | atombios_apply_encoder_quirks(encoder, adjusted_mode); |
2151 | 2151 | ||
2152 | if (atombios_get_encoder_mode(encoder) == ATOM_ENCODER_MODE_HDMI) { | 2152 | if (atombios_get_encoder_mode(encoder) == ATOM_ENCODER_MODE_HDMI) { |
2153 | r600_hdmi_enable(encoder); | 2153 | if (rdev->asic->display.hdmi_enable) |
2154 | if (ASIC_IS_DCE6(rdev)) | 2154 | radeon_hdmi_enable(rdev, encoder, true); |
2155 | ; /* TODO (use pointers instead of if-s?) */ | 2155 | if (rdev->asic->display.hdmi_setmode) |
2156 | else if (ASIC_IS_DCE4(rdev)) | 2156 | radeon_hdmi_setmode(rdev, encoder, adjusted_mode); |
2157 | evergreen_hdmi_setmode(encoder, adjusted_mode); | ||
2158 | else | ||
2159 | r600_hdmi_setmode(encoder, adjusted_mode); | ||
2160 | } | 2157 | } |
2161 | } | 2158 | } |
2162 | 2159 | ||
@@ -2413,8 +2410,10 @@ static void radeon_atom_encoder_disable(struct drm_encoder *encoder) | |||
2413 | 2410 | ||
2414 | disable_done: | 2411 | disable_done: |
2415 | if (radeon_encoder_is_digital(encoder)) { | 2412 | if (radeon_encoder_is_digital(encoder)) { |
2416 | if (atombios_get_encoder_mode(encoder) == ATOM_ENCODER_MODE_HDMI) | 2413 | if (atombios_get_encoder_mode(encoder) == ATOM_ENCODER_MODE_HDMI) { |
2417 | r600_hdmi_disable(encoder); | 2414 | if (rdev->asic->display.hdmi_enable) |
2415 | radeon_hdmi_enable(rdev, encoder, false); | ||
2416 | } | ||
2418 | dig = radeon_encoder->enc_priv; | 2417 | dig = radeon_encoder->enc_priv; |
2419 | dig->dig_encoder = -1; | 2418 | dig->dig_encoder = -1; |
2420 | } | 2419 | } |
diff --git a/drivers/gpu/drm/radeon/evergreen_hdmi.c b/drivers/gpu/drm/radeon/evergreen_hdmi.c index 9fc22ee40f96..e32fd2cbc368 100644 --- a/drivers/gpu/drm/radeon/evergreen_hdmi.c +++ b/drivers/gpu/drm/radeon/evergreen_hdmi.c | |||
@@ -219,3 +219,20 @@ void evergreen_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode | |||
219 | WREG32(AFMT_RAMP_CONTROL2 + offset, 0x00000001); | 219 | WREG32(AFMT_RAMP_CONTROL2 + offset, 0x00000001); |
220 | WREG32(AFMT_RAMP_CONTROL3 + offset, 0x00000001); | 220 | WREG32(AFMT_RAMP_CONTROL3 + offset, 0x00000001); |
221 | } | 221 | } |
222 | |||
223 | void evergreen_hdmi_enable(struct drm_encoder *encoder, bool enable) | ||
224 | { | ||
225 | struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); | ||
226 | struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; | ||
227 | |||
228 | /* Silent, r600_hdmi_enable will raise WARN for us */ | ||
229 | if (enable && dig->afmt->enabled) | ||
230 | return; | ||
231 | if (!enable && !dig->afmt->enabled) | ||
232 | return; | ||
233 | |||
234 | dig->afmt->enabled = enable; | ||
235 | |||
236 | DRM_DEBUG("%sabling HDMI interface @ 0x%04X for encoder 0x%x\n", | ||
237 | enable ? "En" : "Dis", dig->afmt->offset, radeon_encoder->encoder_id); | ||
238 | } | ||
diff --git a/drivers/gpu/drm/radeon/r600_hdmi.c b/drivers/gpu/drm/radeon/r600_hdmi.c index 62721bfabe77..2e15888d8307 100644 --- a/drivers/gpu/drm/radeon/r600_hdmi.c +++ b/drivers/gpu/drm/radeon/r600_hdmi.c | |||
@@ -439,112 +439,73 @@ void r600_hdmi_update_audio_settings(struct drm_encoder *encoder) | |||
439 | /* | 439 | /* |
440 | * enable the HDMI engine | 440 | * enable the HDMI engine |
441 | */ | 441 | */ |
442 | void r600_hdmi_enable(struct drm_encoder *encoder) | 442 | void r600_hdmi_enable(struct drm_encoder *encoder, bool enable) |
443 | { | 443 | { |
444 | struct drm_device *dev = encoder->dev; | 444 | struct drm_device *dev = encoder->dev; |
445 | struct radeon_device *rdev = dev->dev_private; | 445 | struct radeon_device *rdev = dev->dev_private; |
446 | struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); | 446 | struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); |
447 | struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; | 447 | struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; |
448 | uint32_t offset; | 448 | u32 hdmi = HDMI0_ERROR_ACK; |
449 | u32 hdmi; | ||
450 | |||
451 | if (ASIC_IS_DCE6(rdev)) | ||
452 | return; | ||
453 | 449 | ||
454 | /* Silent, r600_hdmi_enable will raise WARN for us */ | 450 | /* Silent, r600_hdmi_enable will raise WARN for us */ |
455 | if (dig->afmt->enabled) | 451 | if (enable && dig->afmt->enabled) |
452 | return; | ||
453 | if (!enable && !dig->afmt->enabled) | ||
456 | return; | 454 | return; |
457 | offset = dig->afmt->offset; | ||
458 | 455 | ||
459 | /* Older chipsets require setting HDMI and routing manually */ | 456 | /* Older chipsets require setting HDMI and routing manually */ |
460 | if (ASIC_IS_DCE2(rdev) && !ASIC_IS_DCE3(rdev)) { | 457 | if (!ASIC_IS_DCE3(rdev)) { |
461 | hdmi = HDMI0_ERROR_ACK | HDMI0_ENABLE; | 458 | if (enable) |
459 | hdmi |= HDMI0_ENABLE; | ||
462 | switch (radeon_encoder->encoder_id) { | 460 | switch (radeon_encoder->encoder_id) { |
463 | case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_TMDS1: | 461 | case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_TMDS1: |
464 | WREG32_OR(AVIVO_TMDSA_CNTL, AVIVO_TMDSA_CNTL_HDMI_EN); | 462 | if (enable) { |
465 | hdmi |= HDMI0_STREAM(HDMI0_STREAM_TMDSA); | 463 | WREG32_OR(AVIVO_TMDSA_CNTL, AVIVO_TMDSA_CNTL_HDMI_EN); |
464 | hdmi |= HDMI0_STREAM(HDMI0_STREAM_TMDSA); | ||
465 | } else { | ||
466 | WREG32_AND(AVIVO_TMDSA_CNTL, ~AVIVO_TMDSA_CNTL_HDMI_EN); | ||
467 | } | ||
466 | break; | 468 | break; |
467 | case ENCODER_OBJECT_ID_INTERNAL_LVTM1: | 469 | case ENCODER_OBJECT_ID_INTERNAL_LVTM1: |
468 | WREG32_OR(AVIVO_LVTMA_CNTL, AVIVO_LVTMA_CNTL_HDMI_EN); | 470 | if (enable) { |
469 | hdmi |= HDMI0_STREAM(HDMI0_STREAM_LVTMA); | 471 | WREG32_OR(AVIVO_LVTMA_CNTL, AVIVO_LVTMA_CNTL_HDMI_EN); |
472 | hdmi |= HDMI0_STREAM(HDMI0_STREAM_LVTMA); | ||
473 | } else { | ||
474 | WREG32_AND(AVIVO_LVTMA_CNTL, ~AVIVO_LVTMA_CNTL_HDMI_EN); | ||
475 | } | ||
470 | break; | 476 | break; |
471 | case ENCODER_OBJECT_ID_INTERNAL_DDI: | 477 | case ENCODER_OBJECT_ID_INTERNAL_DDI: |
472 | WREG32_OR(DDIA_CNTL, DDIA_HDMI_EN); | 478 | if (enable) { |
473 | hdmi |= HDMI0_STREAM(HDMI0_STREAM_DDIA); | 479 | WREG32_OR(DDIA_CNTL, DDIA_HDMI_EN); |
480 | hdmi |= HDMI0_STREAM(HDMI0_STREAM_DDIA); | ||
481 | } else { | ||
482 | WREG32_AND(DDIA_CNTL, ~DDIA_HDMI_EN); | ||
483 | } | ||
474 | break; | 484 | break; |
475 | case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DVO1: | 485 | case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DVO1: |
476 | hdmi |= HDMI0_STREAM(HDMI0_STREAM_DVOA); | 486 | if (enable) |
487 | hdmi |= HDMI0_STREAM(HDMI0_STREAM_DVOA); | ||
477 | break; | 488 | break; |
478 | default: | 489 | default: |
479 | dev_err(rdev->dev, "Invalid encoder for HDMI: 0x%X\n", | 490 | dev_err(rdev->dev, "Invalid encoder for HDMI: 0x%X\n", |
480 | radeon_encoder->encoder_id); | 491 | radeon_encoder->encoder_id); |
481 | break; | 492 | break; |
482 | } | 493 | } |
483 | WREG32(HDMI0_CONTROL + offset, hdmi); | 494 | WREG32(HDMI0_CONTROL + dig->afmt->offset, hdmi); |
484 | } | 495 | } |
485 | 496 | ||
486 | if (rdev->irq.installed) { | 497 | if (rdev->irq.installed) { |
487 | /* if irq is available use it */ | 498 | /* if irq is available use it */ |
488 | /* XXX: shouldn't need this on any asics. Double check DCE2/3 */ | 499 | /* XXX: shouldn't need this on any asics. Double check DCE2/3 */ |
489 | if (!ASIC_IS_DCE4(rdev)) | 500 | if (enable) |
490 | radeon_irq_kms_enable_afmt(rdev, dig->afmt->id); | 501 | radeon_irq_kms_enable_afmt(rdev, dig->afmt->id); |
502 | else | ||
503 | radeon_irq_kms_disable_afmt(rdev, dig->afmt->id); | ||
491 | } | 504 | } |
492 | 505 | ||
493 | dig->afmt->enabled = true; | 506 | dig->afmt->enabled = enable; |
494 | 507 | ||
495 | DRM_DEBUG("Enabling HDMI interface @ 0x%04X for encoder 0x%x\n", | 508 | DRM_DEBUG("%sabling HDMI interface @ 0x%04X for encoder 0x%x\n", |
496 | offset, radeon_encoder->encoder_id); | 509 | enable ? "En" : "Dis", dig->afmt->offset, radeon_encoder->encoder_id); |
497 | } | 510 | } |
498 | 511 | ||
499 | /* | ||
500 | * disable the HDMI engine | ||
501 | */ | ||
502 | void r600_hdmi_disable(struct drm_encoder *encoder) | ||
503 | { | ||
504 | struct drm_device *dev = encoder->dev; | ||
505 | struct radeon_device *rdev = dev->dev_private; | ||
506 | struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); | ||
507 | struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv; | ||
508 | uint32_t offset; | ||
509 | |||
510 | if (ASIC_IS_DCE6(rdev)) | ||
511 | return; | ||
512 | |||
513 | /* Called for ATOM_ENCODER_MODE_HDMI only */ | ||
514 | if (!dig || !dig->afmt) { | ||
515 | return; | ||
516 | } | ||
517 | if (!dig->afmt->enabled) | ||
518 | return; | ||
519 | offset = dig->afmt->offset; | ||
520 | |||
521 | DRM_DEBUG("Disabling HDMI interface @ 0x%04X for encoder 0x%x\n", | ||
522 | offset, radeon_encoder->encoder_id); | ||
523 | |||
524 | /* disable irq */ | ||
525 | radeon_irq_kms_disable_afmt(rdev, dig->afmt->id); | ||
526 | |||
527 | /* Older chipsets not handled by AtomBIOS */ | ||
528 | if (ASIC_IS_DCE2(rdev) && !ASIC_IS_DCE3(rdev)) { | ||
529 | switch (radeon_encoder->encoder_id) { | ||
530 | case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_TMDS1: | ||
531 | WREG32_AND(AVIVO_TMDSA_CNTL, ~AVIVO_TMDSA_CNTL_HDMI_EN); | ||
532 | break; | ||
533 | case ENCODER_OBJECT_ID_INTERNAL_LVTM1: | ||
534 | WREG32_AND(AVIVO_LVTMA_CNTL, ~AVIVO_LVTMA_CNTL_HDMI_EN); | ||
535 | break; | ||
536 | case ENCODER_OBJECT_ID_INTERNAL_DDI: | ||
537 | WREG32_AND(DDIA_CNTL, ~DDIA_HDMI_EN); | ||
538 | break; | ||
539 | case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_DVO1: | ||
540 | break; | ||
541 | default: | ||
542 | dev_err(rdev->dev, "Invalid encoder for HDMI: 0x%X\n", | ||
543 | radeon_encoder->encoder_id); | ||
544 | break; | ||
545 | } | ||
546 | WREG32(HDMI0_CONTROL + offset, HDMI0_ERROR_ACK); | ||
547 | } | ||
548 | |||
549 | dig->afmt->enabled = false; | ||
550 | } | ||
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index 7935370f01af..856a67d5bd9b 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h | |||
@@ -1270,6 +1270,9 @@ struct radeon_asic { | |||
1270 | void (*set_backlight_level)(struct radeon_encoder *radeon_encoder, u8 level); | 1270 | void (*set_backlight_level)(struct radeon_encoder *radeon_encoder, u8 level); |
1271 | /* get backlight level */ | 1271 | /* get backlight level */ |
1272 | u8 (*get_backlight_level)(struct radeon_encoder *radeon_encoder); | 1272 | u8 (*get_backlight_level)(struct radeon_encoder *radeon_encoder); |
1273 | /* audio callbacks */ | ||
1274 | void (*hdmi_enable)(struct drm_encoder *encoder, bool enable); | ||
1275 | void (*hdmi_setmode)(struct drm_encoder *encoder, struct drm_display_mode *mode); | ||
1273 | } display; | 1276 | } display; |
1274 | /* copy functions for bo handling */ | 1277 | /* copy functions for bo handling */ |
1275 | struct { | 1278 | struct { |
@@ -1878,6 +1881,8 @@ void radeon_ring_write(struct radeon_ring *ring, uint32_t v); | |||
1878 | #define radeon_get_vblank_counter(rdev, crtc) (rdev)->asic->display.get_vblank_counter((rdev), (crtc)) | 1881 | #define radeon_get_vblank_counter(rdev, crtc) (rdev)->asic->display.get_vblank_counter((rdev), (crtc)) |
1879 | #define radeon_set_backlight_level(rdev, e, l) (rdev)->asic->display.set_backlight_level((e), (l)) | 1882 | #define radeon_set_backlight_level(rdev, e, l) (rdev)->asic->display.set_backlight_level((e), (l)) |
1880 | #define radeon_get_backlight_level(rdev, e) (rdev)->asic->display.get_backlight_level((e)) | 1883 | #define radeon_get_backlight_level(rdev, e) (rdev)->asic->display.get_backlight_level((e)) |
1884 | #define radeon_hdmi_enable(rdev, e, b) (rdev)->asic->display.hdmi_enable((e), (b)) | ||
1885 | #define radeon_hdmi_setmode(rdev, e, m) (rdev)->asic->display.hdmi_setmode((e), (m)) | ||
1881 | #define radeon_fence_ring_emit(rdev, r, fence) (rdev)->asic->ring[(r)].emit_fence((rdev), (fence)) | 1886 | #define radeon_fence_ring_emit(rdev, r, fence) (rdev)->asic->ring[(r)].emit_fence((rdev), (fence)) |
1882 | #define radeon_semaphore_ring_emit(rdev, r, cp, semaphore, emit_wait) (rdev)->asic->ring[(r)].emit_semaphore((rdev), (cp), (semaphore), (emit_wait)) | 1887 | #define radeon_semaphore_ring_emit(rdev, r, cp, semaphore, emit_wait) (rdev)->asic->ring[(r)].emit_semaphore((rdev), (cp), (semaphore), (emit_wait)) |
1883 | #define radeon_copy_blit(rdev, s, d, np, f) (rdev)->asic->copy.blit((rdev), (s), (d), (np), (f)) | 1888 | #define radeon_copy_blit(rdev, s, d, np, f) (rdev)->asic->copy.blit((rdev), (s), (d), (np), (f)) |
@@ -2013,9 +2018,6 @@ struct radeon_hdmi_acr { | |||
2013 | 2018 | ||
2014 | extern struct radeon_hdmi_acr r600_hdmi_acr(uint32_t clock); | 2019 | extern struct radeon_hdmi_acr r600_hdmi_acr(uint32_t clock); |
2015 | 2020 | ||
2016 | extern void r600_hdmi_enable(struct drm_encoder *encoder); | ||
2017 | extern void r600_hdmi_disable(struct drm_encoder *encoder); | ||
2018 | extern void r600_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode *mode); | ||
2019 | extern u32 r6xx_remap_render_backend(struct radeon_device *rdev, | 2021 | extern u32 r6xx_remap_render_backend(struct radeon_device *rdev, |
2020 | u32 tiling_pipe_num, | 2022 | u32 tiling_pipe_num, |
2021 | u32 max_rb_num, | 2023 | u32 max_rb_num, |
@@ -2026,8 +2028,6 @@ extern u32 r6xx_remap_render_backend(struct radeon_device *rdev, | |||
2026 | * evergreen functions used by radeon_encoder.c | 2028 | * evergreen functions used by radeon_encoder.c |
2027 | */ | 2029 | */ |
2028 | 2030 | ||
2029 | extern void evergreen_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode *mode); | ||
2030 | |||
2031 | extern int ni_init_microcode(struct radeon_device *rdev); | 2031 | extern int ni_init_microcode(struct radeon_device *rdev); |
2032 | extern int ni_mc_load_microcode(struct radeon_device *rdev); | 2032 | extern int ni_mc_load_microcode(struct radeon_device *rdev); |
2033 | 2033 | ||
diff --git a/drivers/gpu/drm/radeon/radeon_asic.c b/drivers/gpu/drm/radeon/radeon_asic.c index 48d020057100..6417132c50cf 100644 --- a/drivers/gpu/drm/radeon/radeon_asic.c +++ b/drivers/gpu/drm/radeon/radeon_asic.c | |||
@@ -656,6 +656,8 @@ static struct radeon_asic rs600_asic = { | |||
656 | .wait_for_vblank = &avivo_wait_for_vblank, | 656 | .wait_for_vblank = &avivo_wait_for_vblank, |
657 | .set_backlight_level = &atombios_set_backlight_level, | 657 | .set_backlight_level = &atombios_set_backlight_level, |
658 | .get_backlight_level = &atombios_get_backlight_level, | 658 | .get_backlight_level = &atombios_get_backlight_level, |
659 | .hdmi_enable = &r600_hdmi_enable, | ||
660 | .hdmi_setmode = &r600_hdmi_setmode, | ||
659 | }, | 661 | }, |
660 | .copy = { | 662 | .copy = { |
661 | .blit = &r100_copy_blit, | 663 | .blit = &r100_copy_blit, |
@@ -732,6 +734,8 @@ static struct radeon_asic rs690_asic = { | |||
732 | .wait_for_vblank = &avivo_wait_for_vblank, | 734 | .wait_for_vblank = &avivo_wait_for_vblank, |
733 | .set_backlight_level = &atombios_set_backlight_level, | 735 | .set_backlight_level = &atombios_set_backlight_level, |
734 | .get_backlight_level = &atombios_get_backlight_level, | 736 | .get_backlight_level = &atombios_get_backlight_level, |
737 | .hdmi_enable = &r600_hdmi_enable, | ||
738 | .hdmi_setmode = &r600_hdmi_setmode, | ||
735 | }, | 739 | }, |
736 | .copy = { | 740 | .copy = { |
737 | .blit = &r100_copy_blit, | 741 | .blit = &r100_copy_blit, |
@@ -970,6 +974,8 @@ static struct radeon_asic r600_asic = { | |||
970 | .wait_for_vblank = &avivo_wait_for_vblank, | 974 | .wait_for_vblank = &avivo_wait_for_vblank, |
971 | .set_backlight_level = &atombios_set_backlight_level, | 975 | .set_backlight_level = &atombios_set_backlight_level, |
972 | .get_backlight_level = &atombios_get_backlight_level, | 976 | .get_backlight_level = &atombios_get_backlight_level, |
977 | .hdmi_enable = &r600_hdmi_enable, | ||
978 | .hdmi_setmode = &r600_hdmi_setmode, | ||
973 | }, | 979 | }, |
974 | .copy = { | 980 | .copy = { |
975 | .blit = &r600_copy_blit, | 981 | .blit = &r600_copy_blit, |
@@ -1056,6 +1062,8 @@ static struct radeon_asic rs780_asic = { | |||
1056 | .wait_for_vblank = &avivo_wait_for_vblank, | 1062 | .wait_for_vblank = &avivo_wait_for_vblank, |
1057 | .set_backlight_level = &atombios_set_backlight_level, | 1063 | .set_backlight_level = &atombios_set_backlight_level, |
1058 | .get_backlight_level = &atombios_get_backlight_level, | 1064 | .get_backlight_level = &atombios_get_backlight_level, |
1065 | .hdmi_enable = &r600_hdmi_enable, | ||
1066 | .hdmi_setmode = &r600_hdmi_setmode, | ||
1059 | }, | 1067 | }, |
1060 | .copy = { | 1068 | .copy = { |
1061 | .blit = &r600_copy_blit, | 1069 | .blit = &r600_copy_blit, |
@@ -1151,6 +1159,8 @@ static struct radeon_asic rv770_asic = { | |||
1151 | .wait_for_vblank = &avivo_wait_for_vblank, | 1159 | .wait_for_vblank = &avivo_wait_for_vblank, |
1152 | .set_backlight_level = &atombios_set_backlight_level, | 1160 | .set_backlight_level = &atombios_set_backlight_level, |
1153 | .get_backlight_level = &atombios_get_backlight_level, | 1161 | .get_backlight_level = &atombios_get_backlight_level, |
1162 | .hdmi_enable = &r600_hdmi_enable, | ||
1163 | .hdmi_setmode = &r600_hdmi_setmode, | ||
1154 | }, | 1164 | }, |
1155 | .copy = { | 1165 | .copy = { |
1156 | .blit = &r600_copy_blit, | 1166 | .blit = &r600_copy_blit, |
@@ -1247,6 +1257,8 @@ static struct radeon_asic evergreen_asic = { | |||
1247 | .wait_for_vblank = &dce4_wait_for_vblank, | 1257 | .wait_for_vblank = &dce4_wait_for_vblank, |
1248 | .set_backlight_level = &atombios_set_backlight_level, | 1258 | .set_backlight_level = &atombios_set_backlight_level, |
1249 | .get_backlight_level = &atombios_get_backlight_level, | 1259 | .get_backlight_level = &atombios_get_backlight_level, |
1260 | .hdmi_enable = &evergreen_hdmi_enable, | ||
1261 | .hdmi_setmode = &evergreen_hdmi_setmode, | ||
1250 | }, | 1262 | }, |
1251 | .copy = { | 1263 | .copy = { |
1252 | .blit = &r600_copy_blit, | 1264 | .blit = &r600_copy_blit, |
@@ -1343,6 +1355,8 @@ static struct radeon_asic sumo_asic = { | |||
1343 | .wait_for_vblank = &dce4_wait_for_vblank, | 1355 | .wait_for_vblank = &dce4_wait_for_vblank, |
1344 | .set_backlight_level = &atombios_set_backlight_level, | 1356 | .set_backlight_level = &atombios_set_backlight_level, |
1345 | .get_backlight_level = &atombios_get_backlight_level, | 1357 | .get_backlight_level = &atombios_get_backlight_level, |
1358 | .hdmi_enable = &evergreen_hdmi_enable, | ||
1359 | .hdmi_setmode = &evergreen_hdmi_setmode, | ||
1346 | }, | 1360 | }, |
1347 | .copy = { | 1361 | .copy = { |
1348 | .blit = &r600_copy_blit, | 1362 | .blit = &r600_copy_blit, |
@@ -1439,6 +1453,8 @@ static struct radeon_asic btc_asic = { | |||
1439 | .wait_for_vblank = &dce4_wait_for_vblank, | 1453 | .wait_for_vblank = &dce4_wait_for_vblank, |
1440 | .set_backlight_level = &atombios_set_backlight_level, | 1454 | .set_backlight_level = &atombios_set_backlight_level, |
1441 | .get_backlight_level = &atombios_get_backlight_level, | 1455 | .get_backlight_level = &atombios_get_backlight_level, |
1456 | .hdmi_enable = &evergreen_hdmi_enable, | ||
1457 | .hdmi_setmode = &evergreen_hdmi_setmode, | ||
1442 | }, | 1458 | }, |
1443 | .copy = { | 1459 | .copy = { |
1444 | .blit = &r600_copy_blit, | 1460 | .blit = &r600_copy_blit, |
@@ -1578,6 +1594,8 @@ static struct radeon_asic cayman_asic = { | |||
1578 | .wait_for_vblank = &dce4_wait_for_vblank, | 1594 | .wait_for_vblank = &dce4_wait_for_vblank, |
1579 | .set_backlight_level = &atombios_set_backlight_level, | 1595 | .set_backlight_level = &atombios_set_backlight_level, |
1580 | .get_backlight_level = &atombios_get_backlight_level, | 1596 | .get_backlight_level = &atombios_get_backlight_level, |
1597 | .hdmi_enable = &evergreen_hdmi_enable, | ||
1598 | .hdmi_setmode = &evergreen_hdmi_setmode, | ||
1581 | }, | 1599 | }, |
1582 | .copy = { | 1600 | .copy = { |
1583 | .blit = &r600_copy_blit, | 1601 | .blit = &r600_copy_blit, |
diff --git a/drivers/gpu/drm/radeon/radeon_asic.h b/drivers/gpu/drm/radeon/radeon_asic.h index fa8b8bf61c2d..2c87365d345f 100644 --- a/drivers/gpu/drm/radeon/radeon_asic.h +++ b/drivers/gpu/drm/radeon/radeon_asic.h | |||
@@ -378,6 +378,8 @@ struct r600_audio r600_audio_status(struct radeon_device *rdev); | |||
378 | void r600_audio_fini(struct radeon_device *rdev); | 378 | void r600_audio_fini(struct radeon_device *rdev); |
379 | int r600_hdmi_buffer_status_changed(struct drm_encoder *encoder); | 379 | int r600_hdmi_buffer_status_changed(struct drm_encoder *encoder); |
380 | void r600_hdmi_update_audio_settings(struct drm_encoder *encoder); | 380 | void r600_hdmi_update_audio_settings(struct drm_encoder *encoder); |
381 | void r600_hdmi_enable(struct drm_encoder *encoder, bool enable); | ||
382 | void r600_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode *mode); | ||
381 | /* r600 blit */ | 383 | /* r600 blit */ |
382 | int r600_blit_prepare_copy(struct radeon_device *rdev, unsigned num_gpu_pages, | 384 | int r600_blit_prepare_copy(struct radeon_device *rdev, unsigned num_gpu_pages, |
383 | struct radeon_fence **fence, struct radeon_sa_bo **vb, | 385 | struct radeon_fence **fence, struct radeon_sa_bo **vb, |
@@ -476,6 +478,8 @@ int evergreen_copy_dma(struct radeon_device *rdev, | |||
476 | uint64_t src_offset, uint64_t dst_offset, | 478 | uint64_t src_offset, uint64_t dst_offset, |
477 | unsigned num_gpu_pages, | 479 | unsigned num_gpu_pages, |
478 | struct radeon_fence **fence); | 480 | struct radeon_fence **fence); |
481 | void evergreen_hdmi_enable(struct drm_encoder *encoder, bool enable); | ||
482 | void evergreen_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode *mode); | ||
479 | 483 | ||
480 | /* | 484 | /* |
481 | * cayman | 485 | * cayman |