0001
0002 #ifndef __NOUVEAU_TTM_H__
0003 #define __NOUVEAU_TTM_H__
0004
0005 static inline struct nouveau_drm *
0006 nouveau_bdev(struct ttm_device *bd)
0007 {
0008 return container_of(bd, struct nouveau_drm, ttm.bdev);
0009 }
0010
0011 extern const struct ttm_resource_manager_func nouveau_vram_manager;
0012 extern const struct ttm_resource_manager_func nouveau_gart_manager;
0013 extern const struct ttm_resource_manager_func nv04_gart_manager;
0014
0015 struct ttm_tt *nouveau_sgdma_create_ttm(struct ttm_buffer_object *bo,
0016 u32 page_flags);
0017
0018 int nouveau_ttm_init(struct nouveau_drm *drm);
0019 void nouveau_ttm_fini(struct nouveau_drm *drm);
0020
0021 int nouveau_ttm_global_init(struct nouveau_drm *);
0022 void nouveau_ttm_global_release(struct nouveau_drm *);
0023
0024 int nouveau_sgdma_bind(struct ttm_device *bdev, struct ttm_tt *ttm, struct ttm_resource *reg);
0025 void nouveau_sgdma_unbind(struct ttm_device *bdev, struct ttm_tt *ttm);
0026 void nouveau_sgdma_destroy(struct ttm_device *bdev, struct ttm_tt *ttm);
0027 #endif