aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Airlie2009-12-16 22:11:55 -0600
committerDave Airlie2009-12-20 16:05:16 -0600
commit125994ab30d4f0f126c62fa741ec62a52d69d7a8 (patch)
treee641a13ec8e32c2322ebe1f1480581d58ad815e8 /radeon/radeon_bo_int.h
parentf1660c249198b5cc14ebbb75107da7bcb6972033 (diff)
downloadexternal-libgbm-125994ab30d4f0f126c62fa741ec62a52d69d7a8.tar.gz
external-libgbm-125994ab30d4f0f126c62fa741ec62a52d69d7a8.tar.xz
external-libgbm-125994ab30d4f0f126c62fa741ec62a52d69d7a8.zip
radeon: straighten out the API insanity.
as Michel pointed out we are exposing too much info for these object for this to be maintainable going forward. This patch set minimises the exposed parts of the radeon_bo and radeon_cs objects to the piece necessary for ddx/mesa to operate at a decent speed. The major problem is mesa contains a legacy BO/CS managers which we still need to expose functionality to, and we really cannot change the API until we can drop the non-KMS codepaths. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'radeon/radeon_bo_int.h')
-rw-r--r--radeon/radeon_bo_int.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/radeon/radeon_bo_int.h b/radeon/radeon_bo_int.h
new file mode 100644
index 00000000..190c3324
--- /dev/null
+++ b/radeon/radeon_bo_int.h
@@ -0,0 +1,45 @@
1#ifndef RADEON_BO_INT
2#define RADEON_BO_INT
3
4struct radeon_bo_manager {
5 struct radeon_bo_funcs *funcs;
6 int fd;
7};
8
9struct 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 */
24struct 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