Lines Matching defs:ttm
220 nvbo->bo.bdev = &drm->ttm.bdev;
319 /* ttm will call nouveau_bo_del_ttm if it fails.. */
549 struct ttm_dma_tt *ttm_dma = (struct ttm_dma_tt *)nvbo->bo.ttm;
564 PAGE_SIZE*ttm_dma->ttm.num_pages,
567 for (i = 0; i < ttm_dma->ttm.num_pages; i++)
578 struct ttm_dma_tt *ttm_dma = (struct ttm_dma_tt *)nvbo->bo.ttm;
593 PAGE_SIZE*ttm_dma->ttm.num_pages,
596 for (i = 0; i < ttm_dma->ttm.num_pages; i++)
767 const u8 type = mmu->type[drm->ttm.type_vram].type;
1217 struct nouveau_channel *chan = drm->ttm.chan;
1223 * old nvkm_mem node, these will get cleaned up after ttm has
1235 ret = drm->ttm.move(chan, bo, &bo->mem, new_reg);
1302 &drm->ttm.copy);
1304 ret = mthd->init(chan, drm->ttm.copy.handle);
1306 nvif_object_fini(&drm->ttm.copy);
1310 drm->ttm.move = mthd->exec;
1311 drm->ttm.chan = chan;
1343 ret = ttm_tt_bind(bo->ttm, &tmp_reg, &ctx);
1401 /* ttm can now (stupidly) pass the driver bos it didn't create... */
1477 if (old_reg->mem_type == TTM_PL_SYSTEM && !bo->ttm) {
1485 if (drm->ttm.move) {
1681 nouveau_ttm_tt_populate(struct ttm_tt *ttm, struct ttm_operation_ctx *ctx)
1683 struct ttm_dma_tt *ttm_dma = (void *)ttm;
1688 bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG);
1690 if (ttm->state != tt_unpopulated)
1693 if (slave && ttm->sg) {
1696 r = drm_prime_bus_dmamap_load_sgt(ttm->bdev->dmat,
1697 ttm_dma->dma_address, ttm->sg);
1701 drm_prime_sg_to_page_addr_arrays(ttm->sg, ttm->pages,
1702 ttm_dma->dma_address, ttm->num_pages);
1704 ttm->state = tt_unbound;
1708 drm = nouveau_bdev(ttm->bdev);
1713 return ttm_agp_tt_populate(ttm, ctx);
1724 return ttm_dma_populate((void *)ttm, dev, ctx);
1728 r = ttm_pool_populate(ttm, ctx);
1733 for (i = 0; i < ttm->num_pages; i++) {
1736 addr = dma_map_page(dev, ttm->pages[i], 0, PAGE_SIZE,
1745 ttm_pool_unpopulate(ttm);
1756 nouveau_ttm_tt_unpopulate(struct ttm_tt *ttm)
1758 struct ttm_dma_tt *ttm_dma = (void *)ttm;
1762 bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG);
1767 drm = nouveau_bdev(ttm->bdev);
1772 ttm_agp_tt_unpopulate(ttm);
1784 ttm_dma_unpopulate((void *)ttm, dev);
1789 for (i = 0; i < ttm->num_pages; i++) {
1796 ttm_pool_unpopulate(ttm);
1802 nouveau_ttm_tt_swapout(struct ttm_tt *ttm)
1804 struct ttm_dma_tt *ttm_dma = container_of(ttm, struct ttm_dma_tt, ttm);