aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon.h
diff options
context:
space:
mode:
authorIlija Hadzic <ihadzic@research.bell-labs.com>2011-10-12 23:29:40 -0400
committerDave Airlie <airlied@redhat.com>2011-10-18 05:06:24 -0400
commit8eec9d6f74271fb69770b9fa3fa7d3659128720b (patch)
treea1f4a28a619c3ef20ac769c5b2f826ebe13a7fbe /drivers/gpu/drm/radeon/radeon.h
parent638dd7db599de8c49cfaf9aca9d64d9a0649ff46 (diff)
drm/radeon/kms: cleanup r600 blit code
reorganize the code such that only the primitives (i.e., the functions that load the CP ring) are hardware specific; dynamically link the primitives in a (new) pointer structure inside r600_blit at blit initialization time so that the functions that control the blit operations can be made common for r600 and evergreen parts Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.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.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
index 9f6d206104d..6b1d09904e1 100644
--- a/drivers/gpu/drm/radeon/radeon.h
+++ b/drivers/gpu/drm/radeon/radeon.h
@@ -522,9 +522,30 @@ struct r600_ih {
522 bool enabled; 522 bool enabled;
523}; 523};
524 524
525struct r600_blit_cp_primitives {
526 void (*set_render_target)(struct radeon_device *rdev, int format,
527 int w, int h, u64 gpu_addr);
528 void (*cp_set_surface_sync)(struct radeon_device *rdev,
529 u32 sync_type, u32 size,
530 u64 mc_addr);
531 void (*set_shaders)(struct radeon_device *rdev);
532 void (*set_vtx_resource)(struct radeon_device *rdev, u64 gpu_addr);
533 void (*set_tex_resource)(struct radeon_device *rdev,
534 int format, int w, int h, int pitch,
535 u64 gpu_addr);
536 void (*set_scissors)(struct radeon_device *rdev, int x1, int y1,
537 int x2, int y2);
538 void (*draw_auto)(struct radeon_device *rdev);
539 void (*set_default_state)(struct radeon_device *rdev);
540};
541
525struct r600_blit { 542struct r600_blit {
526 struct mutex mutex; 543 struct mutex mutex;
527 struct radeon_bo *shader_obj; 544 struct radeon_bo *shader_obj;
545 struct r600_blit_cp_primitives primitives;
546 int max_dim;
547 int ring_size_common;
548 int ring_size_per_loop;
528 u64 shader_gpu_addr; 549 u64 shader_gpu_addr;
529 u32 vs_offset, ps_offset; 550 u32 vs_offset, ps_offset;
530 u32 state_offset; 551 u32 state_offset;