summaryrefslogtreecommitdiff
path: root/dove_bufmgr.h
diff options
context:
space:
mode:
Diffstat (limited to 'dove_bufmgr.h')
-rw-r--r--dove_bufmgr.h30
1 files changed, 19 insertions, 11 deletions
diff --git a/dove_bufmgr.h b/dove_bufmgr.h
index 88918f6..18fae64 100644
--- a/dove_bufmgr.h
+++ b/dove_bufmgr.h
@@ -7,6 +7,8 @@ enum drm_dove_bo_type {
DRM_DOVE_BO_SHMEM
};
+struct drm_dove_bufmgr;
+
struct drm_dove_bo {
uint32_t ref;
uint32_t handle;
@@ -17,22 +19,28 @@ struct drm_dove_bo {
enum drm_dove_bo_type type;
};
-struct drm_dove_bo *drm_dove_bo_create(int fd, unsigned w, unsigned h, unsigned bpp);
-struct drm_dove_bo *drm_dove_bo_create_phys(int fd, uint32_t phys, size_t size);
-struct drm_dove_bo *drm_dove_bo_dumb_create(int fd, unsigned w, unsigned h,
- unsigned bpp);
+int drm_dove_init(int fd, struct drm_dove_bufmgr **mgr);
+void drm_dove_fini(struct drm_dove_bufmgr *);
+
+struct drm_dove_bo *drm_dove_bo_create(struct drm_dove_bufmgr *,
+ unsigned w, unsigned h, unsigned bpp);
+struct drm_dove_bo *drm_dove_bo_create_phys(struct drm_dove_bufmgr *,
+ uint32_t phys, size_t size);
+struct drm_dove_bo *drm_dove_bo_dumb_create(struct drm_dove_bufmgr *,
+ unsigned w, unsigned h, unsigned bpp);
/* Create a BO from a global name */
-struct drm_dove_bo *drm_dove_bo_create_from_name(int fd, uint32_t name);
+struct drm_dove_bo *drm_dove_bo_create_from_name(struct drm_dove_bufmgr *,
+ uint32_t name);
/* Create a global name from a BO */
-int drm_dove_bo_flink(int fd, struct drm_dove_bo *bo, uint32_t *name);
+int drm_dove_bo_flink(struct drm_dove_bo *bo, uint32_t *name);
-int drm_dove_bo_map(int fd, struct drm_dove_bo *bo);
-uint32_t drm_dove_bo_phys(int fd, struct drm_dove_bo *bo);
-void drm_dove_bo_get(int fd, struct drm_dove_bo *bo);
-void drm_dove_bo_put(int fd, struct drm_dove_bo *bo);
-int drm_dove_bo_subdata(int fd, struct drm_dove_bo *bo, unsigned long offset,
+int drm_dove_bo_map(struct drm_dove_bo *bo);
+uint32_t drm_dove_bo_phys(struct drm_dove_bo *bo);
+void drm_dove_bo_get(struct drm_dove_bo *bo);
+void drm_dove_bo_put(struct drm_dove_bo *bo);
+int drm_dove_bo_subdata(struct drm_dove_bo *bo, unsigned long offset,
unsigned long size, const void *data);
#endif