Home | History | Annotate | Download | only in src

Lines Matching refs:kbo

136     struct _WsbmSlabKernelBO *kbo;
235 wsbmFreeKernelBO(struct _WsbmSlabKernelBO *kbo)
240 if (!kbo)
243 slabPool = kbo->slabPool;
244 arg.handle = kbo->kBuf.handle;
245 (void)munmap(kbo->virtual, kbo->actualSize);
249 free(kbo);
256 struct _WsbmSlabKernelBO *kbo;
262 kbo = WSBMLISTENTRY(list, struct _WsbmSlabKernelBO, timeoutHead);
264 if (!wsbmTimeAfterEq(time, &kbo->timeFreed))
267 WSBMLISTDELINIT(&kbo->timeoutHead);
268 WSBMLISTDELINIT(&kbo->head);
269 wsbmFreeKernelBO(kbo);
284 struct _WsbmSlabKernelBO *kbo)
293 kbo->timeFreed = timeFreed;
295 if (kbo->kBuf.placement & TTM_PL_FLAG_CACHED)
296 WSBMLISTADD(&kbo->head, &cache->cached);
298 WSBMLISTADD(&kbo->head, &cache->unCached);
300 WSBMLISTADDTAIL(&kbo->timeoutHead, &cache->timeoutList);
317 struct _WsbmSlabKernelBO *kbo;
332 kbo = NULL;
345 if (!kbo)
346 kbo = kboTmp;
348 if ((kbo->proposedPlacement ^ slabPool->proposedPlacement) == 0)
354 if (kbo) {
355 WSBMLISTDELINIT(&kbo->head);
356 WSBMLISTDELINIT(&kbo->timeoutHead);
361 if (kbo) {
363 kbo->proposedPlacement ^ slabPool->proposedPlacement;
371 req->handle = kbo->kBuf.handle;
378 kbo->kBuf.gpuOffset = rep->gpu_offset;
379 kbo->kBuf.placement = rep->placement;
381 kbo->proposedPlacement = slabPool->proposedPlacement;
385 return kbo;
387 wsbmFreeKernelBO(kbo);
388 kbo = NULL;
392 kbo = calloc(1, sizeof(*kbo));
393 if (!kbo)
399 kbo->slabPool = slabPool;
400 WSBMINITLISTHEAD(&kbo->head);
401 WSBMINITLISTHEAD(&kbo->timeoutHead);
413 kbo->kBuf.gpuOffset = arg.rep.gpu_offset;
414 kbo->kBuf.placement = arg.rep.placement;
415 kbo->kBuf.handle = arg.rep.handle;
417 kbo->actualSize = arg.rep.bo_size;
418 kbo->mapHandle = arg.rep.map_handle;
419 kbo->proposedPlacement = slabPool->proposedPlacement;
422 kbo->virtual = mmap(0, kbo->actualSize,
424 slabPool->pool.fd, kbo->mapHandle);
426 if (kbo->virtual == MAP_FAILED) {
431 return kbo;
435 struct ttm_pl_reference_req arg = {.handle = kbo->kBuf.handle };
442 free(kbo);
459 slab->kbo = wsbmAllocKernelBO(header);
460 if (!slab->kbo) {
465 numBuffers = slab->kbo->actualSize / header->bufSize;
486 sBuf->virtual = (void *)((uint8_t *) slab->kbo->virtual +
511 wsbmSetKernelBOFree(header->slabPool->cache, slab->kbo);
564 wsbmSetKernelBOFree(cache, slab->kbo);
973 return (sBuf->isSlabBuffer) ? &sBuf->parent->kbo->kBuf : &sBuf->kBuf;