diff options
author | Christian König <deathsimple@vodafone.de> | 2011-09-23 09:11:23 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-12-20 14:49:46 -0500 |
commit | 7b1f2485db253aaa0081e1c5213533e166130732 (patch) | |
tree | 77f7e6517d67501108feedfa029f4ea8549a9642 /drivers/gpu/drm/radeon/radeon_asic.h | |
parent | 15d3332f31afd571a6d23971dbc8d8db2856e661 (diff) |
drm/radeon: make all functions work with multiple rings.
Give all asic and radeon_ring_* functions a
radeon_cp parameter, so they know the ring to work with.
Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_asic.h')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_asic.h | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_asic.h b/drivers/gpu/drm/radeon/radeon_asic.h index 6b589d5ae436..4f8447557298 100644 --- a/drivers/gpu/drm/radeon/radeon_asic.h +++ b/drivers/gpu/drm/radeon/radeon_asic.h | |||
@@ -58,20 +58,21 @@ void r100_fini(struct radeon_device *rdev); | |||
58 | int r100_suspend(struct radeon_device *rdev); | 58 | int r100_suspend(struct radeon_device *rdev); |
59 | int r100_resume(struct radeon_device *rdev); | 59 | int r100_resume(struct radeon_device *rdev); |
60 | void r100_vga_set_state(struct radeon_device *rdev, bool state); | 60 | void r100_vga_set_state(struct radeon_device *rdev, bool state); |
61 | bool r100_gpu_is_lockup(struct radeon_device *rdev); | 61 | bool r100_gpu_is_lockup(struct radeon_device *rdev, struct radeon_cp *cp); |
62 | int r100_asic_reset(struct radeon_device *rdev); | 62 | int r100_asic_reset(struct radeon_device *rdev); |
63 | u32 r100_get_vblank_counter(struct radeon_device *rdev, int crtc); | 63 | u32 r100_get_vblank_counter(struct radeon_device *rdev, int crtc); |
64 | void r100_pci_gart_tlb_flush(struct radeon_device *rdev); | 64 | void r100_pci_gart_tlb_flush(struct radeon_device *rdev); |
65 | int r100_pci_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr); | 65 | int r100_pci_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr); |
66 | void r100_cp_commit(struct radeon_device *rdev); | 66 | void r100_cp_commit(struct radeon_device *rdev, struct radeon_cp *cp); |
67 | void r100_ring_start(struct radeon_device *rdev); | 67 | void r100_ring_start(struct radeon_device *rdev); |
68 | int r100_irq_set(struct radeon_device *rdev); | 68 | int r100_irq_set(struct radeon_device *rdev); |
69 | int r100_irq_process(struct radeon_device *rdev); | 69 | int r100_irq_process(struct radeon_device *rdev); |
70 | void r100_fence_ring_emit(struct radeon_device *rdev, | 70 | void r100_fence_ring_emit(struct radeon_device *rdev, |
71 | struct radeon_fence *fence); | 71 | struct radeon_fence *fence); |
72 | void r100_semaphore_ring_emit(struct radeon_device *rdev, | 72 | void r100_semaphore_ring_emit(struct radeon_device *rdev, |
73 | struct radeon_cp *cp, | ||
73 | struct radeon_semaphore *semaphore, | 74 | struct radeon_semaphore *semaphore, |
74 | unsigned ring, bool emit_wait); | 75 | bool emit_wait); |
75 | int r100_cs_parse(struct radeon_cs_parser *p); | 76 | int r100_cs_parse(struct radeon_cs_parser *p); |
76 | void r100_pll_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v); | 77 | void r100_pll_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v); |
77 | uint32_t r100_pll_rreg(struct radeon_device *rdev, uint32_t reg); | 78 | uint32_t r100_pll_rreg(struct radeon_device *rdev, uint32_t reg); |
@@ -86,7 +87,7 @@ int r100_set_surface_reg(struct radeon_device *rdev, int reg, | |||
86 | void r100_clear_surface_reg(struct radeon_device *rdev, int reg); | 87 | void r100_clear_surface_reg(struct radeon_device *rdev, int reg); |
87 | void r100_bandwidth_update(struct radeon_device *rdev); | 88 | void r100_bandwidth_update(struct radeon_device *rdev); |
88 | void r100_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib); | 89 | void r100_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib); |
89 | int r100_ring_test(struct radeon_device *rdev); | 90 | int r100_ring_test(struct radeon_device *rdev, struct radeon_cp *cp); |
90 | void r100_hpd_init(struct radeon_device *rdev); | 91 | void r100_hpd_init(struct radeon_device *rdev); |
91 | void r100_hpd_fini(struct radeon_device *rdev); | 92 | void r100_hpd_fini(struct radeon_device *rdev); |
92 | bool r100_hpd_sense(struct radeon_device *rdev, enum radeon_hpd_id hpd); | 93 | bool r100_hpd_sense(struct radeon_device *rdev, enum radeon_hpd_id hpd); |
@@ -157,7 +158,7 @@ extern int r300_init(struct radeon_device *rdev); | |||
157 | extern void r300_fini(struct radeon_device *rdev); | 158 | extern void r300_fini(struct radeon_device *rdev); |
158 | extern int r300_suspend(struct radeon_device *rdev); | 159 | extern int r300_suspend(struct radeon_device *rdev); |
159 | extern int r300_resume(struct radeon_device *rdev); | 160 | extern int r300_resume(struct radeon_device *rdev); |
160 | extern bool r300_gpu_is_lockup(struct radeon_device *rdev); | 161 | extern bool r300_gpu_is_lockup(struct radeon_device *rdev, struct radeon_cp *cp); |
161 | extern int r300_asic_reset(struct radeon_device *rdev); | 162 | extern int r300_asic_reset(struct radeon_device *rdev); |
162 | extern void r300_ring_start(struct radeon_device *rdev); | 163 | extern void r300_ring_start(struct radeon_device *rdev); |
163 | extern void r300_fence_ring_emit(struct radeon_device *rdev, | 164 | extern void r300_fence_ring_emit(struct radeon_device *rdev, |
@@ -296,7 +297,7 @@ int r600_resume(struct radeon_device *rdev); | |||
296 | void r600_vga_set_state(struct radeon_device *rdev, bool state); | 297 | void r600_vga_set_state(struct radeon_device *rdev, bool state); |
297 | int r600_wb_init(struct radeon_device *rdev); | 298 | int r600_wb_init(struct radeon_device *rdev); |
298 | void r600_wb_fini(struct radeon_device *rdev); | 299 | void r600_wb_fini(struct radeon_device *rdev); |
299 | void r600_cp_commit(struct radeon_device *rdev); | 300 | void r600_cp_commit(struct radeon_device *rdev, struct radeon_cp *cp); |
300 | void r600_pcie_gart_tlb_flush(struct radeon_device *rdev); | 301 | void r600_pcie_gart_tlb_flush(struct radeon_device *rdev); |
301 | uint32_t r600_pciep_rreg(struct radeon_device *rdev, uint32_t reg); | 302 | uint32_t r600_pciep_rreg(struct radeon_device *rdev, uint32_t reg); |
302 | void r600_pciep_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v); | 303 | void r600_pciep_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v); |
@@ -304,17 +305,18 @@ int r600_cs_parse(struct radeon_cs_parser *p); | |||
304 | void r600_fence_ring_emit(struct radeon_device *rdev, | 305 | void r600_fence_ring_emit(struct radeon_device *rdev, |
305 | struct radeon_fence *fence); | 306 | struct radeon_fence *fence); |
306 | void r600_semaphore_ring_emit(struct radeon_device *rdev, | 307 | void r600_semaphore_ring_emit(struct radeon_device *rdev, |
308 | struct radeon_cp *cp, | ||
307 | struct radeon_semaphore *semaphore, | 309 | struct radeon_semaphore *semaphore, |
308 | unsigned ring, bool emit_wait); | 310 | bool emit_wait); |
309 | bool r600_gpu_is_lockup(struct radeon_device *rdev); | 311 | bool r600_gpu_is_lockup(struct radeon_device *rdev, struct radeon_cp *cp); |
310 | int r600_asic_reset(struct radeon_device *rdev); | 312 | int r600_asic_reset(struct radeon_device *rdev); |
311 | int r600_set_surface_reg(struct radeon_device *rdev, int reg, | 313 | int r600_set_surface_reg(struct radeon_device *rdev, int reg, |
312 | uint32_t tiling_flags, uint32_t pitch, | 314 | uint32_t tiling_flags, uint32_t pitch, |
313 | uint32_t offset, uint32_t obj_size); | 315 | uint32_t offset, uint32_t obj_size); |
314 | void r600_clear_surface_reg(struct radeon_device *rdev, int reg); | 316 | void r600_clear_surface_reg(struct radeon_device *rdev, int reg); |
315 | int r600_ib_test(struct radeon_device *rdev); | 317 | int r600_ib_test(struct radeon_device *rdev, int ring); |
316 | void r600_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib); | 318 | void r600_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib); |
317 | int r600_ring_test(struct radeon_device *rdev); | 319 | int r600_ring_test(struct radeon_device *rdev, struct radeon_cp *cp); |
318 | int r600_copy_blit(struct radeon_device *rdev, | 320 | int r600_copy_blit(struct radeon_device *rdev, |
319 | uint64_t src_offset, uint64_t dst_offset, | 321 | uint64_t src_offset, uint64_t dst_offset, |
320 | unsigned num_gpu_pages, struct radeon_fence *fence); | 322 | unsigned num_gpu_pages, struct radeon_fence *fence); |
@@ -334,7 +336,7 @@ extern int r600_get_pcie_lanes(struct radeon_device *rdev); | |||
334 | bool r600_card_posted(struct radeon_device *rdev); | 336 | bool r600_card_posted(struct radeon_device *rdev); |
335 | void r600_cp_stop(struct radeon_device *rdev); | 337 | void r600_cp_stop(struct radeon_device *rdev); |
336 | int r600_cp_start(struct radeon_device *rdev); | 338 | int r600_cp_start(struct radeon_device *rdev); |
337 | void r600_ring_init(struct radeon_device *rdev, unsigned ring_size); | 339 | void r600_ring_init(struct radeon_device *rdev, struct radeon_cp *cp, unsigned ring_size); |
338 | int r600_cp_resume(struct radeon_device *rdev); | 340 | int r600_cp_resume(struct radeon_device *rdev); |
339 | void r600_cp_fini(struct radeon_device *rdev); | 341 | void r600_cp_fini(struct radeon_device *rdev); |
340 | int r600_count_pipe_bits(uint32_t val); | 342 | int r600_count_pipe_bits(uint32_t val); |
@@ -403,7 +405,7 @@ int evergreen_init(struct radeon_device *rdev); | |||
403 | void evergreen_fini(struct radeon_device *rdev); | 405 | void evergreen_fini(struct radeon_device *rdev); |
404 | int evergreen_suspend(struct radeon_device *rdev); | 406 | int evergreen_suspend(struct radeon_device *rdev); |
405 | int evergreen_resume(struct radeon_device *rdev); | 407 | int evergreen_resume(struct radeon_device *rdev); |
406 | bool evergreen_gpu_is_lockup(struct radeon_device *rdev); | 408 | bool evergreen_gpu_is_lockup(struct radeon_device *rdev, struct radeon_cp *cp); |
407 | int evergreen_asic_reset(struct radeon_device *rdev); | 409 | int evergreen_asic_reset(struct radeon_device *rdev); |
408 | void evergreen_bandwidth_update(struct radeon_device *rdev); | 410 | void evergreen_bandwidth_update(struct radeon_device *rdev); |
409 | void evergreen_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib); | 411 | void evergreen_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib); |
@@ -434,7 +436,7 @@ int cayman_init(struct radeon_device *rdev); | |||
434 | void cayman_fini(struct radeon_device *rdev); | 436 | void cayman_fini(struct radeon_device *rdev); |
435 | int cayman_suspend(struct radeon_device *rdev); | 437 | int cayman_suspend(struct radeon_device *rdev); |
436 | int cayman_resume(struct radeon_device *rdev); | 438 | int cayman_resume(struct radeon_device *rdev); |
437 | bool cayman_gpu_is_lockup(struct radeon_device *rdev); | 439 | bool cayman_gpu_is_lockup(struct radeon_device *rdev, struct radeon_cp *cp); |
438 | int cayman_asic_reset(struct radeon_device *rdev); | 440 | int cayman_asic_reset(struct radeon_device *rdev); |
439 | 441 | ||
440 | #endif | 442 | #endif |