1 /* $NetBSD: nouveau_ttm.h,v 1.1.1.2 2018/08/27 01:34:55 riastradh Exp $ */ 2 3 #ifndef __NOUVEAU_TTM_H__ 4 #define __NOUVEAU_TTM_H__ 5 6 static inline struct nouveau_drm * 7 nouveau_bdev(struct ttm_bo_device *bd) 8 { 9 return container_of(bd, struct nouveau_drm, ttm.bdev); 10 } 11 12 extern const struct ttm_mem_type_manager_func nouveau_vram_manager; 13 extern const struct ttm_mem_type_manager_func nouveau_gart_manager; 14 extern const struct ttm_mem_type_manager_func nv04_gart_manager; 15 16 struct ttm_tt *nouveau_sgdma_create_ttm(struct ttm_bo_device *, 17 unsigned long size, u32 page_flags, 18 struct page *dummy_read_page); 19 20 int nouveau_ttm_init(struct nouveau_drm *drm); 21 void nouveau_ttm_fini(struct nouveau_drm *drm); 22 int nouveau_ttm_mmap(struct file *, struct vm_area_struct *); 23 24 int nouveau_ttm_global_init(struct nouveau_drm *); 25 void nouveau_ttm_global_release(struct nouveau_drm *); 26 27 #endif 28