Lines Matching refs:buf
63 struct _WsbmBufStorage buf; member
100 return containerOf(dBuf->buf.pool, struct _TTMPool, pool); in ttmGetPool()
104 ttmBuffer(struct _WsbmBufStorage *buf) in ttmBuffer() argument
106 return containerOf(buf, struct _TTMBuffer, buf); in ttmBuffer()
126 ret = wsbmBufStorageInit(&dBuf->buf, pool); in pool_create()
151 return &dBuf->buf; in pool_create()
156 wsbmBufStorageTakedown(&dBuf->buf); in pool_create()
173 ret = wsbmBufStorageInit(&dBuf->buf, pool); in pool_reference()
196 return &dBuf->buf; in pool_reference()
201 wsbmBufStorageTakedown(&dBuf->buf); in pool_reference()
208 pool_destroy(struct _WsbmBufStorage **buf) in pool_destroy() argument
210 struct _TTMBuffer *dBuf = ttmBuffer(*buf); in pool_destroy()
214 *buf = NULL; in pool_destroy()
220 (void)drmCommandWrite(dBuf->buf.pool->fd, in pool_destroy()
225 wsbmBufStorageTakedown(&dBuf->buf); in pool_destroy()
230 syncforcpu_locked(struct _WsbmBufStorage *buf, unsigned mode) in syncforcpu_locked() argument
233 struct _TTMBuffer *dBuf = ttmBuffer(buf); in syncforcpu_locked()
240 WSBM_COND_WAIT(&dBuf->event, &buf->mutex); in syncforcpu_locked()
264 WSBM_MUTEX_UNLOCK(&buf->mutex); in syncforcpu_locked()
270 DRMRESTARTCOMMANDWRITE(dBuf->buf.pool->fd, in syncforcpu_locked()
273 WSBM_MUTEX_LOCK(&buf->mutex); in syncforcpu_locked()
287 releasefromcpu_locked(struct _WsbmBufStorage *buf, unsigned mode) in releasefromcpu_locked() argument
290 struct _TTMBuffer *dBuf = ttmBuffer(buf); in releasefromcpu_locked()
295 WSBM_COND_WAIT(&dBuf->event, &buf->mutex); in releasefromcpu_locked()
310 DRMRESTARTCOMMANDWRITE(dBuf->buf.pool->fd, in releasefromcpu_locked()
319 pool_syncforcpu(struct _WsbmBufStorage *buf, unsigned mode) in pool_syncforcpu() argument
323 WSBM_MUTEX_LOCK(&buf->mutex); in pool_syncforcpu()
324 ret = syncforcpu_locked(buf, mode); in pool_syncforcpu()
325 WSBM_MUTEX_UNLOCK(&buf->mutex); in pool_syncforcpu()
330 pool_releasefromcpu(struct _WsbmBufStorage *buf, unsigned mode) in pool_releasefromcpu() argument
332 WSBM_MUTEX_LOCK(&buf->mutex); in pool_releasefromcpu()
333 (void)releasefromcpu_locked(buf, mode); in pool_releasefromcpu()
334 WSBM_MUTEX_UNLOCK(&buf->mutex); in pool_releasefromcpu()
351 pool_map(struct _WsbmBufStorage *buf, unsigned mode __attribute__ ((unused)), void **virtual) in pool_map() argument
353 struct _TTMBuffer *dBuf = ttmBuffer(buf); in pool_map()
357 WSBM_MUTEX_LOCK(&buf->mutex); in pool_map()
368 buf->pool->fd, dBuf->mapHandle); in pool_map()
372 buf->pool->fd, dBuf->mapHandle); in pool_map()
384 WSBM_MUTEX_UNLOCK(&buf->mutex); in pool_map()
390 pool_unmap(struct _WsbmBufStorage *buf __attribute__ ((unused))) in pool_unmap() argument
396 pool_offset(struct _WsbmBufStorage *buf) in pool_offset() argument
398 struct _TTMBuffer *dBuf = ttmBuffer(buf); in pool_offset()
404 pool_poolOffset(struct _WsbmBufStorage *buf __attribute__ ((unused))) in pool_poolOffset() argument
410 pool_placement(struct _WsbmBufStorage *buf) in pool_placement() argument
412 struct _TTMBuffer *dBuf = ttmBuffer(buf); in pool_placement()
418 pool_size(struct _WsbmBufStorage *buf) in pool_size() argument
420 struct _TTMBuffer *dBuf = ttmBuffer(buf); in pool_size()
426 pool_fence(struct _WsbmBufStorage *buf __attribute__ ((unused)), in pool_fence() argument
435 pool_waitIdle(struct _WsbmBufStorage *buf, int lazy) in pool_waitIdle() argument
437 struct _TTMBuffer *dBuf = ttmBuffer(buf); in pool_waitIdle()
440 struct _WsbmBufferPool *pool = buf->pool; in pool_waitIdle()
461 pool_setStatus(struct _WsbmBufStorage *buf, uint32_t set_placement, in pool_setStatus() argument
464 struct _TTMBuffer *dBuf = ttmBuffer(buf); in pool_setStatus()
469 struct _WsbmBufferPool *pool = buf->pool; in pool_setStatus()
489 pool_kernel(struct _WsbmBufStorage *buf) in pool_kernel() argument
491 return (void *)&ttmBuffer(buf)->kBuf; in pool_kernel()
547 ret = wsbmBufStorageInit(&dBuf->buf, pool); in ttm_pool_ub_create()
573 return &dBuf->buf; in ttm_pool_ub_create()
578 wsbmBufStorageTakedown(&dBuf->buf); in ttm_pool_ub_create()