Home | History | Annotate | Line # | Download | only in nouveau
      1  1.3  riastrad /*	$NetBSD: nouveau_ttm.h,v 1.4 2021/12/18 23:45:32 riastradh Exp $	*/
      2  1.3  riastrad 
      3  1.4  riastrad /* SPDX-License-Identifier: MIT */
      4  1.1  riastrad #ifndef __NOUVEAU_TTM_H__
      5  1.1  riastrad #define __NOUVEAU_TTM_H__
      6  1.1  riastrad 
      7  1.1  riastrad static inline struct nouveau_drm *
      8  1.1  riastrad nouveau_bdev(struct ttm_bo_device *bd)
      9  1.1  riastrad {
     10  1.1  riastrad 	return container_of(bd, struct nouveau_drm, ttm.bdev);
     11  1.1  riastrad }
     12  1.1  riastrad 
     13  1.1  riastrad extern const struct ttm_mem_type_manager_func nouveau_vram_manager;
     14  1.1  riastrad extern const struct ttm_mem_type_manager_func nouveau_gart_manager;
     15  1.1  riastrad extern const struct ttm_mem_type_manager_func nv04_gart_manager;
     16  1.1  riastrad 
     17  1.4  riastrad struct ttm_tt *nouveau_sgdma_create_ttm(struct ttm_buffer_object *bo,
     18  1.4  riastrad 					u32 page_flags);
     19  1.1  riastrad 
     20  1.1  riastrad int  nouveau_ttm_init(struct nouveau_drm *drm);
     21  1.1  riastrad void nouveau_ttm_fini(struct nouveau_drm *drm);
     22  1.2  riastrad #ifdef __NetBSD__
     23  1.2  riastrad int  nouveau_ttm_mmap_object(struct drm_device *, off_t, size_t, vm_prot_t,
     24  1.2  riastrad 	    struct uvm_object **, voff_t *, struct file *);
     25  1.2  riastrad #else
     26  1.1  riastrad int  nouveau_ttm_mmap(struct file *, struct vm_area_struct *);
     27  1.2  riastrad #endif
     28  1.1  riastrad 
     29  1.1  riastrad int  nouveau_ttm_global_init(struct nouveau_drm *);
     30  1.1  riastrad void nouveau_ttm_global_release(struct nouveau_drm *);
     31  1.1  riastrad 
     32  1.1  riastrad #endif
     33