blob: 96082b696420bd9dad734be9833be2069260e6ab [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Ben Skeggsebb945a2012-07-20 08:17:34 +10002#ifndef __NOUVEAU_TTM_H__
3#define __NOUVEAU_TTM_H__
4
5static inline struct nouveau_drm *
6nouveau_bdev(struct ttm_bo_device *bd)
7{
8 return container_of(bd, struct nouveau_drm, ttm.bdev);
9}
10
11extern const struct ttm_mem_type_manager_func nouveau_vram_manager;
12extern const struct ttm_mem_type_manager_func nouveau_gart_manager;
13extern const struct ttm_mem_type_manager_func nv04_gart_manager;
14
15struct ttm_tt *nouveau_sgdma_create_ttm(struct ttm_bo_device *,
16 unsigned long size, u32 page_flags,
17 struct page *dummy_read_page);
18
19int nouveau_ttm_init(struct nouveau_drm *drm);
20void nouveau_ttm_fini(struct nouveau_drm *drm);
Ben Skeggs77145f12012-07-31 16:16:21 +100021int nouveau_ttm_mmap(struct file *, struct vm_area_struct *);
22
23int nouveau_ttm_global_init(struct nouveau_drm *);
24void nouveau_ttm_global_release(struct nouveau_drm *);
Ben Skeggsebb945a2012-07-20 08:17:34 +100025
26#endif