aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2010-06-19 06:24:57 -0400
committerDave Airlie <airlied@redhat.com>2010-08-01 20:00:06 -0400
commitfe50ac78a6ec20db267b32e27a1d191128eaaa46 (patch)
tree3111d2e26613e691e3ab534dcd84d098be897925 /drivers/gpu/drm
parent7eea7e9eea106a9c49cddf780f590dd8161481fa (diff)
drm/radeon/kms: enable HDMI audio on RS600/RS690/RS740
We will need method of selecting encoder that should receive HDMI block. For now we assign HDMI block to first enabled encoder. Hopefully there are not many RS6x0 chips with two digital encoders. [airlied: add RS740 checks as per Alex suggestion.] Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/radeon/r600_hdmi.c6
-rw-r--r--drivers/gpu/drm/radeon/rs600.c9
-rw-r--r--drivers/gpu/drm/radeon/rs690.c9
3 files changed, 22 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/r600_hdmi.c b/drivers/gpu/drm/radeon/r600_hdmi.c
index 26b4bc9d89a5..e6a58ed48dcf 100644
--- a/drivers/gpu/drm/radeon/r600_hdmi.c
+++ b/drivers/gpu/drm/radeon/r600_hdmi.c
@@ -435,7 +435,8 @@ static int r600_hdmi_find_free_block(struct drm_device *dev)
435 } 435 }
436 } 436 }
437 437
438 if (rdev->family == CHIP_RS600 || rdev->family == CHIP_RS690) { 438 if (rdev->family == CHIP_RS600 || rdev->family == CHIP_RS690 ||
439 rdev->family == CHIP_RS740) {
439 return free_blocks[0] ? R600_HDMI_BLOCK1 : 0; 440 return free_blocks[0] ? R600_HDMI_BLOCK1 : 0;
440 } else if (rdev->family >= CHIP_R600) { 441 } else if (rdev->family >= CHIP_R600) {
441 if (free_blocks[0]) 442 if (free_blocks[0])
@@ -466,7 +467,8 @@ static void r600_hdmi_assign_block(struct drm_encoder *encoder)
466 if (ASIC_IS_DCE32(rdev)) 467 if (ASIC_IS_DCE32(rdev))
467 radeon_encoder->hdmi_config_offset = dig->dig_encoder ? 468 radeon_encoder->hdmi_config_offset = dig->dig_encoder ?
468 R600_HDMI_CONFIG2 : R600_HDMI_CONFIG1; 469 R600_HDMI_CONFIG2 : R600_HDMI_CONFIG1;
469 } else if (rdev->family >= CHIP_R600) { 470 } else if (rdev->family >= CHIP_R600 || rdev->family == CHIP_RS600 ||
471 rdev->family == CHIP_RS690 || rdev->family == CHIP_RS740) {
470 radeon_encoder->hdmi_offset = r600_hdmi_find_free_block(dev); 472 radeon_encoder->hdmi_offset = r600_hdmi_find_free_block(dev);
471 } 473 }
472} 474}
diff --git a/drivers/gpu/drm/radeon/rs600.c b/drivers/gpu/drm/radeon/rs600.c
index 5ce3ccc7a423..27d2e706c650 100644
--- a/drivers/gpu/drm/radeon/rs600.c
+++ b/drivers/gpu/drm/radeon/rs600.c
@@ -812,6 +812,13 @@ static int rs600_startup(struct radeon_device *rdev)
812 dev_err(rdev->dev, "failled initializing IB (%d).\n", r); 812 dev_err(rdev->dev, "failled initializing IB (%d).\n", r);
813 return r; 813 return r;
814 } 814 }
815
816 r = r600_audio_init(rdev);
817 if (r) {
818 dev_err(rdev->dev, "failed initializing audio\n");
819 return r;
820 }
821
815 return 0; 822 return 0;
816} 823}
817 824
@@ -838,6 +845,7 @@ int rs600_resume(struct radeon_device *rdev)
838 845
839int rs600_suspend(struct radeon_device *rdev) 846int rs600_suspend(struct radeon_device *rdev)
840{ 847{
848 r600_audio_fini(rdev);
841 r100_cp_disable(rdev); 849 r100_cp_disable(rdev);
842 r100_wb_disable(rdev); 850 r100_wb_disable(rdev);
843 rs600_irq_disable(rdev); 851 rs600_irq_disable(rdev);
@@ -847,6 +855,7 @@ int rs600_suspend(struct radeon_device *rdev)
847 855
848void rs600_fini(struct radeon_device *rdev) 856void rs600_fini(struct radeon_device *rdev)
849{ 857{
858 r600_audio_fini(rdev);
850 r100_cp_fini(rdev); 859 r100_cp_fini(rdev);
851 r100_wb_fini(rdev); 860 r100_wb_fini(rdev);
852 r100_ib_fini(rdev); 861 r100_ib_fini(rdev);
diff --git a/drivers/gpu/drm/radeon/rs690.c b/drivers/gpu/drm/radeon/rs690.c
index 5fea094ed8cb..23676b659e65 100644
--- a/drivers/gpu/drm/radeon/rs690.c
+++ b/drivers/gpu/drm/radeon/rs690.c
@@ -640,6 +640,13 @@ static int rs690_startup(struct radeon_device *rdev)
640 dev_err(rdev->dev, "failled initializing IB (%d).\n", r); 640 dev_err(rdev->dev, "failled initializing IB (%d).\n", r);
641 return r; 641 return r;
642 } 642 }
643
644 r = r600_audio_init(rdev);
645 if (r) {
646 dev_err(rdev->dev, "failed initializing audio\n");
647 return r;
648 }
649
643 return 0; 650 return 0;
644} 651}
645 652
@@ -666,6 +673,7 @@ int rs690_resume(struct radeon_device *rdev)
666 673
667int rs690_suspend(struct radeon_device *rdev) 674int rs690_suspend(struct radeon_device *rdev)
668{ 675{
676 r600_audio_fini(rdev);
669 r100_cp_disable(rdev); 677 r100_cp_disable(rdev);
670 r100_wb_disable(rdev); 678 r100_wb_disable(rdev);
671 rs600_irq_disable(rdev); 679 rs600_irq_disable(rdev);
@@ -675,6 +683,7 @@ int rs690_suspend(struct radeon_device *rdev)
675 683
676void rs690_fini(struct radeon_device *rdev) 684void rs690_fini(struct radeon_device *rdev)
677{ 685{
686 r600_audio_fini(rdev);
678 r100_cp_fini(rdev); 687 r100_cp_fini(rdev);
679 r100_wb_fini(rdev); 688 r100_wb_fini(rdev);
680 r100_ib_fini(rdev); 689 r100_ib_fini(rdev);