1 #ifndef __NVKM_FB_PRIV_H__
2 #define __NVKM_FB_PRIV_H__
6 #define nvkm_ram_create(p,e,o,d) \
7 nvkm_object_create_((p), (e), (o), 0, sizeof(**d), (void **)d)
8 #define nvkm_ram_destroy(p) \
9 nvkm_object_destroy(&(p)->base)
10 #define nvkm_ram_init(p) \
11 nvkm_object_init(&(p)->base)
12 #define nvkm_ram_fini(p,s) \
13 nvkm_object_fini(&(p)->base, (s))
15 #define nvkm_ram_create_(p,e,o,s,d) \
16 nvkm_object_create_((p), (e), (o), 0, (s), (void **)d)
17 #define _nvkm_ram_dtor nvkm_object_destroy
18 #define _nvkm_ram_init nvkm_object_init
19 #define _nvkm_ram_fini nvkm_object_fini
21 extern struct nvkm_oclass nv04_ram_oclass
;
22 extern struct nvkm_oclass nv10_ram_oclass
;
23 extern struct nvkm_oclass nv1a_ram_oclass
;
24 extern struct nvkm_oclass nv20_ram_oclass
;
25 extern struct nvkm_oclass nv40_ram_oclass
;
26 extern struct nvkm_oclass nv41_ram_oclass
;
27 extern struct nvkm_oclass nv44_ram_oclass
;
28 extern struct nvkm_oclass nv49_ram_oclass
;
29 extern struct nvkm_oclass nv4e_ram_oclass
;
30 extern struct nvkm_oclass nv50_ram_oclass
;
31 extern struct nvkm_oclass gt215_ram_oclass
;
32 extern struct nvkm_oclass mcp77_ram_oclass
;
33 extern struct nvkm_oclass gf100_ram_oclass
;
34 extern struct nvkm_oclass gk104_ram_oclass
;
35 extern struct nvkm_oclass gk20a_ram_oclass
;
36 extern struct nvkm_oclass gm107_ram_oclass
;
38 int nvkm_sddr2_calc(struct nvkm_ram
*ram
);
39 int nvkm_sddr3_calc(struct nvkm_ram
*ram
);
40 int nvkm_gddr3_calc(struct nvkm_ram
*ram
);
41 int nvkm_gddr5_calc(struct nvkm_ram
*ram
, bool nuts
);
43 #define nvkm_fb_create(p,e,c,d) \
44 nvkm_fb_create_((p), (e), (c), sizeof(**d), (void **)d)
45 #define nvkm_fb_destroy(p) ({ \
46 struct nvkm_fb *pfb = (p); \
47 _nvkm_fb_dtor(nv_object(pfb)); \
49 #define nvkm_fb_init(p) ({ \
50 struct nvkm_fb *pfb = (p); \
51 _nvkm_fb_init(nv_object(pfb)); \
53 #define nvkm_fb_fini(p,s) ({ \
54 struct nvkm_fb *pfb = (p); \
55 _nvkm_fb_fini(nv_object(pfb), (s)); \
58 int nvkm_fb_create_(struct nvkm_object
*, struct nvkm_object
*,
59 struct nvkm_oclass
*, int, void **);
60 void _nvkm_fb_dtor(struct nvkm_object
*);
61 int _nvkm_fb_init(struct nvkm_object
*);
62 int _nvkm_fb_fini(struct nvkm_object
*, bool);
65 struct nvkm_oclass base
;
66 struct nvkm_oclass
*ram
;
67 bool (*memtype
)(struct nvkm_fb
*, u32
);
70 bool nv04_fb_memtype_valid(struct nvkm_fb
*, u32 memtype
);
71 bool nv50_fb_memtype_valid(struct nvkm_fb
*, u32 memtype
);
73 int nvkm_fb_bios_memtype(struct nvkm_bios
*);