diff options
author | Thomas Hellstrom <thellstrom@vmware.com> | 2009-08-17 17:17:24 +0200 |
---|---|---|
committer | Thomas Hellstrom <thellstrom@vmware.com> | 2009-08-17 17:17:24 +0200 |
commit | 3e8e650f25e5e40fd30b038ee3abf175523d42a6 (patch) | |
tree | 9672e7072483658ef81ab4d85bd020e2dcb7a59d /src/wsbm_pool.h | |
parent | 375a9b16472031d603fd0d2f3cbea3e1ed9bc6c7 (diff) |
libwsbm: Big update for libwsbm 2.0.
Prepare for per-device libs,
Split out command submission,
Rework driver interface,
Bump major.
Diffstat (limited to 'src/wsbm_pool.h')
-rw-r--r-- | src/wsbm_pool.h | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/src/wsbm_pool.h b/src/wsbm_pool.h index 1d07523..0563a99 100644 --- a/src/wsbm_pool.h +++ b/src/wsbm_pool.h @@ -50,6 +50,8 @@ struct _WsbmBufStorage void (*destroyContainer) (void *); }; + + struct _WsbmKernelBuf; struct _WsbmBufferPool @@ -57,18 +59,21 @@ struct _WsbmBufferPool int fd; int (*map) (struct _WsbmBufStorage * buf, unsigned mode, void **virtual); void (*unmap) (struct _WsbmBufStorage * buf); - int (*syncforcpu) (struct _WsbmBufStorage * buf, unsigned mode); + int (*syncforcpu) (struct _WsbmBufStorage * buf, unsigned mode, + int noBlock); void (*releasefromcpu) (struct _WsbmBufStorage * buf, unsigned mode); void (*destroy) (struct _WsbmBufStorage ** buf); unsigned long (*offset) (struct _WsbmBufStorage * buf); unsigned long (*poolOffset) (struct _WsbmBufStorage * buf); - uint32_t(*placement) (struct _WsbmBufStorage * buf); + uint32_t(*placement) (struct _WsbmBufStorage * buf); unsigned long (*size) (struct _WsbmBufStorage * buf); struct _WsbmKernelBuf *(*kernel) (struct _WsbmBufStorage * buf); struct _WsbmBufStorage *(*create) (struct _WsbmBufferPool * pool, unsigned long size, uint32_t placement, - unsigned alignment); + unsigned alignment, + int share, + int pin); struct _WsbmBufStorage *(*createByReference) (struct _WsbmBufferPool * pool, uint32_t handle); void (*fence) (struct _WsbmBufStorage * buf, @@ -77,8 +82,11 @@ struct _WsbmBufferPool int (*validate) (struct _WsbmBufStorage * buf, uint64_t set_flags, uint64_t clr_flags); int (*waitIdle) (struct _WsbmBufStorage * buf, int lazy); - int (*setStatus) (struct _WsbmBufStorage * buf, - uint32_t set_placement, uint32_t clr_placement); + int (*setAttr) (struct _WsbmBufStorage * buf, + uint32_t placement, + unsigned alignment, + int share, + int pin); void (*takeDown) (struct _WsbmBufferPool * pool); }; @@ -124,24 +132,19 @@ wsbmBufStorageUnref(struct _WsbmBufStorage **pStorage) * Builtin pools. */ -/* - * Kernel buffer objects. Size in multiples of page size. Page size aligned. - */ - -extern struct _WsbmBufferPool *wsbmTTMPoolInit(int fd, - unsigned int devOffset); extern struct _WsbmBufferPool *wsbmMallocPoolInit(void); +struct _WsbmAttr; struct _WsbmSlabCache; -extern struct _WsbmBufferPool *wsbmSlabPoolInit(int fd, uint32_t devOffset, - uint32_t placement, - uint32_t validMask, +extern struct _WsbmBufferPool *wsbmSlabPoolInit(int fd, + struct _WsbmBufferPool *basePool, + const struct _WsbmAttr *attr, uint32_t smallestSize, uint32_t numSizes, uint32_t desiredNumBuffers, uint32_t maxSlabSize, - uint32_t pageAlignment, struct _WsbmSlabCache *cache); + extern struct _WsbmSlabCache *wsbmSlabCacheInit(uint32_t checkIntervalMsec, uint32_t slabTimeoutMsec); extern void wsbmSlabCacheFinish(struct _WsbmSlabCache *cache); @@ -152,6 +155,9 @@ extern struct _WsbmBufferPool *wsbmUserPoolInit(void *vramAddr, void *agpAddr, unsigned long agpStart, unsigned long agpSize, + uint32_t system_flag, + uint32_t vram_flag, + uint32_t agp_flag, uint32_t(*fenceTypes) (uint64_t set_flags)); |