Lines Matching refs:ttm

47 static int nouveau_ttm_tt_bind(struct ttm_bo_device *bdev, struct ttm_tt *ttm,
218 nvbo->bo.bdev = &drm->ttm.bdev;
318 /* ttm will call nouveau_bo_del_ttm if it fails.. */
361 mmu->type[drm->ttm.type_vram].type & NVIF_MEM_UNCACHED)
592 struct ttm_dma_tt *ttm_dma = (struct ttm_dma_tt *)nvbo->bo.ttm;
602 for (i = 0; i < ttm_dma->ttm.num_pages; i++)
612 struct ttm_dma_tt *ttm_dma = (struct ttm_dma_tt *)nvbo->bo.ttm;
622 for (i = 0; i < ttm_dma->ttm.num_pages; i++)
632 mutex_lock(&drm->ttm.io_reserve_mutex);
633 list_move_tail(&nvbo->io_reserve_lru, &drm->ttm.io_reserve_lru);
634 mutex_unlock(&drm->ttm.io_reserve_mutex);
642 mutex_lock(&drm->ttm.io_reserve_mutex);
644 mutex_unlock(&drm->ttm.io_reserve_mutex);
720 nouveau_ttm_tt_bind(struct ttm_bo_device *bdev, struct ttm_tt *ttm,
730 return ttm_agp_bind(ttm, reg);
732 return nouveau_sgdma_bind(bdev, ttm, reg);
736 nouveau_ttm_tt_unbind(struct ttm_bo_device *bdev, struct ttm_tt *ttm)
742 ttm_agp_unbind(ttm);
746 nouveau_sgdma_unbind(bdev, ttm);
804 struct nouveau_channel *chan = drm->ttm.chan;
810 * old nvkm_mem node, these will get cleaned up after ttm has
822 ret = drm->ttm.move(chan, bo, &bo->mem, new_reg);
897 &drm->ttm.copy);
899 ret = mthd->init(chan, drm->ttm.copy.handle);
901 nvif_object_dtor(&drm->ttm.copy);
905 drm->ttm.move = mthd->exec;
906 drm->ttm.chan = chan;
939 ret = ttm_tt_populate(bo->bdev, bo->ttm, &ctx);
943 ret = nouveau_ttm_tt_bind(bo->bdev, bo->ttm, &tmp_reg);
1002 /* ttm can now (stupidly) pass the driver bos it didn't create... */
1088 if (old_reg->mem_type == TTM_PL_SYSTEM && !bo->ttm) {
1094 if (drm->ttm.move) {
1165 mutex_lock(&drm->ttm.io_reserve_mutex);
1239 nvbo = list_first_entry_or_null(&drm->ttm.io_reserve_lru,
1251 mutex_unlock(&drm->ttm.io_reserve_mutex);
1260 mutex_lock(&drm->ttm.io_reserve_mutex);
1262 mutex_unlock(&drm->ttm.io_reserve_mutex);
1314 struct ttm_tt *ttm, struct ttm_operation_ctx *ctx)
1316 struct ttm_dma_tt *ttm_dma = (void *)ttm;
1319 bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG);
1321 if (ttm_tt_is_populated(ttm))
1324 if (slave && ttm->sg) {
1326 drm_prime_sg_to_page_addr_arrays(ttm->sg, ttm->pages,
1327 ttm_dma->dma_address, ttm->num_pages);
1328 ttm_tt_set_populated(ttm);
1337 return ttm_pool_populate(ttm, ctx);
1343 return ttm_dma_populate((void *)ttm, dev, ctx);
1351 struct ttm_tt *ttm)
1353 struct ttm_dma_tt *ttm_dma = (void *)ttm;
1356 bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG);
1366 ttm_pool_unpopulate(ttm);
1373 ttm_dma_unpopulate((void *)ttm, dev);
1383 struct ttm_tt *ttm)
1388 ttm_agp_unbind(ttm);
1389 ttm_tt_destroy_common(bdev, ttm);
1390 ttm_agp_destroy(ttm);
1394 nouveau_sgdma_destroy(bdev, ttm);