From 3d4bfe8c893d016ef43d1ebf28e4607aa1f540a4 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Wed, 3 Jun 2009 13:54:43 +1000 Subject: nouveau: 0.0.14 + extend bo interface to support subrange mapping Normal map() should operate as before, and map_range()/map_flush() should give correct results but lacking any performance difference from map(). Nothing exiting being done here yet, but the interface is a good start. --- libdrm/nouveau/nouveau_bo.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'libdrm/nouveau/nouveau_bo.h') diff --git a/libdrm/nouveau/nouveau_bo.h b/libdrm/nouveau/nouveau_bo.h index f0ae09be..9b1feff1 100644 --- a/libdrm/nouveau/nouveau_bo.h +++ b/libdrm/nouveau/nouveau_bo.h @@ -37,6 +37,10 @@ #define NOUVEAU_BO_LOCAL (1 << 9) #define NOUVEAU_BO_TILED (1 << 10) #define NOUVEAU_BO_ZTILE (1 << 11) +#define NOUVEAU_BO_INVAL (1 << 12) +#define NOUVEAU_BO_NOSYNC (1 << 13) +#define NOUVEAU_BO_NOWAIT (1 << 14) +#define NOUVEAU_BO_IFLUSH (1 << 15) #define NOUVEAU_BO_DUMMY (1 << 31) struct nouveau_bo { @@ -46,7 +50,8 @@ struct nouveau_bo { uint64_t size; void *map; - int tiled; + uint32_t tile_mode; + uint32_t tile_flags; /* Available when buffer is pinned *only* */ uint32_t flags; @@ -57,6 +62,11 @@ int nouveau_bo_new(struct nouveau_device *, uint32_t flags, int align, int size, struct nouveau_bo **); +int +nouveau_bo_new_tile(struct nouveau_device *, uint32_t flags, int align, + int size, uint32_t tile_mode, uint32_t tile_flags, + struct nouveau_bo **); + int nouveau_bo_user(struct nouveau_device *, void *ptr, int size, struct nouveau_bo **); @@ -78,6 +88,13 @@ nouveau_bo_handle_ref(struct nouveau_device *, uint32_t handle, int nouveau_bo_ref(struct nouveau_bo *, struct nouveau_bo **); +int +nouveau_bo_map_range(struct nouveau_bo *, uint32_t delta, uint32_t size, + uint32_t flags); + +void +nouveau_bo_map_flush(struct nouveau_bo *, uint32_t delta, uint32_t size); + int nouveau_bo_map(struct nouveau_bo *, uint32_t flags); -- cgit v1.2.3