2 #ifndef _RADEON_CS_INT_H_
3 #define _RADEON_CS_INT_H_
5 struct radeon_cs_space_check {
6 struct radeon_bo_int *bo;
9 uint32_t new_accounted;
12 struct radeon_cs_int {
13 /* keep first two in same place */
20 struct radeon_cs_manager *csm;
23 unsigned relocs_total_size;
24 const char *section_file;
25 const char *section_func;
27 struct radeon_cs_space_check bos[MAX_SPACE_BOS];
29 void (*space_flush_fn)(void *);
30 void *space_flush_data;
35 struct radeon_cs_funcs {
36 struct radeon_cs_int *(*cs_create)(struct radeon_cs_manager *csm,
38 int (*cs_write_reloc)(struct radeon_cs_int *cs,
41 uint32_t write_domain,
43 int (*cs_begin)(struct radeon_cs_int *cs,
48 int (*cs_end)(struct radeon_cs_int *cs,
49 const char *file, const char *func,
53 int (*cs_emit)(struct radeon_cs_int *cs);
54 int (*cs_destroy)(struct radeon_cs_int *cs);
55 int (*cs_erase)(struct radeon_cs_int *cs);
56 int (*cs_need_flush)(struct radeon_cs_int *cs);
57 void (*cs_print)(struct radeon_cs_int *cs, FILE *file);
60 struct radeon_cs_manager {
61 struct radeon_cs_funcs *funcs;
63 int32_t vram_limit, gart_limit;
64 int32_t vram_write_used, gart_write_used;