nouveau: explicitly wait on the fence in nouveau_bo_move_m2mf
[linux-2.6-block.git] / drivers / gpu / drm / nouveau / nouveau_ttm.h
CommitLineData
b7019ac5 1/* SPDX-License-Identifier: MIT */
ebb945a9
BS
2#ifndef __NOUVEAU_TTM_H__
3#define __NOUVEAU_TTM_H__
4
5static inline struct nouveau_drm *
8af8a109 6nouveau_bdev(struct ttm_device *bd)
ebb945a9
BS
7{
8 return container_of(bd, struct nouveau_drm, ttm.bdev);
9}
10
9de59bc2
DA
11extern const struct ttm_resource_manager_func nouveau_vram_manager;
12extern const struct ttm_resource_manager_func nouveau_gart_manager;
13extern const struct ttm_resource_manager_func nv04_gart_manager;
ebb945a9 14
dde5da23
CK
15struct ttm_tt *nouveau_sgdma_create_ttm(struct ttm_buffer_object *bo,
16 u32 page_flags);
ebb945a9
BS
17
18int nouveau_ttm_init(struct nouveau_drm *drm);
19void nouveau_ttm_fini(struct nouveau_drm *drm);
77145f1c
BS
20
21int nouveau_ttm_global_init(struct nouveau_drm *);
22void nouveau_ttm_global_release(struct nouveau_drm *);
ebb945a9 23
8af8a109
CK
24int nouveau_sgdma_bind(struct ttm_device *bdev, struct ttm_tt *ttm, struct ttm_resource *reg);
25void nouveau_sgdma_unbind(struct ttm_device *bdev, struct ttm_tt *ttm);
26void nouveau_sgdma_destroy(struct ttm_device *bdev, struct ttm_tt *ttm);
ebb945a9 27#endif