nouveau_ttm.h 1.0 KB

12345678910111213141516171819202122232425262728
  1. /* SPDX-License-Identifier: MIT */
  2. #ifndef __NOUVEAU_TTM_H__
  3. #define __NOUVEAU_TTM_H__
  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. extern const struct ttm_resource_manager_func nouveau_vram_manager;
  10. extern const struct ttm_resource_manager_func nouveau_gart_manager;
  11. extern const struct ttm_resource_manager_func nv04_gart_manager;
  12. struct ttm_tt *nouveau_sgdma_create_ttm(struct ttm_buffer_object *bo,
  13. u32 page_flags);
  14. int nouveau_ttm_init(struct nouveau_drm *drm);
  15. void nouveau_ttm_fini(struct nouveau_drm *drm);
  16. int nouveau_ttm_mmap(struct file *, struct vm_area_struct *);
  17. int nouveau_ttm_global_init(struct nouveau_drm *);
  18. void nouveau_ttm_global_release(struct nouveau_drm *);
  19. int nouveau_sgdma_bind(struct ttm_bo_device *bdev, struct ttm_tt *ttm, struct ttm_resource *reg);
  20. void nouveau_sgdma_unbind(struct ttm_bo_device *bdev, struct ttm_tt *ttm);
  21. void nouveau_sgdma_destroy(struct ttm_bo_device *bdev, struct ttm_tt *ttm);
  22. #endif