diff options
author | Tejun Heo <tj@kernel.org> | 2010-04-04 22:37:28 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2010-04-04 22:37:28 -0400 |
commit | 336f5899d287f06d8329e208fc14ce50f7ec9698 (patch) | |
tree | 9b762d450d5eb248a6ff8317badb7e223d93ed58 /drivers/gpu/drm/radeon/rv770.c | |
parent | a4ab2773205e8b94c18625455f85e3b6bb9d7ad6 (diff) | |
parent | db217dece3003df0841bacf9556b5c06aa097dae (diff) |
Merge branch 'master' into export-slabh
Diffstat (limited to 'drivers/gpu/drm/radeon/rv770.c')
-rw-r--r-- | drivers/gpu/drm/radeon/rv770.c | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/drivers/gpu/drm/radeon/rv770.c b/drivers/gpu/drm/radeon/rv770.c index 188e62d10f8f..97958a64df1a 100644 --- a/drivers/gpu/drm/radeon/rv770.c +++ b/drivers/gpu/drm/radeon/rv770.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/slab.h> | 30 | #include <linux/slab.h> |
31 | #include "drmP.h" | 31 | #include "drmP.h" |
32 | #include "radeon.h" | 32 | #include "radeon.h" |
33 | #include "radeon_asic.h" | ||
33 | #include "radeon_drm.h" | 34 | #include "radeon_drm.h" |
34 | #include "rv770d.h" | 35 | #include "rv770d.h" |
35 | #include "atom.h" | 36 | #include "atom.h" |
@@ -126,9 +127,9 @@ void rv770_pcie_gart_disable(struct radeon_device *rdev) | |||
126 | 127 | ||
127 | void rv770_pcie_gart_fini(struct radeon_device *rdev) | 128 | void rv770_pcie_gart_fini(struct radeon_device *rdev) |
128 | { | 129 | { |
130 | radeon_gart_fini(rdev); | ||
129 | rv770_pcie_gart_disable(rdev); | 131 | rv770_pcie_gart_disable(rdev); |
130 | radeon_gart_table_vram_free(rdev); | 132 | radeon_gart_table_vram_free(rdev); |
131 | radeon_gart_fini(rdev); | ||
132 | } | 133 | } |
133 | 134 | ||
134 | 135 | ||
@@ -648,10 +649,13 @@ static void rv770_gpu_init(struct radeon_device *rdev) | |||
648 | 649 | ||
649 | WREG32(CC_RB_BACKEND_DISABLE, cc_rb_backend_disable); | 650 | WREG32(CC_RB_BACKEND_DISABLE, cc_rb_backend_disable); |
650 | WREG32(CC_GC_SHADER_PIPE_CONFIG, cc_gc_shader_pipe_config); | 651 | WREG32(CC_GC_SHADER_PIPE_CONFIG, cc_gc_shader_pipe_config); |
652 | WREG32(GC_USER_SHADER_PIPE_CONFIG, cc_gc_shader_pipe_config); | ||
651 | WREG32(CC_SYS_RB_BACKEND_DISABLE, cc_rb_backend_disable); | 653 | WREG32(CC_SYS_RB_BACKEND_DISABLE, cc_rb_backend_disable); |
652 | 654 | ||
653 | WREG32(CGTS_SYS_TCC_DISABLE, 0); | 655 | WREG32(CGTS_SYS_TCC_DISABLE, 0); |
654 | WREG32(CGTS_TCC_DISABLE, 0); | 656 | WREG32(CGTS_TCC_DISABLE, 0); |
657 | WREG32(CGTS_USER_SYS_TCC_DISABLE, 0); | ||
658 | WREG32(CGTS_USER_TCC_DISABLE, 0); | ||
655 | 659 | ||
656 | num_qd_pipes = | 660 | num_qd_pipes = |
657 | R7XX_MAX_PIPES - r600_count_pipe_bits((cc_gc_shader_pipe_config & INACTIVE_QD_PIPES_MASK) >> 8); | 661 | R7XX_MAX_PIPES - r600_count_pipe_bits((cc_gc_shader_pipe_config & INACTIVE_QD_PIPES_MASK) >> 8); |
@@ -865,7 +869,6 @@ static void rv770_gpu_init(struct radeon_device *rdev) | |||
865 | 869 | ||
866 | int rv770_mc_init(struct radeon_device *rdev) | 870 | int rv770_mc_init(struct radeon_device *rdev) |
867 | { | 871 | { |
868 | fixed20_12 a; | ||
869 | u32 tmp; | 872 | u32 tmp; |
870 | int chansize, numchan; | 873 | int chansize, numchan; |
871 | 874 | ||
@@ -909,12 +912,8 @@ int rv770_mc_init(struct radeon_device *rdev) | |||
909 | rdev->mc.real_vram_size = rdev->mc.aper_size; | 912 | rdev->mc.real_vram_size = rdev->mc.aper_size; |
910 | } | 913 | } |
911 | r600_vram_gtt_location(rdev, &rdev->mc); | 914 | r600_vram_gtt_location(rdev, &rdev->mc); |
912 | /* FIXME: we should enforce default clock in case GPU is not in | 915 | radeon_update_bandwidth_info(rdev); |
913 | * default setup | 916 | |
914 | */ | ||
915 | a.full = rfixed_const(100); | ||
916 | rdev->pm.sclk.full = rfixed_const(rdev->clock.default_sclk); | ||
917 | rdev->pm.sclk.full = rfixed_div(rdev->pm.sclk, a); | ||
918 | return 0; | 917 | return 0; |
919 | } | 918 | } |
920 | 919 | ||
@@ -1014,6 +1013,13 @@ int rv770_resume(struct radeon_device *rdev) | |||
1014 | DRM_ERROR("radeon: failled testing IB (%d).\n", r); | 1013 | DRM_ERROR("radeon: failled testing IB (%d).\n", r); |
1015 | return r; | 1014 | return r; |
1016 | } | 1015 | } |
1016 | |||
1017 | r = r600_audio_init(rdev); | ||
1018 | if (r) { | ||
1019 | dev_err(rdev->dev, "radeon: audio init failed\n"); | ||
1020 | return r; | ||
1021 | } | ||
1022 | |||
1017 | return r; | 1023 | return r; |
1018 | 1024 | ||
1019 | } | 1025 | } |
@@ -1022,6 +1028,7 @@ int rv770_suspend(struct radeon_device *rdev) | |||
1022 | { | 1028 | { |
1023 | int r; | 1029 | int r; |
1024 | 1030 | ||
1031 | r600_audio_fini(rdev); | ||
1025 | /* FIXME: we should wait for ring to be empty */ | 1032 | /* FIXME: we should wait for ring to be empty */ |
1026 | r700_cp_stop(rdev); | 1033 | r700_cp_stop(rdev); |
1027 | rdev->cp.ready = false; | 1034 | rdev->cp.ready = false; |
@@ -1145,11 +1152,19 @@ int rv770_init(struct radeon_device *rdev) | |||
1145 | } | 1152 | } |
1146 | } | 1153 | } |
1147 | } | 1154 | } |
1155 | |||
1156 | r = r600_audio_init(rdev); | ||
1157 | if (r) { | ||
1158 | dev_err(rdev->dev, "radeon: audio init failed\n"); | ||
1159 | return r; | ||
1160 | } | ||
1161 | |||
1148 | return 0; | 1162 | return 0; |
1149 | } | 1163 | } |
1150 | 1164 | ||
1151 | void rv770_fini(struct radeon_device *rdev) | 1165 | void rv770_fini(struct radeon_device *rdev) |
1152 | { | 1166 | { |
1167 | radeon_pm_fini(rdev); | ||
1153 | r600_blit_fini(rdev); | 1168 | r600_blit_fini(rdev); |
1154 | r600_cp_fini(rdev); | 1169 | r600_cp_fini(rdev); |
1155 | r600_wb_fini(rdev); | 1170 | r600_wb_fini(rdev); |