Lines Matching refs:p
164 struct _WsbmUserPool *p; in evict_lru() local
173 p = userPool(vBuf); in evict_lru()
174 WSBM_MUTEX_UNLOCK(&p->mutex); in evict_lru()
176 WSBM_MUTEX_LOCK(&p->mutex); in evict_lru()
207 struct _WsbmUserPool *p = containerOf(pool, struct _WsbmUserPool, pool); in pool_create() local
221 WSBM_MUTEX_LOCK(&p->mutex); in pool_create()
224 vBuf->node = wsbmMMSearchFree(&p->agpMM, size, alignment, 1); in pool_create()
230 vBuf->kBuf.gpuOffset = p->agpOffset + vBuf->node->start; in pool_create()
231 vBuf->map = (void *)(p->agpMap + vBuf->node->start); in pool_create()
232 WSBMLISTADDTAIL(&vBuf->lru, &p->agpLRU); in pool_create()
238 vBuf->node = wsbmMMSearchFree(&p->vramMM, size, alignment, 1); in pool_create()
244 vBuf->kBuf.gpuOffset = p->vramOffset + vBuf->node->start; in pool_create()
245 vBuf->map = (void *)(p->vramMap + vBuf->node->start); in pool_create()
246 WSBMLISTADDTAIL(&vBuf->lru, &p->vramLRU); in pool_create()
253 WSBM_MUTEX_UNLOCK(&p->mutex); in pool_create()
263 WSBM_MUTEX_UNLOCK(&p->mutex); in pool_create()
277 struct _WsbmUserPool *p = userPool(vBuf); in pool_validate() local
287 WSBM_MUTEX_LOCK(&p->mutex); in pool_validate()
317 wsbmMMSearchFree(&p->agpMM, vBuf->size, vBuf->alignment, 1); in pool_validate()
324 vBuf->kBuf.gpuOffset = p->agpOffset + vBuf->node->start; in pool_validate()
325 vBuf->map = (void *)(p->agpMap + vBuf->node->start); in pool_validate()
331 } while (evict_lru(&p->agpLRU) == 0); in pool_validate()
337 wsbmMMSearchFree(&p->vramMM, vBuf->size, vBuf->alignment, 1); in pool_validate()
344 vBuf->kBuf.gpuOffset = p->vramOffset + vBuf->node->start; in pool_validate()
345 vBuf->map = (void *)(p->vramMap + vBuf->node->start); in pool_validate()
351 } while (evict_lru(&p->vramLRU) == 0); in pool_validate()
360 vBuf->newFenceType = p->fenceTypes(set_flags); in pool_validate()
361 WSBM_MUTEX_UNLOCK(&p->mutex); in pool_validate()
379 release_delayed_buffers(struct _WsbmUserPool *p) in release_delayed_buffers() argument
384 WSBM_MUTEX_LOCK(&p->mutex); in release_delayed_buffers()
392 WSBMLISTFOREACHSAFE(list, next, &p->delayed) { in release_delayed_buffers()
413 WSBM_MUTEX_UNLOCK(&p->mutex); in release_delayed_buffers()
420 struct _WsbmUserPool *p = userPool(vBuf); in pool_destroy() local
427 WSBM_MUTEX_LOCK(&p->mutex); in pool_destroy()
428 WSBMLISTADDTAIL(&vBuf->delayed, &p->delayed); in pool_destroy()
429 WSBM_MUTEX_UNLOCK(&p->mutex); in pool_destroy()
437 WSBM_MUTEX_LOCK(&p->mutex); in pool_destroy()
439 WSBM_MUTEX_UNLOCK(&p->mutex); in pool_destroy()
528 struct _WsbmUserPool *p = userPool(vBuf); in pool_fence() local
540 WSBM_MUTEX_LOCK(&p->mutex); in pool_fence()
542 WSBMLISTADDTAIL(&vBuf->lru, &p->vramLRU); in pool_fence()
544 WSBMLISTADDTAIL(&vBuf->lru, &p->agpLRU); in pool_fence()
545 WSBM_MUTEX_UNLOCK(&p->mutex); in pool_fence()
553 struct _WsbmUserPool *p = userPool(vBuf); in pool_unvalidate() local
562 WSBM_MUTEX_LOCK(&p->mutex); in pool_unvalidate()
564 WSBMLISTADDTAIL(&vBuf->lru, &p->vramLRU); in pool_unvalidate()
566 WSBMLISTADDTAIL(&vBuf->lru, &p->agpLRU); in pool_unvalidate()
567 WSBM_MUTEX_UNLOCK(&p->mutex); in pool_unvalidate()
585 struct _WsbmUserPool *p = containerOf(pool, struct _WsbmUserPool, pool); in pool_takedown() local
589 release_delayed_buffers(p); in pool_takedown()
590 WSBM_MUTEX_LOCK(&p->mutex); in pool_takedown()
591 empty = (p->delayed.next == &p->delayed); in pool_takedown()
592 WSBM_MUTEX_UNLOCK(&p->mutex); in pool_takedown()
598 WSBM_MUTEX_LOCK(&p->mutex); in pool_takedown()
600 while (evict_lru(&p->vramLRU) == 0) ; in pool_takedown()
601 while (evict_lru(&p->agpLRU) == 0) ; in pool_takedown()
603 WSBM_MUTEX_UNLOCK(&p->mutex); in pool_takedown()
605 wsbmMMtakedown(&p->agpMM); in pool_takedown()
606 wsbmMMtakedown(&p->vramMM); in pool_takedown()
608 free(p); in pool_takedown()
614 struct _WsbmUserPool *p = containerOf(pool, struct _WsbmUserPool, pool); in wsbmUserPoolClean() local
616 WSBM_MUTEX_LOCK(&p->mutex); in wsbmUserPoolClean()
618 while (evict_lru(&p->vramLRU) == 0) ; in wsbmUserPoolClean()
620 while (evict_lru(&p->agpLRU) == 0) ; in wsbmUserPoolClean()
621 WSBM_MUTEX_UNLOCK(&p->mutex); in wsbmUserPoolClean()