Searched refs:ttm_dma (Results 1 - 5 of 5) sorted by relevance
/linux-4.1.27/include/drm/ttm/ |
H A D | ttm_page_alloc.h | 83 extern int ttm_dma_populate(struct ttm_dma_tt *ttm_dma, struct device *dev); 84 extern void ttm_dma_unpopulate(struct ttm_dma_tt *ttm_dma, struct device *dev); 99 static inline int ttm_dma_populate(struct ttm_dma_tt *ttm_dma, ttm_dma_populate() argument 104 static inline void ttm_dma_unpopulate(struct ttm_dma_tt *ttm_dma, ttm_dma_unpopulate() argument
|
H A D | ttm_bo_driver.h | 582 extern int ttm_dma_tt_init(struct ttm_dma_tt *ttm_dma, struct ttm_bo_device *bdev, 594 extern void ttm_dma_tt_fini(struct ttm_dma_tt *ttm_dma);
|
/linux-4.1.27/drivers/gpu/drm/ttm/ |
H A D | ttm_tt.c | 217 int ttm_dma_tt_init(struct ttm_dma_tt *ttm_dma, struct ttm_bo_device *bdev, ttm_dma_tt_init() argument 221 struct ttm_tt *ttm = &ttm_dma->ttm; ttm_dma_tt_init() 232 INIT_LIST_HEAD(&ttm_dma->pages_list); ttm_dma_tt_init() 233 ttm_dma_tt_alloc_page_directory(ttm_dma); ttm_dma_tt_init() 243 void ttm_dma_tt_fini(struct ttm_dma_tt *ttm_dma) ttm_dma_tt_fini() argument 245 struct ttm_tt *ttm = &ttm_dma->ttm; ttm_dma_tt_fini() 249 ttm_dma->cpu_address = NULL; ttm_dma_tt_fini() 250 ttm_dma->dma_address = NULL; ttm_dma_tt_fini()
|
H A D | ttm_page_alloc_dma.c | 845 struct ttm_dma_tt *ttm_dma, ttm_dma_pool_get_pages() 849 struct ttm_tt *ttm = &ttm_dma->ttm; ttm_dma_pool_get_pages() 858 ttm_dma->cpu_address[index] = d_page->vaddr; ttm_dma_pool_get_pages() 859 ttm_dma->dma_address[index] = d_page->dma; ttm_dma_pool_get_pages() 860 list_move_tail(&d_page->page_list, &ttm_dma->pages_list); ttm_dma_pool_get_pages() 873 int ttm_dma_populate(struct ttm_dma_tt *ttm_dma, struct device *dev) ttm_dma_populate() argument 875 struct ttm_tt *ttm = &ttm_dma->ttm; ttm_dma_populate() 902 INIT_LIST_HEAD(&ttm_dma->pages_list); ttm_dma_populate() 904 ret = ttm_dma_pool_get_pages(pool, ttm_dma, i); ttm_dma_populate() 906 ttm_dma_unpopulate(ttm_dma, dev); ttm_dma_populate() 913 ttm_dma_unpopulate(ttm_dma, dev); ttm_dma_populate() 921 ttm_dma_unpopulate(ttm_dma, dev); ttm_dma_populate() 932 void ttm_dma_unpopulate(struct ttm_dma_tt *ttm_dma, struct device *dev) ttm_dma_unpopulate() argument 934 struct ttm_tt *ttm = &ttm_dma->ttm; ttm_dma_unpopulate() 951 list_for_each_entry(d_page, &ttm_dma->pages_list, page_list) { ttm_dma_unpopulate() 962 list_splice(&ttm_dma->pages_list, &pool->free_list); ttm_dma_unpopulate() 975 list_for_each_entry_safe(d_page, next, &ttm_dma->pages_list, page_list) { ttm_dma_unpopulate() 987 INIT_LIST_HEAD(&ttm_dma->pages_list); ttm_dma_unpopulate() 990 ttm_dma->cpu_address[i] = 0; ttm_dma_unpopulate() 991 ttm_dma->dma_address[i] = 0; ttm_dma_unpopulate() 844 ttm_dma_pool_get_pages(struct dma_pool *pool, struct ttm_dma_tt *ttm_dma, unsigned index) ttm_dma_pool_get_pages() argument
|
/linux-4.1.27/drivers/gpu/drm/nouveau/ |
H A D | nouveau_bo.c | 463 struct ttm_dma_tt *ttm_dma = (struct ttm_dma_tt *)nvbo->bo.ttm; nouveau_bo_sync_for_device() local 466 if (!ttm_dma) nouveau_bo_sync_for_device() 473 for (i = 0; i < ttm_dma->ttm.num_pages; i++) nouveau_bo_sync_for_device() 475 ttm_dma->dma_address[i], PAGE_SIZE, DMA_TO_DEVICE); nouveau_bo_sync_for_device() 483 struct ttm_dma_tt *ttm_dma = (struct ttm_dma_tt *)nvbo->bo.ttm; nouveau_bo_sync_for_cpu() local 486 if (!ttm_dma) nouveau_bo_sync_for_cpu() 493 for (i = 0; i < ttm_dma->ttm.num_pages; i++) nouveau_bo_sync_for_cpu() 495 ttm_dma->dma_address[i], PAGE_SIZE, DMA_FROM_DEVICE); nouveau_bo_sync_for_cpu() 1468 struct ttm_dma_tt *ttm_dma = (void *)ttm; nouveau_ttm_tt_populate() local 1483 ttm_dma->dma_address, ttm->num_pages); nouveau_ttm_tt_populate() 1499 return ttm_dma_populate(ttm_dma, dev->dev); nouveau_ttm_tt_populate() 1526 dma_unmap_page(pdev, ttm_dma->dma_address[i], nouveau_ttm_tt_populate() 1528 ttm_dma->dma_address[i] = 0; nouveau_ttm_tt_populate() 1534 ttm_dma->dma_address[i] = addr; nouveau_ttm_tt_populate() 1542 struct ttm_dma_tt *ttm_dma = (void *)ttm; nouveau_ttm_tt_unpopulate() local 1564 ttm_dma_unpopulate(ttm_dma, dev->dev); nouveau_ttm_tt_unpopulate() 1583 if (ttm_dma->dma_address[i]) { nouveau_ttm_tt_unpopulate() 1584 dma_unmap_page(pdev, ttm_dma->dma_address[i], PAGE_SIZE, nouveau_ttm_tt_unpopulate()
|
Completed in 133 milliseconds