aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/rs600.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/radeon/rs600.c')
-rw-r--r--drivers/gpu/drm/radeon/rs600.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/gpu/drm/radeon/rs600.c b/drivers/gpu/drm/radeon/rs600.c
index 6dc15ea8ba33..cc05b230d7ef 100644
--- a/drivers/gpu/drm/radeon/rs600.c
+++ b/drivers/gpu/drm/radeon/rs600.c
@@ -686,8 +686,8 @@ void rs600_mc_init(struct radeon_device *rdev)
686{ 686{
687 u64 base; 687 u64 base;
688 688
689 rdev->mc.aper_base = drm_get_resource_start(rdev->ddev, 0); 689 rdev->mc.aper_base = pci_resource_start(rdev->pdev, 0);
690 rdev->mc.aper_size = drm_get_resource_len(rdev->ddev, 0); 690 rdev->mc.aper_size = pci_resource_len(rdev->pdev, 0);
691 rdev->mc.vram_is_ddr = true; 691 rdev->mc.vram_is_ddr = true;
692 rdev->mc.vram_width = 128; 692 rdev->mc.vram_width = 128;
693 rdev->mc.real_vram_size = RREG32(RADEON_CONFIG_MEMSIZE); 693 rdev->mc.real_vram_size = RREG32(RADEON_CONFIG_MEMSIZE);
@@ -696,7 +696,6 @@ void rs600_mc_init(struct radeon_device *rdev)
696 rdev->mc.igp_sideport_enabled = radeon_atombios_sideport_present(rdev); 696 rdev->mc.igp_sideport_enabled = radeon_atombios_sideport_present(rdev);
697 base = RREG32_MC(R_000004_MC_FB_LOCATION); 697 base = RREG32_MC(R_000004_MC_FB_LOCATION);
698 base = G_000004_MC_FB_START(base) << 16; 698 base = G_000004_MC_FB_START(base) << 16;
699 rdev->mc.igp_sideport_enabled = radeon_atombios_sideport_present(rdev);
700 radeon_vram_location(rdev, &rdev->mc, base); 699 radeon_vram_location(rdev, &rdev->mc, base);
701 rdev->mc.gtt_base_align = 0; 700 rdev->mc.gtt_base_align = 0;
702 radeon_gtt_location(rdev, &rdev->mc); 701 radeon_gtt_location(rdev, &rdev->mc);
@@ -813,6 +812,13 @@ static int rs600_startup(struct radeon_device *rdev)
813 dev_err(rdev->dev, "failled initializing IB (%d).\n", r); 812 dev_err(rdev->dev, "failled initializing IB (%d).\n", r);
814 return r; 813 return r;
815 } 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
816 return 0; 822 return 0;
817} 823}
818 824
@@ -839,6 +845,7 @@ int rs600_resume(struct radeon_device *rdev)
839 845
840int rs600_suspend(struct radeon_device *rdev) 846int rs600_suspend(struct radeon_device *rdev)
841{ 847{
848 r600_audio_fini(rdev);
842 r100_cp_disable(rdev); 849 r100_cp_disable(rdev);
843 r100_wb_disable(rdev); 850 r100_wb_disable(rdev);
844 rs600_irq_disable(rdev); 851 rs600_irq_disable(rdev);
@@ -848,6 +855,7 @@ int rs600_suspend(struct radeon_device *rdev)
848 855
849void rs600_fini(struct radeon_device *rdev) 856void rs600_fini(struct radeon_device *rdev)
850{ 857{
858 r600_audio_fini(rdev);
851 r100_cp_fini(rdev); 859 r100_cp_fini(rdev);
852 r100_wb_fini(rdev); 860 r100_wb_fini(rdev);
853 r100_ib_fini(rdev); 861 r100_ib_fini(rdev);
@@ -871,6 +879,8 @@ int rs600_init(struct radeon_device *rdev)
871 radeon_scratch_init(rdev); 879 radeon_scratch_init(rdev);
872 /* Initialize surface registers */ 880 /* Initialize surface registers */
873 radeon_surface_init(rdev); 881 radeon_surface_init(rdev);
882 /* restore some register to sane defaults */
883 r100_restore_sanity(rdev);
874 /* BIOS */ 884 /* BIOS */
875 if (!radeon_get_bios(rdev)) { 885 if (!radeon_get_bios(rdev)) {
876 if (ASIC_IS_AVIVO(rdev)) 886 if (ASIC_IS_AVIVO(rdev))