Merge tag 'block-5.11-2021-01-10' of git://git.kernel.dk/linux-block
[linux/fpc-iii.git] / drivers / gpu / drm / nouveau / nouveau_ttm.h
blob69552049bb96d346cdcd1bfa43ceae991afe7fb1
1 /* SPDX-License-Identifier: MIT */
2 #ifndef __NOUVEAU_TTM_H__
3 #define __NOUVEAU_TTM_H__
5 static inline struct nouveau_drm *
6 nouveau_bdev(struct ttm_bo_device *bd)
8 return container_of(bd, struct nouveau_drm, ttm.bdev);
11 extern const struct ttm_resource_manager_func nouveau_vram_manager;
12 extern const struct ttm_resource_manager_func nouveau_gart_manager;
13 extern const struct ttm_resource_manager_func nv04_gart_manager;
15 struct ttm_tt *nouveau_sgdma_create_ttm(struct ttm_buffer_object *bo,
16 u32 page_flags);
18 int nouveau_ttm_init(struct nouveau_drm *drm);
19 void nouveau_ttm_fini(struct nouveau_drm *drm);
20 int nouveau_ttm_mmap(struct file *, struct vm_area_struct *);
22 int nouveau_ttm_global_init(struct nouveau_drm *);
23 void nouveau_ttm_global_release(struct nouveau_drm *);
25 int nouveau_sgdma_bind(struct ttm_bo_device *bdev, struct ttm_tt *ttm, struct ttm_resource *reg);
26 void nouveau_sgdma_unbind(struct ttm_bo_device *bdev, struct ttm_tt *ttm);
27 void nouveau_sgdma_destroy(struct ttm_bo_device *bdev, struct ttm_tt *ttm);
28 #endif