| 1 | #ifndef __NVKM_RAM_NVC0_H__ |
| 2 | #define __NVKM_RAM_NVC0_H__ |
| 3 | |
| 4 | #include "priv.h" |
| 5 | #include "nv50.h" |
| 6 | |
| 7 | struct nvc0_fb_priv { |
| 8 | struct nouveau_fb base; |
| 9 | #ifdef __NetBSD__ |
| 10 | bus_dma_segment_t r100c10_seg; |
| 11 | bus_dmamap_t r100c10_map; |
| 12 | void *r100c10_kva; |
| 13 | #else |
| 14 | struct page *r100c10_page; |
| 15 | #endif |
| 16 | dma_addr_t r100c10; |
| 17 | }; |
| 18 | |
| 19 | int nvc0_fb_ctor(struct nouveau_object *, struct nouveau_object *, |
| 20 | struct nouveau_oclass *, void *, u32, |
| 21 | struct nouveau_object **); |
| 22 | void nvc0_fb_dtor(struct nouveau_object *); |
| 23 | int nvc0_fb_init(struct nouveau_object *); |
| 24 | bool nvc0_fb_memtype_valid(struct nouveau_fb *, u32); |
| 25 | |
| 26 | |
| 27 | #define nvc0_ram_create(p,e,o,m,d) \ |
| 28 | nvc0_ram_create_((p), (e), (o), (m), sizeof(**d), (void **)d) |
| 29 | int nvc0_ram_create_(struct nouveau_object *, struct nouveau_object *, |
| 30 | struct nouveau_oclass *, u32, int, void **); |
| 31 | int nvc0_ram_get(struct nouveau_fb *, u64, u32, u32, u32, |
| 32 | struct nouveau_mem **); |
| 33 | void nvc0_ram_put(struct nouveau_fb *, struct nouveau_mem **); |
| 34 | |
| 35 | int nve0_ram_init(struct nouveau_object*); |
| 36 | |
| 37 | #endif |
| 38 | |