1 #ifndef __NVKM_FB_RAM_PRIV_H__ 2 #define __NVKM_FB_RAM_PRIV_H__ 3 #include "priv.h" 4 5 int nvkm_ram_ctor(const struct nvkm_ram_func *, struct nvkm_fb *, 6 enum nvkm_ram_type, u64 size, u32 tags, 7 struct nvkm_ram *); 8 int nvkm_ram_new_(const struct nvkm_ram_func *, struct nvkm_fb *, 9 enum nvkm_ram_type, u64 size, u32 tags, 10 struct nvkm_ram **); 11 void nvkm_ram_del(struct nvkm_ram **); 12 int nvkm_ram_init(struct nvkm_ram *); 13 14 extern const struct nvkm_ram_func nv04_ram_func; 15 16 int nv50_ram_ctor(const struct nvkm_ram_func *, struct nvkm_fb *, 17 struct nvkm_ram *); 18 int nv50_ram_get(struct nvkm_ram *, u64, u32, u32, u32, struct nvkm_mem **); 19 void nv50_ram_put(struct nvkm_ram *, struct nvkm_mem **); 20 void __nv50_ram_put(struct nvkm_ram *, struct nvkm_mem *); 21 22 int gf100_ram_new_(const struct nvkm_ram_func *, struct nvkm_fb *, 23 struct nvkm_ram **); 24 int gf100_ram_ctor(const struct nvkm_ram_func *, struct nvkm_fb *, 25 struct nvkm_ram *); 26 u32 gf100_ram_probe_fbp(const struct nvkm_ram_func *, 27 struct nvkm_device *, int, int *); 28 u32 gf100_ram_probe_fbp_amount(const struct nvkm_ram_func *, u32, 29 struct nvkm_device *, int, int *); 30 u32 gf100_ram_probe_fbpa_amount(struct nvkm_device *, int); 31 int gf100_ram_get(struct nvkm_ram *, u64, u32, u32, u32, struct nvkm_mem **); 32 void gf100_ram_put(struct nvkm_ram *, struct nvkm_mem **); 33 int gf100_ram_init(struct nvkm_ram *); 34 int gf100_ram_calc(struct nvkm_ram *, u32); 35 int gf100_ram_prog(struct nvkm_ram *); 36 void gf100_ram_tidy(struct nvkm_ram *); 37 38 u32 gf108_ram_probe_fbp_amount(const struct nvkm_ram_func *, u32, 39 struct nvkm_device *, int, int *); 40 41 int gk104_ram_new_(const struct nvkm_ram_func *, struct nvkm_fb *, 42 struct nvkm_ram **); 43 void *gk104_ram_dtor(struct nvkm_ram *); 44 int gk104_ram_init(struct nvkm_ram *); 45 int gk104_ram_calc(struct nvkm_ram *, u32); 46 int gk104_ram_prog(struct nvkm_ram *); 47 void gk104_ram_tidy(struct nvkm_ram *); 48 49 u32 gm107_ram_probe_fbp(const struct nvkm_ram_func *, 50 struct nvkm_device *, int, int *); 51 52 u32 gm200_ram_probe_fbp_amount(const struct nvkm_ram_func *, u32, 53 struct nvkm_device *, int, int *); 54 55 /* RAM type-specific MR calculation routines */ 56 int nvkm_sddr2_calc(struct nvkm_ram *); 57 int nvkm_sddr3_calc(struct nvkm_ram *); 58 int nvkm_gddr3_calc(struct nvkm_ram *); 59 int nvkm_gddr5_calc(struct nvkm_ram *, bool nuts); 60 61 int nv04_ram_new(struct nvkm_fb *, struct nvkm_ram **); 62 int nv10_ram_new(struct nvkm_fb *, struct nvkm_ram **); 63 int nv1a_ram_new(struct nvkm_fb *, struct nvkm_ram **); 64 int nv20_ram_new(struct nvkm_fb *, struct nvkm_ram **); 65 int nv40_ram_new(struct nvkm_fb *, struct nvkm_ram **); 66 int nv41_ram_new(struct nvkm_fb *, struct nvkm_ram **); 67 int nv44_ram_new(struct nvkm_fb *, struct nvkm_ram **); 68 int nv49_ram_new(struct nvkm_fb *, struct nvkm_ram **); 69 int nv4e_ram_new(struct nvkm_fb *, struct nvkm_ram **); 70 int nv50_ram_new(struct nvkm_fb *, struct nvkm_ram **); 71 int gt215_ram_new(struct nvkm_fb *, struct nvkm_ram **); 72 int mcp77_ram_new(struct nvkm_fb *, struct nvkm_ram **); 73 int gf100_ram_new(struct nvkm_fb *, struct nvkm_ram **); 74 int gf108_ram_new(struct nvkm_fb *, struct nvkm_ram **); 75 int gk104_ram_new(struct nvkm_fb *, struct nvkm_ram **); 76 int gm107_ram_new(struct nvkm_fb *, struct nvkm_ram **); 77 int gm200_ram_new(struct nvkm_fb *, struct nvkm_ram **); 78 int gp100_ram_new(struct nvkm_fb *, struct nvkm_ram **); 79 #endif 80