Lines Matching defs:ttm

31 #include <drm/ttm/ttm_tt.h>
47 static int nouveau_ttm_tt_bind(struct ttm_device *bdev, struct ttm_tt *ttm,
49 static void nouveau_ttm_tt_unbind(struct ttm_device *bdev, struct ttm_tt *ttm);
229 nvbo->bo.bdev = &drm->ttm.bdev;
360 /* ttm will call nouveau_bo_del_ttm if it fails.. */
615 struct ttm_tt *ttm_dma = (struct ttm_tt *)nvbo->bo.ttm;
651 struct ttm_tt *ttm_dma = (struct ttm_tt *)nvbo->bo.ttm;
688 mutex_lock(&drm->ttm.io_reserve_mutex);
689 list_move_tail(&nvbo->io_reserve_lru, &drm->ttm.io_reserve_lru);
690 mutex_unlock(&drm->ttm.io_reserve_mutex);
698 mutex_lock(&drm->ttm.io_reserve_mutex);
700 mutex_unlock(&drm->ttm.io_reserve_mutex);
776 nouveau_ttm_tt_bind(struct ttm_device *bdev, struct ttm_tt *ttm,
786 return ttm_agp_bind(ttm, reg);
788 return nouveau_sgdma_bind(bdev, ttm, reg);
792 nouveau_ttm_tt_unbind(struct ttm_device *bdev, struct ttm_tt *ttm)
798 ttm_agp_unbind(ttm);
802 nouveau_sgdma_unbind(bdev, ttm);
861 struct nouveau_channel *chan = drm->ttm.chan;
867 * old nvkm_mem node, these will get cleaned up after ttm has
885 ret = drm->ttm.move(chan, bo, bo->resource, new_reg);
965 &drm->ttm.copy);
967 ret = mthd->init(chan, drm->ttm.copy.handle);
969 nvif_object_dtor(&drm->ttm.copy);
973 drm->ttm.move = mthd->exec;
974 drm->ttm.chan = chan;
991 /* ttm can now (stupidly) pass the driver bos it didn't create... */
1074 ret = nouveau_ttm_tt_bind(bo->bdev, bo->ttm, new_reg);
1093 !bo->ttm)) {
1106 nouveau_ttm_tt_unbind(bo->bdev, bo->ttm);
1113 if (drm->ttm.move) {
1179 mutex_lock(&drm->ttm.io_reserve_mutex);
1209 mmu->type[drm->ttm.type_vram].type & NVIF_MEM_UNCACHED)
1262 nvbo = list_first_entry_or_null(&drm->ttm.io_reserve_lru,
1276 mutex_unlock(&drm->ttm.io_reserve_mutex);
1285 mutex_lock(&drm->ttm.io_reserve_mutex);
1287 mutex_unlock(&drm->ttm.io_reserve_mutex);
1337 struct ttm_tt *ttm, struct ttm_operation_ctx *ctx)
1339 struct ttm_tt *ttm_dma = (void *)ttm;
1341 bool slave = !!(ttm->page_flags & TTM_TT_FLAG_EXTERNAL);
1343 if (ttm_tt_is_populated(ttm))
1346 if (slave && ttm->sg) {
1347 drm_prime_sg_to_dma_addr_array(ttm->sg, ttm_dma->dma_address,
1348 ttm->num_pages);
1354 return ttm_pool_alloc(&drm->ttm.bdev.pool, ttm, ctx);
1359 struct ttm_tt *ttm)
1362 bool slave = !!(ttm->page_flags & TTM_TT_FLAG_EXTERNAL);
1367 nouveau_ttm_tt_unbind(bdev, ttm);
1371 return ttm_pool_free(&drm->ttm.bdev.pool, ttm);
1376 struct ttm_tt *ttm)
1381 ttm_agp_destroy(ttm);
1385 nouveau_sgdma_destroy(bdev, ttm);