aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_asic.h
diff options
context:
space:
mode:
authorChristian König <deathsimple@vodafone.de>2011-09-23 09:11:23 -0400
committerDave Airlie <airlied@redhat.com>2011-12-20 14:49:46 -0500
commit7b1f2485db253aaa0081e1c5213533e166130732 (patch)
tree77f7e6517d67501108feedfa029f4ea8549a9642 /drivers/gpu/drm/radeon/radeon_asic.h
parent15d3332f31afd571a6d23971dbc8d8db2856e661 (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.h28
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);
58int r100_suspend(struct radeon_device *rdev); 58int r100_suspend(struct radeon_device *rdev);
59int r100_resume(struct radeon_device *rdev); 59int r100_resume(struct radeon_device *rdev);
60void r100_vga_set_state(struct radeon_device *rdev, bool state); 60void r100_vga_set_state(struct radeon_device *rdev, bool state);
61bool r100_gpu_is_lockup(struct radeon_device *rdev); 61bool r100_gpu_is_lockup(struct radeon_device *rdev, struct radeon_cp *cp);
62int r100_asic_reset(struct radeon_device *rdev); 62int r100_asic_reset(struct radeon_device *rdev);
63u32 r100_get_vblank_counter(struct radeon_device *rdev, int crtc); 63u32 r100_get_vblank_counter(struct radeon_device *rdev, int crtc);
64void r100_pci_gart_tlb_flush(struct radeon_device *rdev); 64void r100_pci_gart_tlb_flush(struct radeon_device *rdev);
65int r100_pci_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr); 65int r100_pci_gart_set_page(struct radeon_device *rdev, int i, uint64_t addr);
66void r100_cp_commit(struct radeon_device *rdev); 66void r100_cp_commit(struct radeon_device *rdev, struct radeon_cp *cp);
67void r100_ring_start(struct radeon_device *rdev); 67void r100_ring_start(struct radeon_device *rdev);
68int r100_irq_set(struct radeon_device *rdev); 68int r100_irq_set(struct radeon_device *rdev);
69int r100_irq_process(struct radeon_device *rdev); 69int r100_irq_process(struct radeon_device *rdev);
70void r100_fence_ring_emit(struct radeon_device *rdev, 70void r100_fence_ring_emit(struct radeon_device *rdev,
71 struct radeon_fence *fence); 71 struct radeon_fence *fence);
72void r100_semaphore_ring_emit(struct radeon_device *rdev, 72void 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);
75int r100_cs_parse(struct radeon_cs_parser *p); 76int r100_cs_parse(struct radeon_cs_parser *p);
76void r100_pll_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v); 77void r100_pll_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v);
77uint32_t r100_pll_rreg(struct radeon_device *rdev, uint32_t reg); 78uint32_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,
86void r100_clear_surface_reg(struct radeon_device *rdev, int reg); 87void r100_clear_surface_reg(struct radeon_device *rdev, int reg);
87void r100_bandwidth_update(struct radeon_device *rdev); 88void r100_bandwidth_update(struct radeon_device *rdev);
88void r100_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib); 89void r100_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib);
89int r100_ring_test(struct radeon_device *rdev); 90int r100_ring_test(struct radeon_device *rdev, struct radeon_cp *cp);
90void r100_hpd_init(struct radeon_device *rdev); 91void r100_hpd_init(struct radeon_device *rdev);
91void r100_hpd_fini(struct radeon_device *rdev); 92void r100_hpd_fini(struct radeon_device *rdev);
92bool r100_hpd_sense(struct radeon_device *rdev, enum radeon_hpd_id hpd); 93bool r100_hpd_sense(struct radeon_device *rdev, enum radeon_hpd_id hpd);
@@ -157,7 +158,7 @@ extern int r300_init(struct radeon_device *rdev);
157extern void r300_fini(struct radeon_device *rdev); 158extern void r300_fini(struct radeon_device *rdev);
158extern int r300_suspend(struct radeon_device *rdev); 159extern int r300_suspend(struct radeon_device *rdev);
159extern int r300_resume(struct radeon_device *rdev); 160extern int r300_resume(struct radeon_device *rdev);
160extern bool r300_gpu_is_lockup(struct radeon_device *rdev); 161extern bool r300_gpu_is_lockup(struct radeon_device *rdev, struct radeon_cp *cp);
161extern int r300_asic_reset(struct radeon_device *rdev); 162extern int r300_asic_reset(struct radeon_device *rdev);
162extern void r300_ring_start(struct radeon_device *rdev); 163extern void r300_ring_start(struct radeon_device *rdev);
163extern void r300_fence_ring_emit(struct radeon_device *rdev, 164extern void r300_fence_ring_emit(struct radeon_device *rdev,
@@ -296,7 +297,7 @@ int r600_resume(struct radeon_device *rdev);
296void r600_vga_set_state(struct radeon_device *rdev, bool state); 297void r600_vga_set_state(struct radeon_device *rdev, bool state);
297int r600_wb_init(struct radeon_device *rdev); 298int r600_wb_init(struct radeon_device *rdev);
298void r600_wb_fini(struct radeon_device *rdev); 299void r600_wb_fini(struct radeon_device *rdev);
299void r600_cp_commit(struct radeon_device *rdev); 300void r600_cp_commit(struct radeon_device *rdev, struct radeon_cp *cp);
300void r600_pcie_gart_tlb_flush(struct radeon_device *rdev); 301void r600_pcie_gart_tlb_flush(struct radeon_device *rdev);
301uint32_t r600_pciep_rreg(struct radeon_device *rdev, uint32_t reg); 302uint32_t r600_pciep_rreg(struct radeon_device *rdev, uint32_t reg);
302void r600_pciep_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v); 303void 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);
304void r600_fence_ring_emit(struct radeon_device *rdev, 305void r600_fence_ring_emit(struct radeon_device *rdev,
305 struct radeon_fence *fence); 306 struct radeon_fence *fence);
306void r600_semaphore_ring_emit(struct radeon_device *rdev, 307void 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);
309bool r600_gpu_is_lockup(struct radeon_device *rdev); 311bool r600_gpu_is_lockup(struct radeon_device *rdev, struct radeon_cp *cp);
310int r600_asic_reset(struct radeon_device *rdev); 312int r600_asic_reset(struct radeon_device *rdev);
311int r600_set_surface_reg(struct radeon_device *rdev, int reg, 313int 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);
314void r600_clear_surface_reg(struct radeon_device *rdev, int reg); 316void r600_clear_surface_reg(struct radeon_device *rdev, int reg);
315int r600_ib_test(struct radeon_device *rdev); 317int r600_ib_test(struct radeon_device *rdev, int ring);
316void r600_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib); 318void r600_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib);
317int r600_ring_test(struct radeon_device *rdev); 319int r600_ring_test(struct radeon_device *rdev, struct radeon_cp *cp);
318int r600_copy_blit(struct radeon_device *rdev, 320int 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);
334bool r600_card_posted(struct radeon_device *rdev); 336bool r600_card_posted(struct radeon_device *rdev);
335void r600_cp_stop(struct radeon_device *rdev); 337void r600_cp_stop(struct radeon_device *rdev);
336int r600_cp_start(struct radeon_device *rdev); 338int r600_cp_start(struct radeon_device *rdev);
337void r600_ring_init(struct radeon_device *rdev, unsigned ring_size); 339void r600_ring_init(struct radeon_device *rdev, struct radeon_cp *cp, unsigned ring_size);
338int r600_cp_resume(struct radeon_device *rdev); 340int r600_cp_resume(struct radeon_device *rdev);
339void r600_cp_fini(struct radeon_device *rdev); 341void r600_cp_fini(struct radeon_device *rdev);
340int r600_count_pipe_bits(uint32_t val); 342int r600_count_pipe_bits(uint32_t val);
@@ -403,7 +405,7 @@ int evergreen_init(struct radeon_device *rdev);
403void evergreen_fini(struct radeon_device *rdev); 405void evergreen_fini(struct radeon_device *rdev);
404int evergreen_suspend(struct radeon_device *rdev); 406int evergreen_suspend(struct radeon_device *rdev);
405int evergreen_resume(struct radeon_device *rdev); 407int evergreen_resume(struct radeon_device *rdev);
406bool evergreen_gpu_is_lockup(struct radeon_device *rdev); 408bool evergreen_gpu_is_lockup(struct radeon_device *rdev, struct radeon_cp *cp);
407int evergreen_asic_reset(struct radeon_device *rdev); 409int evergreen_asic_reset(struct radeon_device *rdev);
408void evergreen_bandwidth_update(struct radeon_device *rdev); 410void evergreen_bandwidth_update(struct radeon_device *rdev);
409void evergreen_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib); 411void evergreen_ring_ib_execute(struct radeon_device *rdev, struct radeon_ib *ib);
@@ -434,7 +436,7 @@ int cayman_init(struct radeon_device *rdev);
434void cayman_fini(struct radeon_device *rdev); 436void cayman_fini(struct radeon_device *rdev);
435int cayman_suspend(struct radeon_device *rdev); 437int cayman_suspend(struct radeon_device *rdev);
436int cayman_resume(struct radeon_device *rdev); 438int cayman_resume(struct radeon_device *rdev);
437bool cayman_gpu_is_lockup(struct radeon_device *rdev); 439bool cayman_gpu_is_lockup(struct radeon_device *rdev, struct radeon_cp *cp);
438int cayman_asic_reset(struct radeon_device *rdev); 440int cayman_asic_reset(struct radeon_device *rdev);
439 441
440#endif 442#endif