| 1 | #ifndef __NOUVEAU_TTM_H__ |
| 2 | #define __NOUVEAU_TTM_H__ |
| 3 | |
| 4 | static inline struct nouveau_drm * |
| 5 | nouveau_bdev(struct ttm_bo_device *bd) |
| 6 | { |
| 7 | return container_of(bd, struct nouveau_drm, ttm.bdev); |
| 8 | } |
| 9 | |
| 10 | extern const struct ttm_mem_type_manager_func nouveau_vram_manager; |
| 11 | extern const struct ttm_mem_type_manager_func nouveau_gart_manager; |
| 12 | extern const struct ttm_mem_type_manager_func nv04_gart_manager; |
| 13 | |
| 14 | struct ttm_tt *nouveau_sgdma_create_ttm(struct ttm_bo_device *, |
| 15 | unsigned long size, u32 page_flags, |
| 16 | struct page *dummy_read_page); |
| 17 | |
| 18 | int nouveau_ttm_init(struct nouveau_drm *drm); |
| 19 | void nouveau_ttm_fini(struct nouveau_drm *drm); |
| 20 | #ifdef __NetBSD__ |
| 21 | int nouveau_ttm_mmap_object(struct drm_device *, off_t, size_t, vm_prot_t, |
| 22 | struct uvm_object **, voff_t *, struct file *); |
| 23 | #else |
| 24 | int nouveau_ttm_mmap(struct file *, struct vm_area_struct *); |
| 25 | #endif |
| 26 | |
| 27 | int nouveau_ttm_global_init(struct nouveau_drm *); |
| 28 | void nouveau_ttm_global_release(struct nouveau_drm *); |
| 29 | |
| 30 | #endif |
| 31 | |