diff options
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_asic.h')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_asic.h | 65 |
1 files changed, 62 insertions, 3 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_asic.h b/drivers/gpu/drm/radeon/radeon_asic.h index 740988244143..e01f07718539 100644 --- a/drivers/gpu/drm/radeon/radeon_asic.h +++ b/drivers/gpu/drm/radeon/radeon_asic.h | |||
@@ -102,6 +102,11 @@ int r100_pci_gart_enable(struct radeon_device *rdev); | |||
102 | void r100_pci_gart_disable(struct radeon_device *rdev); | 102 | void r100_pci_gart_disable(struct radeon_device *rdev); |
103 | int r100_debugfs_mc_info_init(struct radeon_device *rdev); | 103 | int r100_debugfs_mc_info_init(struct radeon_device *rdev); |
104 | int r100_gui_wait_for_idle(struct radeon_device *rdev); | 104 | int r100_gui_wait_for_idle(struct radeon_device *rdev); |
105 | void r100_gpu_lockup_update(struct r100_gpu_lockup *lockup, | ||
106 | struct radeon_cp *cp); | ||
107 | bool r100_gpu_cp_is_lockup(struct radeon_device *rdev, | ||
108 | struct r100_gpu_lockup *lockup, | ||
109 | struct radeon_cp *cp); | ||
105 | void r100_ib_fini(struct radeon_device *rdev); | 110 | void r100_ib_fini(struct radeon_device *rdev); |
106 | int r100_ib_init(struct radeon_device *rdev); | 111 | int r100_ib_init(struct radeon_device *rdev); |
107 | void r100_irq_disable(struct radeon_device *rdev); | 112 | void r100_irq_disable(struct radeon_device *rdev); |
@@ -130,15 +135,19 @@ extern void r100_pm_prepare(struct radeon_device *rdev); | |||
130 | extern void r100_pm_finish(struct radeon_device *rdev); | 135 | extern void r100_pm_finish(struct radeon_device *rdev); |
131 | extern void r100_pm_init_profile(struct radeon_device *rdev); | 136 | extern void r100_pm_init_profile(struct radeon_device *rdev); |
132 | extern void r100_pm_get_dynpm_state(struct radeon_device *rdev); | 137 | extern void r100_pm_get_dynpm_state(struct radeon_device *rdev); |
138 | extern void r100_pre_page_flip(struct radeon_device *rdev, int crtc); | ||
139 | extern u32 r100_page_flip(struct radeon_device *rdev, int crtc, u64 crtc_base); | ||
140 | extern void r100_post_page_flip(struct radeon_device *rdev, int crtc); | ||
133 | 141 | ||
134 | /* | 142 | /* |
135 | * r200,rv250,rs300,rv280 | 143 | * r200,rv250,rs300,rv280 |
136 | */ | 144 | */ |
137 | extern int r200_copy_dma(struct radeon_device *rdev, | 145 | extern int r200_copy_dma(struct radeon_device *rdev, |
138 | uint64_t src_offset, | 146 | uint64_t src_offset, |
139 | uint64_t dst_offset, | 147 | uint64_t dst_offset, |
140 | unsigned num_pages, | 148 | unsigned num_pages, |
141 | struct radeon_fence *fence); | 149 | struct radeon_fence *fence); |
150 | void r200_set_safe_registers(struct radeon_device *rdev); | ||
142 | 151 | ||
143 | /* | 152 | /* |
144 | * r300,r350,rv350,rv380 | 153 | * r300,r350,rv350,rv380 |
@@ -159,6 +168,15 @@ extern uint32_t rv370_pcie_rreg(struct radeon_device *rdev, uint32_t reg); | |||
159 | extern void rv370_pcie_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v); | 168 | extern void rv370_pcie_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v); |
160 | extern void rv370_set_pcie_lanes(struct radeon_device *rdev, int lanes); | 169 | extern void rv370_set_pcie_lanes(struct radeon_device *rdev, int lanes); |
161 | extern int rv370_get_pcie_lanes(struct radeon_device *rdev); | 170 | extern int rv370_get_pcie_lanes(struct radeon_device *rdev); |
171 | extern void r300_set_reg_safe(struct radeon_device *rdev); | ||
172 | extern void r300_mc_program(struct radeon_device *rdev); | ||
173 | extern void r300_mc_init(struct radeon_device *rdev); | ||
174 | extern void r300_clock_startup(struct radeon_device *rdev); | ||
175 | extern int r300_mc_wait_for_idle(struct radeon_device *rdev); | ||
176 | extern int rv370_pcie_gart_init(struct radeon_device *rdev); | ||
177 | extern void rv370_pcie_gart_fini(struct radeon_device *rdev); | ||
178 | extern int rv370_pcie_gart_enable(struct radeon_device *rdev); | ||
179 | extern void rv370_pcie_gart_disable(struct radeon_device *rdev); | ||
162 | 180 | ||
163 | /* | 181 | /* |
164 | * r420,r423,rv410 | 182 | * r420,r423,rv410 |
@@ -168,6 +186,10 @@ extern void r420_fini(struct radeon_device *rdev); | |||
168 | extern int r420_suspend(struct radeon_device *rdev); | 186 | extern int r420_suspend(struct radeon_device *rdev); |
169 | extern int r420_resume(struct radeon_device *rdev); | 187 | extern int r420_resume(struct radeon_device *rdev); |
170 | extern void r420_pm_init_profile(struct radeon_device *rdev); | 188 | extern void r420_pm_init_profile(struct radeon_device *rdev); |
189 | extern u32 r420_mc_rreg(struct radeon_device *rdev, u32 reg); | ||
190 | extern void r420_mc_wreg(struct radeon_device *rdev, u32 reg, u32 v); | ||
191 | extern int r420_debugfs_pipes_info_init(struct radeon_device *rdev); | ||
192 | extern void r420_pipes_init(struct radeon_device *rdev); | ||
171 | 193 | ||
172 | /* | 194 | /* |
173 | * rs400,rs480 | 195 | * rs400,rs480 |
@@ -180,6 +202,12 @@ void rs400_gart_tlb_flush(struct radeon_device *rdev); | |||
180 | int rs400_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr); | 202 | int rs400_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr); |
181 | uint32_t rs400_mc_rreg(struct radeon_device *rdev, uint32_t reg); | 203 | uint32_t rs400_mc_rreg(struct radeon_device *rdev, uint32_t reg); |
182 | void rs400_mc_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v); | 204 | void rs400_mc_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v); |
205 | int rs400_gart_init(struct radeon_device *rdev); | ||
206 | int rs400_gart_enable(struct radeon_device *rdev); | ||
207 | void rs400_gart_adjust_size(struct radeon_device *rdev); | ||
208 | void rs400_gart_disable(struct radeon_device *rdev); | ||
209 | void rs400_gart_fini(struct radeon_device *rdev); | ||
210 | |||
183 | 211 | ||
184 | /* | 212 | /* |
185 | * rs600. | 213 | * rs600. |
@@ -191,6 +219,7 @@ extern int rs600_suspend(struct radeon_device *rdev); | |||
191 | extern int rs600_resume(struct radeon_device *rdev); | 219 | extern int rs600_resume(struct radeon_device *rdev); |
192 | int rs600_irq_set(struct radeon_device *rdev); | 220 | int rs600_irq_set(struct radeon_device *rdev); |
193 | int rs600_irq_process(struct radeon_device *rdev); | 221 | int rs600_irq_process(struct radeon_device *rdev); |
222 | void rs600_irq_disable(struct radeon_device *rdev); | ||
194 | u32 rs600_get_vblank_counter(struct radeon_device *rdev, int crtc); | 223 | u32 rs600_get_vblank_counter(struct radeon_device *rdev, int crtc); |
195 | void rs600_gart_tlb_flush(struct radeon_device *rdev); | 224 | void rs600_gart_tlb_flush(struct radeon_device *rdev); |
196 | int rs600_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr); | 225 | int rs600_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr); |
@@ -205,6 +234,11 @@ void rs600_hpd_set_polarity(struct radeon_device *rdev, | |||
205 | extern void rs600_pm_misc(struct radeon_device *rdev); | 234 | extern void rs600_pm_misc(struct radeon_device *rdev); |
206 | extern void rs600_pm_prepare(struct radeon_device *rdev); | 235 | extern void rs600_pm_prepare(struct radeon_device *rdev); |
207 | extern void rs600_pm_finish(struct radeon_device *rdev); | 236 | extern void rs600_pm_finish(struct radeon_device *rdev); |
237 | extern void rs600_pre_page_flip(struct radeon_device *rdev, int crtc); | ||
238 | extern u32 rs600_page_flip(struct radeon_device *rdev, int crtc, u64 crtc_base); | ||
239 | extern void rs600_post_page_flip(struct radeon_device *rdev, int crtc); | ||
240 | void rs600_set_safe_registers(struct radeon_device *rdev); | ||
241 | |||
208 | 242 | ||
209 | /* | 243 | /* |
210 | * rs690,rs740 | 244 | * rs690,rs740 |
@@ -216,10 +250,21 @@ int rs690_suspend(struct radeon_device *rdev); | |||
216 | uint32_t rs690_mc_rreg(struct radeon_device *rdev, uint32_t reg); | 250 | uint32_t rs690_mc_rreg(struct radeon_device *rdev, uint32_t reg); |
217 | void rs690_mc_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v); | 251 | void rs690_mc_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v); |
218 | void rs690_bandwidth_update(struct radeon_device *rdev); | 252 | void rs690_bandwidth_update(struct radeon_device *rdev); |
253 | void rs690_line_buffer_adjust(struct radeon_device *rdev, | ||
254 | struct drm_display_mode *mode1, | ||
255 | struct drm_display_mode *mode2); | ||
219 | 256 | ||
220 | /* | 257 | /* |
221 | * rv515 | 258 | * rv515 |
222 | */ | 259 | */ |
260 | struct rv515_mc_save { | ||
261 | u32 d1vga_control; | ||
262 | u32 d2vga_control; | ||
263 | u32 vga_render_control; | ||
264 | u32 vga_hdp_control; | ||
265 | u32 d1crtc_control; | ||
266 | u32 d2crtc_control; | ||
267 | }; | ||
223 | int rv515_init(struct radeon_device *rdev); | 268 | int rv515_init(struct radeon_device *rdev); |
224 | void rv515_fini(struct radeon_device *rdev); | 269 | void rv515_fini(struct radeon_device *rdev); |
225 | uint32_t rv515_mc_rreg(struct radeon_device *rdev, uint32_t reg); | 270 | uint32_t rv515_mc_rreg(struct radeon_device *rdev, uint32_t reg); |
@@ -230,6 +275,14 @@ void rv515_pcie_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v); | |||
230 | void rv515_bandwidth_update(struct radeon_device *rdev); | 275 | void rv515_bandwidth_update(struct radeon_device *rdev); |
231 | int rv515_resume(struct radeon_device *rdev); | 276 | int rv515_resume(struct radeon_device *rdev); |
232 | int rv515_suspend(struct radeon_device *rdev); | 277 | int rv515_suspend(struct radeon_device *rdev); |
278 | void rv515_bandwidth_avivo_update(struct radeon_device *rdev); | ||
279 | void rv515_vga_render_disable(struct radeon_device *rdev); | ||
280 | void rv515_set_safe_registers(struct radeon_device *rdev); | ||
281 | void rv515_mc_stop(struct radeon_device *rdev, struct rv515_mc_save *save); | ||
282 | void rv515_mc_resume(struct radeon_device *rdev, struct rv515_mc_save *save); | ||
283 | void rv515_clock_startup(struct radeon_device *rdev); | ||
284 | void rv515_debugfs(struct radeon_device *rdev); | ||
285 | |||
233 | 286 | ||
234 | /* | 287 | /* |
235 | * r520,rv530,rv560,rv570,r580 | 288 | * r520,rv530,rv560,rv570,r580 |
@@ -278,6 +331,8 @@ extern void r600_pm_misc(struct radeon_device *rdev); | |||
278 | extern void r600_pm_init_profile(struct radeon_device *rdev); | 331 | extern void r600_pm_init_profile(struct radeon_device *rdev); |
279 | extern void rs780_pm_init_profile(struct radeon_device *rdev); | 332 | extern void rs780_pm_init_profile(struct radeon_device *rdev); |
280 | extern void r600_pm_get_dynpm_state(struct radeon_device *rdev); | 333 | extern void r600_pm_get_dynpm_state(struct radeon_device *rdev); |
334 | extern void r600_set_pcie_lanes(struct radeon_device *rdev, int lanes); | ||
335 | extern int r600_get_pcie_lanes(struct radeon_device *rdev); | ||
281 | 336 | ||
282 | /* | 337 | /* |
283 | * rv770,rv730,rv710,rv740 | 338 | * rv770,rv730,rv710,rv740 |
@@ -287,6 +342,7 @@ void rv770_fini(struct radeon_device *rdev); | |||
287 | int rv770_suspend(struct radeon_device *rdev); | 342 | int rv770_suspend(struct radeon_device *rdev); |
288 | int rv770_resume(struct radeon_device *rdev); | 343 | int rv770_resume(struct radeon_device *rdev); |
289 | extern void rv770_pm_misc(struct radeon_device *rdev); | 344 | extern void rv770_pm_misc(struct radeon_device *rdev); |
345 | extern u32 rv770_page_flip(struct radeon_device *rdev, int crtc, u64 crtc_base); | ||
290 | 346 | ||
291 | /* | 347 | /* |
292 | * evergreen | 348 | * evergreen |
@@ -314,5 +370,8 @@ extern int evergreen_cs_parse(struct radeon_cs_parser *p); | |||
314 | extern void evergreen_pm_misc(struct radeon_device *rdev); | 370 | extern void evergreen_pm_misc(struct radeon_device *rdev); |
315 | extern void evergreen_pm_prepare(struct radeon_device *rdev); | 371 | extern void evergreen_pm_prepare(struct radeon_device *rdev); |
316 | extern void evergreen_pm_finish(struct radeon_device *rdev); | 372 | extern void evergreen_pm_finish(struct radeon_device *rdev); |
373 | extern void evergreen_pre_page_flip(struct radeon_device *rdev, int crtc); | ||
374 | extern u32 evergreen_page_flip(struct radeon_device *rdev, int crtc, u64 crtc_base); | ||
375 | extern void evergreen_post_page_flip(struct radeon_device *rdev, int crtc); | ||
317 | 376 | ||
318 | #endif | 377 | #endif |