aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_asic.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_asic.h')
-rw-r--r--drivers/gpu/drm/radeon/radeon_asic.h65
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);
102void r100_pci_gart_disable(struct radeon_device *rdev); 102void r100_pci_gart_disable(struct radeon_device *rdev);
103int r100_debugfs_mc_info_init(struct radeon_device *rdev); 103int r100_debugfs_mc_info_init(struct radeon_device *rdev);
104int r100_gui_wait_for_idle(struct radeon_device *rdev); 104int r100_gui_wait_for_idle(struct radeon_device *rdev);
105void r100_gpu_lockup_update(struct r100_gpu_lockup *lockup,
106 struct radeon_cp *cp);
107bool r100_gpu_cp_is_lockup(struct radeon_device *rdev,
108 struct r100_gpu_lockup *lockup,
109 struct radeon_cp *cp);
105void r100_ib_fini(struct radeon_device *rdev); 110void r100_ib_fini(struct radeon_device *rdev);
106int r100_ib_init(struct radeon_device *rdev); 111int r100_ib_init(struct radeon_device *rdev);
107void r100_irq_disable(struct radeon_device *rdev); 112void r100_irq_disable(struct radeon_device *rdev);
@@ -130,15 +135,19 @@ extern void r100_pm_prepare(struct radeon_device *rdev);
130extern void r100_pm_finish(struct radeon_device *rdev); 135extern void r100_pm_finish(struct radeon_device *rdev);
131extern void r100_pm_init_profile(struct radeon_device *rdev); 136extern void r100_pm_init_profile(struct radeon_device *rdev);
132extern void r100_pm_get_dynpm_state(struct radeon_device *rdev); 137extern void r100_pm_get_dynpm_state(struct radeon_device *rdev);
138extern void r100_pre_page_flip(struct radeon_device *rdev, int crtc);
139extern u32 r100_page_flip(struct radeon_device *rdev, int crtc, u64 crtc_base);
140extern 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 */
137extern int r200_copy_dma(struct radeon_device *rdev, 145extern 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);
150void 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);
159extern void rv370_pcie_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v); 168extern void rv370_pcie_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v);
160extern void rv370_set_pcie_lanes(struct radeon_device *rdev, int lanes); 169extern void rv370_set_pcie_lanes(struct radeon_device *rdev, int lanes);
161extern int rv370_get_pcie_lanes(struct radeon_device *rdev); 170extern int rv370_get_pcie_lanes(struct radeon_device *rdev);
171extern void r300_set_reg_safe(struct radeon_device *rdev);
172extern void r300_mc_program(struct radeon_device *rdev);
173extern void r300_mc_init(struct radeon_device *rdev);
174extern void r300_clock_startup(struct radeon_device *rdev);
175extern int r300_mc_wait_for_idle(struct radeon_device *rdev);
176extern int rv370_pcie_gart_init(struct radeon_device *rdev);
177extern void rv370_pcie_gart_fini(struct radeon_device *rdev);
178extern int rv370_pcie_gart_enable(struct radeon_device *rdev);
179extern 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);
168extern int r420_suspend(struct radeon_device *rdev); 186extern int r420_suspend(struct radeon_device *rdev);
169extern int r420_resume(struct radeon_device *rdev); 187extern int r420_resume(struct radeon_device *rdev);
170extern void r420_pm_init_profile(struct radeon_device *rdev); 188extern void r420_pm_init_profile(struct radeon_device *rdev);
189extern u32 r420_mc_rreg(struct radeon_device *rdev, u32 reg);
190extern void r420_mc_wreg(struct radeon_device *rdev, u32 reg, u32 v);
191extern int r420_debugfs_pipes_info_init(struct radeon_device *rdev);
192extern 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);
180int rs400_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr); 202int rs400_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr);
181uint32_t rs400_mc_rreg(struct radeon_device *rdev, uint32_t reg); 203uint32_t rs400_mc_rreg(struct radeon_device *rdev, uint32_t reg);
182void rs400_mc_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v); 204void rs400_mc_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v);
205int rs400_gart_init(struct radeon_device *rdev);
206int rs400_gart_enable(struct radeon_device *rdev);
207void rs400_gart_adjust_size(struct radeon_device *rdev);
208void rs400_gart_disable(struct radeon_device *rdev);
209void 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);
191extern int rs600_resume(struct radeon_device *rdev); 219extern int rs600_resume(struct radeon_device *rdev);
192int rs600_irq_set(struct radeon_device *rdev); 220int rs600_irq_set(struct radeon_device *rdev);
193int rs600_irq_process(struct radeon_device *rdev); 221int rs600_irq_process(struct radeon_device *rdev);
222void rs600_irq_disable(struct radeon_device *rdev);
194u32 rs600_get_vblank_counter(struct radeon_device *rdev, int crtc); 223u32 rs600_get_vblank_counter(struct radeon_device *rdev, int crtc);
195void rs600_gart_tlb_flush(struct radeon_device *rdev); 224void rs600_gart_tlb_flush(struct radeon_device *rdev);
196int rs600_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr); 225int 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,
205extern void rs600_pm_misc(struct radeon_device *rdev); 234extern void rs600_pm_misc(struct radeon_device *rdev);
206extern void rs600_pm_prepare(struct radeon_device *rdev); 235extern void rs600_pm_prepare(struct radeon_device *rdev);
207extern void rs600_pm_finish(struct radeon_device *rdev); 236extern void rs600_pm_finish(struct radeon_device *rdev);
237extern void rs600_pre_page_flip(struct radeon_device *rdev, int crtc);
238extern u32 rs600_page_flip(struct radeon_device *rdev, int crtc, u64 crtc_base);
239extern void rs600_post_page_flip(struct radeon_device *rdev, int crtc);
240void 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);
216uint32_t rs690_mc_rreg(struct radeon_device *rdev, uint32_t reg); 250uint32_t rs690_mc_rreg(struct radeon_device *rdev, uint32_t reg);
217void rs690_mc_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v); 251void rs690_mc_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v);
218void rs690_bandwidth_update(struct radeon_device *rdev); 252void rs690_bandwidth_update(struct radeon_device *rdev);
253void 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 */
260struct 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};
223int rv515_init(struct radeon_device *rdev); 268int rv515_init(struct radeon_device *rdev);
224void rv515_fini(struct radeon_device *rdev); 269void rv515_fini(struct radeon_device *rdev);
225uint32_t rv515_mc_rreg(struct radeon_device *rdev, uint32_t reg); 270uint32_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);
230void rv515_bandwidth_update(struct radeon_device *rdev); 275void rv515_bandwidth_update(struct radeon_device *rdev);
231int rv515_resume(struct radeon_device *rdev); 276int rv515_resume(struct radeon_device *rdev);
232int rv515_suspend(struct radeon_device *rdev); 277int rv515_suspend(struct radeon_device *rdev);
278void rv515_bandwidth_avivo_update(struct radeon_device *rdev);
279void rv515_vga_render_disable(struct radeon_device *rdev);
280void rv515_set_safe_registers(struct radeon_device *rdev);
281void rv515_mc_stop(struct radeon_device *rdev, struct rv515_mc_save *save);
282void rv515_mc_resume(struct radeon_device *rdev, struct rv515_mc_save *save);
283void rv515_clock_startup(struct radeon_device *rdev);
284void 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);
278extern void r600_pm_init_profile(struct radeon_device *rdev); 331extern void r600_pm_init_profile(struct radeon_device *rdev);
279extern void rs780_pm_init_profile(struct radeon_device *rdev); 332extern void rs780_pm_init_profile(struct radeon_device *rdev);
280extern void r600_pm_get_dynpm_state(struct radeon_device *rdev); 333extern void r600_pm_get_dynpm_state(struct radeon_device *rdev);
334extern void r600_set_pcie_lanes(struct radeon_device *rdev, int lanes);
335extern 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);
287int rv770_suspend(struct radeon_device *rdev); 342int rv770_suspend(struct radeon_device *rdev);
288int rv770_resume(struct radeon_device *rdev); 343int rv770_resume(struct radeon_device *rdev);
289extern void rv770_pm_misc(struct radeon_device *rdev); 344extern void rv770_pm_misc(struct radeon_device *rdev);
345extern 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);
314extern void evergreen_pm_misc(struct radeon_device *rdev); 370extern void evergreen_pm_misc(struct radeon_device *rdev);
315extern void evergreen_pm_prepare(struct radeon_device *rdev); 371extern void evergreen_pm_prepare(struct radeon_device *rdev);
316extern void evergreen_pm_finish(struct radeon_device *rdev); 372extern void evergreen_pm_finish(struct radeon_device *rdev);
373extern void evergreen_pre_page_flip(struct radeon_device *rdev, int crtc);
374extern u32 evergreen_page_flip(struct radeon_device *rdev, int crtc, u64 crtc_base);
375extern void evergreen_post_page_flip(struct radeon_device *rdev, int crtc);
317 376
318#endif 377#endif