1#ifndef __NVKM_FB_NV50_H__
2#define __NVKM_FB_NV50_H__
3
4#include "priv.h"
5
6struct nv50_fb_priv {
7 struct nouveau_fb base;
8#ifdef __NetBSD__
9 bus_dma_segment_t r100c08_seg;
10 bus_dmamap_t r100c08_map;
11 void *r100c08_kva;
12#else
13 struct page *r100c08_page;
14#endif
15 dma_addr_t r100c08;
16};
17
18int nv50_fb_ctor(struct nouveau_object *, struct nouveau_object *,
19 struct nouveau_oclass *, void *, u32,
20 struct nouveau_object **);
21void nv50_fb_dtor(struct nouveau_object *);
22int nv50_fb_init(struct nouveau_object *);
23
24struct nv50_fb_impl {
25 struct nouveau_fb_impl base;
26 u32 trap;
27};
28
29#define nv50_ram_create(p,e,o,d) \
30 nv50_ram_create_((p), (e), (o), sizeof(**d), (void **)d)
31int nv50_ram_create_(struct nouveau_object *, struct nouveau_object *,
32 struct nouveau_oclass *, int, void **);
33int nv50_ram_get(struct nouveau_fb *, u64 size, u32 align, u32 ncmin,
34 u32 memtype, struct nouveau_mem **);
35void nv50_ram_put(struct nouveau_fb *, struct nouveau_mem **);
36void __nv50_ram_put(struct nouveau_fb *, struct nouveau_mem *);
37extern int nv50_fb_memtype[0x80];
38
39#endif
40