1 #ifndef RADEON_BO_INT
2 #define RADEON_BO_INT
3 
4 struct radeon_bo_manager {
5     const struct radeon_bo_funcs *funcs;
6     int                     fd;
7 };
8 
9 struct radeon_bo_int {
10     void                        *ptr;
11     uint32_t                    flags;
12     uint32_t                    handle;
13     uint32_t                    size;
14     /* private members */
15     uint32_t                    alignment;
16     uint32_t                    domains;
17     unsigned                    cref;
18     struct radeon_bo_manager    *bom;
19     uint32_t                    space_accounted;
20     uint32_t                    referenced_in_cs;
21 };
22 
23 /* bo functions */
24 struct radeon_bo_funcs {
25     struct radeon_bo *(*bo_open)(struct radeon_bo_manager *bom,
26                                  uint32_t handle,
27                                  uint32_t size,
28                                  uint32_t alignment,
29                                  uint32_t domains,
30                                  uint32_t flags);
31     void (*bo_ref)(struct radeon_bo_int *bo);
32     struct radeon_bo *(*bo_unref)(struct radeon_bo_int *bo);
33     int (*bo_map)(struct radeon_bo_int *bo, int write);
34     int (*bo_unmap)(struct radeon_bo_int *bo);
35     int (*bo_wait)(struct radeon_bo_int *bo);
36     int (*bo_is_static)(struct radeon_bo_int *bo);
37     int (*bo_set_tiling)(struct radeon_bo_int *bo, uint32_t tiling_flags,
38                          uint32_t pitch);
39     int (*bo_get_tiling)(struct radeon_bo_int *bo, uint32_t *tiling_flags,
40                          uint32_t *pitch);
41     int (*bo_is_busy)(struct radeon_bo_int *bo, uint32_t *domain);
42     int (*bo_is_referenced_by_cs)(struct radeon_bo_int *bo, struct radeon_cs *cs);
43 };
44 
45 #endif
46