aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon.h
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2012-02-23 17:53:42 -0500
committerDave Airlie <airlied@redhat.com>2012-02-29 05:14:14 -0500
commit27cd77694bfa2e123cb7440507f8ddd762de6c38 (patch)
tree5637c08e93bbd589cb684388be7420a87b28948e /drivers/gpu/drm/radeon/radeon.h
parent293f9fd53aa1529500ba16d89850100a058b11c1 (diff)
drm/radeon/kms: reorganize copy callbacks
tidy up the radeon_asic struct, handle multiple rings better. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König<christian.koenig@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon.h')
-rw-r--r--drivers/gpu/drm/radeon/radeon.h50
1 files changed, 30 insertions, 20 deletions
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
index 80548b6a86a1..b4dea5c79847 100644
--- a/drivers/gpu/drm/radeon/radeon.h
+++ b/drivers/gpu/drm/radeon/radeon.h
@@ -1154,21 +1154,30 @@ struct radeon_asic {
1154 int (*irq_set)(struct radeon_device *rdev); 1154 int (*irq_set)(struct radeon_device *rdev);
1155 int (*irq_process)(struct radeon_device *rdev); 1155 int (*irq_process)(struct radeon_device *rdev);
1156 u32 (*get_vblank_counter)(struct radeon_device *rdev, int crtc); 1156 u32 (*get_vblank_counter)(struct radeon_device *rdev, int crtc);
1157 int (*copy_blit)(struct radeon_device *rdev, 1157
1158 uint64_t src_offset, 1158 struct {
1159 uint64_t dst_offset, 1159 int (*blit)(struct radeon_device *rdev,
1160 unsigned num_gpu_pages, 1160 uint64_t src_offset,
1161 struct radeon_fence *fence); 1161 uint64_t dst_offset,
1162 int (*copy_dma)(struct radeon_device *rdev, 1162 unsigned num_gpu_pages,
1163 uint64_t src_offset, 1163 struct radeon_fence *fence);
1164 uint64_t dst_offset, 1164 u32 blit_ring_index;
1165 unsigned num_gpu_pages, 1165 int (*dma)(struct radeon_device *rdev,
1166 struct radeon_fence *fence); 1166 uint64_t src_offset,
1167 int (*copy)(struct radeon_device *rdev, 1167 uint64_t dst_offset,
1168 uint64_t src_offset, 1168 unsigned num_gpu_pages,
1169 uint64_t dst_offset, 1169 struct radeon_fence *fence);
1170 unsigned num_gpu_pages, 1170 u32 dma_ring_index;
1171 struct radeon_fence *fence); 1171 /* method used for bo copy */
1172 int (*copy)(struct radeon_device *rdev,
1173 uint64_t src_offset,
1174 uint64_t dst_offset,
1175 unsigned num_gpu_pages,
1176 struct radeon_fence *fence);
1177 /* ring used for bo copies */
1178 u32 copy_ring_index;
1179 } copy;
1180
1172 uint32_t (*get_engine_clock)(struct radeon_device *rdev); 1181 uint32_t (*get_engine_clock)(struct radeon_device *rdev);
1173 void (*set_engine_clock)(struct radeon_device *rdev, uint32_t eng_clock); 1182 void (*set_engine_clock)(struct radeon_device *rdev, uint32_t eng_clock);
1174 uint32_t (*get_memory_clock)(struct radeon_device *rdev); 1183 uint32_t (*get_memory_clock)(struct radeon_device *rdev);
@@ -1505,8 +1514,6 @@ struct radeon_device {
1505 unsigned debugfs_count; 1514 unsigned debugfs_count;
1506 /* virtual memory */ 1515 /* virtual memory */
1507 struct radeon_vm_manager vm_manager; 1516 struct radeon_vm_manager vm_manager;
1508 /* ring used for bo copies */
1509 u32 copy_ring;
1510}; 1517};
1511 1518
1512int radeon_device_init(struct radeon_device *rdev, 1519int radeon_device_init(struct radeon_device *rdev,
@@ -1677,9 +1684,12 @@ void radeon_ring_write(struct radeon_ring *ring, uint32_t v);
1677#define radeon_get_vblank_counter(rdev, crtc) (rdev)->asic->get_vblank_counter((rdev), (crtc)) 1684#define radeon_get_vblank_counter(rdev, crtc) (rdev)->asic->get_vblank_counter((rdev), (crtc))
1678#define radeon_fence_ring_emit(rdev, r, fence) (rdev)->asic->ring[(r)].emit_fence((rdev), (fence)) 1685#define radeon_fence_ring_emit(rdev, r, fence) (rdev)->asic->ring[(r)].emit_fence((rdev), (fence))
1679#define radeon_semaphore_ring_emit(rdev, r, cp, semaphore, emit_wait) (rdev)->asic->ring[(r)].emit_semaphore((rdev), (cp), (semaphore), (emit_wait)) 1686#define radeon_semaphore_ring_emit(rdev, r, cp, semaphore, emit_wait) (rdev)->asic->ring[(r)].emit_semaphore((rdev), (cp), (semaphore), (emit_wait))
1680#define radeon_copy_blit(rdev, s, d, np, f) (rdev)->asic->copy_blit((rdev), (s), (d), (np), (f)) 1687#define radeon_copy_blit(rdev, s, d, np, f) (rdev)->asic->copy.blit((rdev), (s), (d), (np), (f))
1681#define radeon_copy_dma(rdev, s, d, np, f) (rdev)->asic->copy_dma((rdev), (s), (d), (np), (f)) 1688#define radeon_copy_dma(rdev, s, d, np, f) (rdev)->asic->copy.dma((rdev), (s), (d), (np), (f))
1682#define radeon_copy(rdev, s, d, np, f) (rdev)->asic->copy((rdev), (s), (d), (np), (f)) 1689#define radeon_copy(rdev, s, d, np, f) (rdev)->asic->copy.copy((rdev), (s), (d), (np), (f))
1690#define radeon_copy_blit_ring_index(rdev) (rdev)->asic->copy.blit_ring_index
1691#define radeon_copy_dma_ring_index(rdev) (rdev)->asic->copy.dma_ring_index
1692#define radeon_copy_ring_index(rdev) (rdev)->asic->copy.copy_ring_index
1683#define radeon_get_engine_clock(rdev) (rdev)->asic->get_engine_clock((rdev)) 1693#define radeon_get_engine_clock(rdev) (rdev)->asic->get_engine_clock((rdev))
1684#define radeon_set_engine_clock(rdev, e) (rdev)->asic->set_engine_clock((rdev), (e)) 1694#define radeon_set_engine_clock(rdev, e) (rdev)->asic->set_engine_clock((rdev), (e))
1685#define radeon_get_memory_clock(rdev) (rdev)->asic->get_memory_clock((rdev)) 1695#define radeon_get_memory_clock(rdev) (rdev)->asic->get_memory_clock((rdev))