diff options
Diffstat (limited to 'drivers/gpu/drm/radeon/rv770.c')
-rw-r--r-- | drivers/gpu/drm/radeon/rv770.c | 199 |
1 files changed, 86 insertions, 113 deletions
diff --git a/drivers/gpu/drm/radeon/rv770.c b/drivers/gpu/drm/radeon/rv770.c index e0b97d161397..595ac638039d 100644 --- a/drivers/gpu/drm/radeon/rv770.c +++ b/drivers/gpu/drm/radeon/rv770.c | |||
@@ -75,7 +75,7 @@ int rv770_pcie_gart_enable(struct radeon_device *rdev) | |||
75 | WREG32(MC_VM_MB_L1_TLB2_CNTL, tmp); | 75 | WREG32(MC_VM_MB_L1_TLB2_CNTL, tmp); |
76 | WREG32(MC_VM_MB_L1_TLB3_CNTL, tmp); | 76 | WREG32(MC_VM_MB_L1_TLB3_CNTL, tmp); |
77 | WREG32(VM_CONTEXT0_PAGE_TABLE_START_ADDR, rdev->mc.gtt_start >> 12); | 77 | WREG32(VM_CONTEXT0_PAGE_TABLE_START_ADDR, rdev->mc.gtt_start >> 12); |
78 | WREG32(VM_CONTEXT0_PAGE_TABLE_END_ADDR, (rdev->mc.gtt_end - 1) >> 12); | 78 | WREG32(VM_CONTEXT0_PAGE_TABLE_END_ADDR, rdev->mc.gtt_end >> 12); |
79 | WREG32(VM_CONTEXT0_PAGE_TABLE_BASE_ADDR, rdev->gart.table_addr >> 12); | 79 | WREG32(VM_CONTEXT0_PAGE_TABLE_BASE_ADDR, rdev->gart.table_addr >> 12); |
80 | WREG32(VM_CONTEXT0_CNTL, ENABLE_CONTEXT | PAGE_TABLE_DEPTH(0) | | 80 | WREG32(VM_CONTEXT0_CNTL, ENABLE_CONTEXT | PAGE_TABLE_DEPTH(0) | |
81 | RANGE_PROTECTION_FAULT_ENABLE_DEFAULT); | 81 | RANGE_PROTECTION_FAULT_ENABLE_DEFAULT); |
@@ -126,17 +126,36 @@ void rv770_pcie_gart_fini(struct radeon_device *rdev) | |||
126 | } | 126 | } |
127 | 127 | ||
128 | 128 | ||
129 | /* | 129 | void rv770_agp_enable(struct radeon_device *rdev) |
130 | * MC | ||
131 | */ | ||
132 | static void rv770_mc_resume(struct radeon_device *rdev) | ||
133 | { | 130 | { |
134 | u32 d1vga_control, d2vga_control; | 131 | u32 tmp; |
135 | u32 vga_render_control, vga_hdp_control; | 132 | int i; |
136 | u32 d1crtc_control, d2crtc_control; | 133 | |
137 | u32 new_d1grph_primary, new_d1grph_secondary; | 134 | /* Setup L2 cache */ |
138 | u32 new_d2grph_primary, new_d2grph_secondary; | 135 | WREG32(VM_L2_CNTL, ENABLE_L2_CACHE | ENABLE_L2_FRAGMENT_PROCESSING | |
139 | u64 old_vram_start; | 136 | ENABLE_L2_PTE_CACHE_LRU_UPDATE_BY_WRITE | |
137 | EFFECTIVE_L2_QUEUE_SIZE(7)); | ||
138 | WREG32(VM_L2_CNTL2, 0); | ||
139 | WREG32(VM_L2_CNTL3, BANK_SELECT(0) | CACHE_UPDATE_MODE(2)); | ||
140 | /* Setup TLB control */ | ||
141 | tmp = ENABLE_L1_TLB | ENABLE_L1_FRAGMENT_PROCESSING | | ||
142 | SYSTEM_ACCESS_MODE_NOT_IN_SYS | | ||
143 | SYSTEM_APERTURE_UNMAPPED_ACCESS_PASS_THRU | | ||
144 | EFFECTIVE_L1_TLB_SIZE(5) | EFFECTIVE_L1_QUEUE_SIZE(5); | ||
145 | WREG32(MC_VM_MD_L1_TLB0_CNTL, tmp); | ||
146 | WREG32(MC_VM_MD_L1_TLB1_CNTL, tmp); | ||
147 | WREG32(MC_VM_MD_L1_TLB2_CNTL, tmp); | ||
148 | WREG32(MC_VM_MB_L1_TLB0_CNTL, tmp); | ||
149 | WREG32(MC_VM_MB_L1_TLB1_CNTL, tmp); | ||
150 | WREG32(MC_VM_MB_L1_TLB2_CNTL, tmp); | ||
151 | WREG32(MC_VM_MB_L1_TLB3_CNTL, tmp); | ||
152 | for (i = 0; i < 7; i++) | ||
153 | WREG32(VM_CONTEXT0_CNTL + (i * 4), 0); | ||
154 | } | ||
155 | |||
156 | static void rv770_mc_program(struct radeon_device *rdev) | ||
157 | { | ||
158 | struct rv515_mc_save save; | ||
140 | u32 tmp; | 159 | u32 tmp; |
141 | int i, j; | 160 | int i, j; |
142 | 161 | ||
@@ -150,53 +169,42 @@ static void rv770_mc_resume(struct radeon_device *rdev) | |||
150 | } | 169 | } |
151 | WREG32(HDP_REG_COHERENCY_FLUSH_CNTL, 0); | 170 | WREG32(HDP_REG_COHERENCY_FLUSH_CNTL, 0); |
152 | 171 | ||
153 | d1vga_control = RREG32(D1VGA_CONTROL); | 172 | rv515_mc_stop(rdev, &save); |
154 | d2vga_control = RREG32(D2VGA_CONTROL); | ||
155 | vga_render_control = RREG32(VGA_RENDER_CONTROL); | ||
156 | vga_hdp_control = RREG32(VGA_HDP_CONTROL); | ||
157 | d1crtc_control = RREG32(D1CRTC_CONTROL); | ||
158 | d2crtc_control = RREG32(D2CRTC_CONTROL); | ||
159 | old_vram_start = (u64)(RREG32(MC_VM_FB_LOCATION) & 0xFFFF) << 24; | ||
160 | new_d1grph_primary = RREG32(D1GRPH_PRIMARY_SURFACE_ADDRESS); | ||
161 | new_d1grph_secondary = RREG32(D1GRPH_SECONDARY_SURFACE_ADDRESS); | ||
162 | new_d1grph_primary += rdev->mc.vram_start - old_vram_start; | ||
163 | new_d1grph_secondary += rdev->mc.vram_start - old_vram_start; | ||
164 | new_d2grph_primary = RREG32(D2GRPH_PRIMARY_SURFACE_ADDRESS); | ||
165 | new_d2grph_secondary = RREG32(D2GRPH_SECONDARY_SURFACE_ADDRESS); | ||
166 | new_d2grph_primary += rdev->mc.vram_start - old_vram_start; | ||
167 | new_d2grph_secondary += rdev->mc.vram_start - old_vram_start; | ||
168 | |||
169 | /* Stop all video */ | ||
170 | WREG32(D1VGA_CONTROL, 0); | ||
171 | WREG32(D2VGA_CONTROL, 0); | ||
172 | WREG32(VGA_RENDER_CONTROL, 0); | ||
173 | WREG32(D1CRTC_UPDATE_LOCK, 1); | ||
174 | WREG32(D2CRTC_UPDATE_LOCK, 1); | ||
175 | WREG32(D1CRTC_CONTROL, 0); | ||
176 | WREG32(D2CRTC_CONTROL, 0); | ||
177 | WREG32(D1CRTC_UPDATE_LOCK, 0); | ||
178 | WREG32(D2CRTC_UPDATE_LOCK, 0); | ||
179 | |||
180 | mdelay(1); | ||
181 | if (r600_mc_wait_for_idle(rdev)) { | 173 | if (r600_mc_wait_for_idle(rdev)) { |
182 | printk(KERN_WARNING "[drm] MC not idle !\n"); | 174 | dev_warn(rdev->dev, "Wait for MC idle timedout !\n"); |
183 | } | 175 | } |
184 | |||
185 | /* Lockout access through VGA aperture*/ | 176 | /* Lockout access through VGA aperture*/ |
186 | WREG32(VGA_HDP_CONTROL, VGA_MEMORY_DISABLE); | 177 | WREG32(VGA_HDP_CONTROL, VGA_MEMORY_DISABLE); |
187 | |||
188 | /* Update configuration */ | 178 | /* Update configuration */ |
189 | WREG32(MC_VM_SYSTEM_APERTURE_LOW_ADDR, rdev->mc.vram_start >> 12); | 179 | if (rdev->flags & RADEON_IS_AGP) { |
190 | WREG32(MC_VM_SYSTEM_APERTURE_HIGH_ADDR, (rdev->mc.vram_end - 1) >> 12); | 180 | if (rdev->mc.vram_start < rdev->mc.gtt_start) { |
181 | /* VRAM before AGP */ | ||
182 | WREG32(MC_VM_SYSTEM_APERTURE_LOW_ADDR, | ||
183 | rdev->mc.vram_start >> 12); | ||
184 | WREG32(MC_VM_SYSTEM_APERTURE_HIGH_ADDR, | ||
185 | rdev->mc.gtt_end >> 12); | ||
186 | } else { | ||
187 | /* VRAM after AGP */ | ||
188 | WREG32(MC_VM_SYSTEM_APERTURE_LOW_ADDR, | ||
189 | rdev->mc.gtt_start >> 12); | ||
190 | WREG32(MC_VM_SYSTEM_APERTURE_HIGH_ADDR, | ||
191 | rdev->mc.vram_end >> 12); | ||
192 | } | ||
193 | } else { | ||
194 | WREG32(MC_VM_SYSTEM_APERTURE_LOW_ADDR, | ||
195 | rdev->mc.vram_start >> 12); | ||
196 | WREG32(MC_VM_SYSTEM_APERTURE_HIGH_ADDR, | ||
197 | rdev->mc.vram_end >> 12); | ||
198 | } | ||
191 | WREG32(MC_VM_SYSTEM_APERTURE_DEFAULT_ADDR, 0); | 199 | WREG32(MC_VM_SYSTEM_APERTURE_DEFAULT_ADDR, 0); |
192 | tmp = (((rdev->mc.vram_end - 1) >> 24) & 0xFFFF) << 16; | 200 | tmp = ((rdev->mc.vram_end >> 24) & 0xFFFF) << 16; |
193 | tmp |= ((rdev->mc.vram_start >> 24) & 0xFFFF); | 201 | tmp |= ((rdev->mc.vram_start >> 24) & 0xFFFF); |
194 | WREG32(MC_VM_FB_LOCATION, tmp); | 202 | WREG32(MC_VM_FB_LOCATION, tmp); |
195 | WREG32(HDP_NONSURFACE_BASE, (rdev->mc.vram_start >> 8)); | 203 | WREG32(HDP_NONSURFACE_BASE, (rdev->mc.vram_start >> 8)); |
196 | WREG32(HDP_NONSURFACE_INFO, (2 << 7)); | 204 | WREG32(HDP_NONSURFACE_INFO, (2 << 7)); |
197 | WREG32(HDP_NONSURFACE_SIZE, (rdev->mc.mc_vram_size - 1) | 0x3FF); | 205 | WREG32(HDP_NONSURFACE_SIZE, (rdev->mc.mc_vram_size - 1) | 0x3FF); |
198 | if (rdev->flags & RADEON_IS_AGP) { | 206 | if (rdev->flags & RADEON_IS_AGP) { |
199 | WREG32(MC_VM_AGP_TOP, (rdev->mc.gtt_end - 1) >> 16); | 207 | WREG32(MC_VM_AGP_TOP, rdev->mc.gtt_end >> 16); |
200 | WREG32(MC_VM_AGP_BOT, rdev->mc.gtt_start >> 16); | 208 | WREG32(MC_VM_AGP_BOT, rdev->mc.gtt_start >> 16); |
201 | WREG32(MC_VM_AGP_BASE, rdev->mc.agp_base >> 22); | 209 | WREG32(MC_VM_AGP_BASE, rdev->mc.agp_base >> 22); |
202 | } else { | 210 | } else { |
@@ -204,31 +212,10 @@ static void rv770_mc_resume(struct radeon_device *rdev) | |||
204 | WREG32(MC_VM_AGP_TOP, 0x0FFFFFFF); | 212 | WREG32(MC_VM_AGP_TOP, 0x0FFFFFFF); |
205 | WREG32(MC_VM_AGP_BOT, 0x0FFFFFFF); | 213 | WREG32(MC_VM_AGP_BOT, 0x0FFFFFFF); |
206 | } | 214 | } |
207 | WREG32(D1GRPH_PRIMARY_SURFACE_ADDRESS, new_d1grph_primary); | ||
208 | WREG32(D1GRPH_SECONDARY_SURFACE_ADDRESS, new_d1grph_secondary); | ||
209 | WREG32(D2GRPH_PRIMARY_SURFACE_ADDRESS, new_d2grph_primary); | ||
210 | WREG32(D2GRPH_SECONDARY_SURFACE_ADDRESS, new_d2grph_secondary); | ||
211 | WREG32(VGA_MEMORY_BASE_ADDRESS, rdev->mc.vram_start); | ||
212 | |||
213 | /* Unlock host access */ | ||
214 | WREG32(VGA_HDP_CONTROL, vga_hdp_control); | ||
215 | |||
216 | mdelay(1); | ||
217 | if (r600_mc_wait_for_idle(rdev)) { | 215 | if (r600_mc_wait_for_idle(rdev)) { |
218 | printk(KERN_WARNING "[drm] MC not idle !\n"); | 216 | dev_warn(rdev->dev, "Wait for MC idle timedout !\n"); |
219 | } | 217 | } |
220 | 218 | rv515_mc_resume(rdev, &save); | |
221 | /* Restore video state */ | ||
222 | WREG32(D1CRTC_UPDATE_LOCK, 1); | ||
223 | WREG32(D2CRTC_UPDATE_LOCK, 1); | ||
224 | WREG32(D1CRTC_CONTROL, d1crtc_control); | ||
225 | WREG32(D2CRTC_CONTROL, d2crtc_control); | ||
226 | WREG32(D1CRTC_UPDATE_LOCK, 0); | ||
227 | WREG32(D2CRTC_UPDATE_LOCK, 0); | ||
228 | WREG32(D1VGA_CONTROL, d1vga_control); | ||
229 | WREG32(D2VGA_CONTROL, d2vga_control); | ||
230 | WREG32(VGA_RENDER_CONTROL, vga_render_control); | ||
231 | |||
232 | /* we need to own VRAM, so turn off the VGA renderer here | 219 | /* we need to own VRAM, so turn off the VGA renderer here |
233 | * to stop it overwriting our objects */ | 220 | * to stop it overwriting our objects */ |
234 | rv515_vga_render_disable(rdev); | 221 | rv515_vga_render_disable(rdev); |
@@ -840,9 +827,9 @@ int rv770_mc_init(struct radeon_device *rdev) | |||
840 | rdev->mc.gtt_size = radeon_gart_size * 1024 * 1024; | 827 | rdev->mc.gtt_size = radeon_gart_size * 1024 * 1024; |
841 | } | 828 | } |
842 | rdev->mc.vram_start = rdev->mc.vram_location; | 829 | rdev->mc.vram_start = rdev->mc.vram_location; |
843 | rdev->mc.vram_end = rdev->mc.vram_location + rdev->mc.mc_vram_size; | 830 | rdev->mc.vram_end = rdev->mc.vram_location + rdev->mc.mc_vram_size - 1; |
844 | rdev->mc.gtt_start = rdev->mc.gtt_location; | 831 | rdev->mc.gtt_start = rdev->mc.gtt_location; |
845 | rdev->mc.gtt_end = rdev->mc.gtt_location + rdev->mc.gtt_size; | 832 | rdev->mc.gtt_end = rdev->mc.gtt_location + rdev->mc.gtt_size - 1; |
846 | /* FIXME: we should enforce default clock in case GPU is not in | 833 | /* FIXME: we should enforce default clock in case GPU is not in |
847 | * default setup | 834 | * default setup |
848 | */ | 835 | */ |
@@ -861,11 +848,14 @@ static int rv770_startup(struct radeon_device *rdev) | |||
861 | { | 848 | { |
862 | int r; | 849 | int r; |
863 | 850 | ||
864 | radeon_gpu_reset(rdev); | 851 | rv770_mc_program(rdev); |
865 | rv770_mc_resume(rdev); | 852 | if (rdev->flags & RADEON_IS_AGP) { |
866 | r = rv770_pcie_gart_enable(rdev); | 853 | rv770_agp_enable(rdev); |
867 | if (r) | 854 | } else { |
868 | return r; | 855 | r = rv770_pcie_gart_enable(rdev); |
856 | if (r) | ||
857 | return r; | ||
858 | } | ||
869 | rv770_gpu_init(rdev); | 859 | rv770_gpu_init(rdev); |
870 | 860 | ||
871 | r = radeon_object_pin(rdev->r600_blit.shader_obj, RADEON_GEM_DOMAIN_VRAM, | 861 | r = radeon_object_pin(rdev->r600_blit.shader_obj, RADEON_GEM_DOMAIN_VRAM, |
@@ -884,9 +874,8 @@ static int rv770_startup(struct radeon_device *rdev) | |||
884 | r = r600_cp_resume(rdev); | 874 | r = r600_cp_resume(rdev); |
885 | if (r) | 875 | if (r) |
886 | return r; | 876 | return r; |
887 | r = r600_wb_init(rdev); | 877 | /* write back buffer are not vital so don't worry about failure */ |
888 | if (r) | 878 | r600_wb_enable(rdev); |
889 | return r; | ||
890 | return 0; | 879 | return 0; |
891 | } | 880 | } |
892 | 881 | ||
@@ -894,15 +883,12 @@ int rv770_resume(struct radeon_device *rdev) | |||
894 | { | 883 | { |
895 | int r; | 884 | int r; |
896 | 885 | ||
897 | if (radeon_gpu_reset(rdev)) { | 886 | /* Do not reset GPU before posting, on rv770 hw unlike on r500 hw, |
898 | /* FIXME: what do we want to do here ? */ | 887 | * posting will perform necessary task to bring back GPU into good |
899 | } | 888 | * shape. |
889 | */ | ||
900 | /* post card */ | 890 | /* post card */ |
901 | if (rdev->is_atom_bios) { | 891 | atom_asic_init(rdev->mode_info.atom_context); |
902 | atom_asic_init(rdev->mode_info.atom_context); | ||
903 | } else { | ||
904 | radeon_combios_asic_init(rdev->ddev); | ||
905 | } | ||
906 | /* Initialize clocks */ | 892 | /* Initialize clocks */ |
907 | r = radeon_clocks_init(rdev); | 893 | r = radeon_clocks_init(rdev); |
908 | if (r) { | 894 | if (r) { |
@@ -915,7 +901,7 @@ int rv770_resume(struct radeon_device *rdev) | |||
915 | return r; | 901 | return r; |
916 | } | 902 | } |
917 | 903 | ||
918 | r = radeon_ib_test(rdev); | 904 | r = r600_ib_test(rdev); |
919 | if (r) { | 905 | if (r) { |
920 | DRM_ERROR("radeon: failled testing IB (%d).\n", r); | 906 | DRM_ERROR("radeon: failled testing IB (%d).\n", r); |
921 | return r; | 907 | return r; |
@@ -929,8 +915,8 @@ int rv770_suspend(struct radeon_device *rdev) | |||
929 | /* FIXME: we should wait for ring to be empty */ | 915 | /* FIXME: we should wait for ring to be empty */ |
930 | r700_cp_stop(rdev); | 916 | r700_cp_stop(rdev); |
931 | rdev->cp.ready = false; | 917 | rdev->cp.ready = false; |
918 | r600_wb_disable(rdev); | ||
932 | rv770_pcie_gart_disable(rdev); | 919 | rv770_pcie_gart_disable(rdev); |
933 | |||
934 | /* unpin shaders bo */ | 920 | /* unpin shaders bo */ |
935 | radeon_object_unpin(rdev->r600_blit.shader_obj); | 921 | radeon_object_unpin(rdev->r600_blit.shader_obj); |
936 | return 0; | 922 | return 0; |
@@ -946,7 +932,6 @@ int rv770_init(struct radeon_device *rdev) | |||
946 | { | 932 | { |
947 | int r; | 933 | int r; |
948 | 934 | ||
949 | rdev->new_init_path = true; | ||
950 | r = radeon_dummy_page_init(rdev); | 935 | r = radeon_dummy_page_init(rdev); |
951 | if (r) | 936 | if (r) |
952 | return r; | 937 | return r; |
@@ -960,8 +945,10 @@ int rv770_init(struct radeon_device *rdev) | |||
960 | return -EINVAL; | 945 | return -EINVAL; |
961 | } | 946 | } |
962 | /* Must be an ATOMBIOS */ | 947 | /* Must be an ATOMBIOS */ |
963 | if (!rdev->is_atom_bios) | 948 | if (!rdev->is_atom_bios) { |
949 | dev_err(rdev->dev, "Expecting atombios for R600 GPU\n"); | ||
964 | return -EINVAL; | 950 | return -EINVAL; |
951 | } | ||
965 | r = radeon_atombios_init(rdev); | 952 | r = radeon_atombios_init(rdev); |
966 | if (r) | 953 | if (r) |
967 | return r; | 954 | return r; |
@@ -983,15 +970,8 @@ int rv770_init(struct radeon_device *rdev) | |||
983 | if (r) | 970 | if (r) |
984 | return r; | 971 | return r; |
985 | r = rv770_mc_init(rdev); | 972 | r = rv770_mc_init(rdev); |
986 | if (r) { | 973 | if (r) |
987 | if (rdev->flags & RADEON_IS_AGP) { | ||
988 | /* Retry with disabling AGP */ | ||
989 | rv770_fini(rdev); | ||
990 | rdev->flags &= ~RADEON_IS_AGP; | ||
991 | return rv770_init(rdev); | ||
992 | } | ||
993 | return r; | 974 | return r; |
994 | } | ||
995 | /* Memory manager */ | 975 | /* Memory manager */ |
996 | r = radeon_object_init(rdev); | 976 | r = radeon_object_init(rdev); |
997 | if (r) | 977 | if (r) |
@@ -1020,12 +1000,10 @@ int rv770_init(struct radeon_device *rdev) | |||
1020 | 1000 | ||
1021 | r = rv770_startup(rdev); | 1001 | r = rv770_startup(rdev); |
1022 | if (r) { | 1002 | if (r) { |
1023 | if (rdev->flags & RADEON_IS_AGP) { | 1003 | rv770_suspend(rdev); |
1024 | /* Retry with disabling AGP */ | 1004 | r600_wb_fini(rdev); |
1025 | rv770_fini(rdev); | 1005 | radeon_ring_fini(rdev); |
1026 | rdev->flags &= ~RADEON_IS_AGP; | 1006 | rv770_pcie_gart_fini(rdev); |
1027 | return rv770_init(rdev); | ||
1028 | } | ||
1029 | rdev->accel_working = false; | 1007 | rdev->accel_working = false; |
1030 | } | 1008 | } |
1031 | if (rdev->accel_working) { | 1009 | if (rdev->accel_working) { |
@@ -1034,7 +1012,7 @@ int rv770_init(struct radeon_device *rdev) | |||
1034 | DRM_ERROR("radeon: failled initializing IB pool (%d).\n", r); | 1012 | DRM_ERROR("radeon: failled initializing IB pool (%d).\n", r); |
1035 | rdev->accel_working = false; | 1013 | rdev->accel_working = false; |
1036 | } | 1014 | } |
1037 | r = radeon_ib_test(rdev); | 1015 | r = r600_ib_test(rdev); |
1038 | if (r) { | 1016 | if (r) { |
1039 | DRM_ERROR("radeon: failled testing IB (%d).\n", r); | 1017 | DRM_ERROR("radeon: failled testing IB (%d).\n", r); |
1040 | rdev->accel_working = false; | 1018 | rdev->accel_working = false; |
@@ -1049,20 +1027,15 @@ void rv770_fini(struct radeon_device *rdev) | |||
1049 | 1027 | ||
1050 | r600_blit_fini(rdev); | 1028 | r600_blit_fini(rdev); |
1051 | radeon_ring_fini(rdev); | 1029 | radeon_ring_fini(rdev); |
1030 | r600_wb_fini(rdev); | ||
1052 | rv770_pcie_gart_fini(rdev); | 1031 | rv770_pcie_gart_fini(rdev); |
1053 | radeon_gem_fini(rdev); | 1032 | radeon_gem_fini(rdev); |
1054 | radeon_fence_driver_fini(rdev); | 1033 | radeon_fence_driver_fini(rdev); |
1055 | radeon_clocks_fini(rdev); | 1034 | radeon_clocks_fini(rdev); |
1056 | #if __OS_HAS_AGP | ||
1057 | if (rdev->flags & RADEON_IS_AGP) | 1035 | if (rdev->flags & RADEON_IS_AGP) |
1058 | radeon_agp_fini(rdev); | 1036 | radeon_agp_fini(rdev); |
1059 | #endif | ||
1060 | radeon_object_fini(rdev); | 1037 | radeon_object_fini(rdev); |
1061 | if (rdev->is_atom_bios) { | 1038 | radeon_atombios_fini(rdev); |
1062 | radeon_atombios_fini(rdev); | ||
1063 | } else { | ||
1064 | radeon_combios_fini(rdev); | ||
1065 | } | ||
1066 | kfree(rdev->bios); | 1039 | kfree(rdev->bios); |
1067 | rdev->bios = NULL; | 1040 | rdev->bios = NULL; |
1068 | radeon_dummy_page_fini(rdev); | 1041 | radeon_dummy_page_fini(rdev); |