1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #ifndef __NVKM_FB_PRIV_H__ 3 #define __NVKM_FB_PRIV_H__ 4 #define nvkm_fb(p) container_of((p), struct nvkm_fb, subdev) 5 #include <subdev/fb.h> 6 struct nvkm_bios; 7 8 struct nvkm_fb_func { 9 void *(*dtor)(struct nvkm_fb *); 10 u32 (*tags)(struct nvkm_fb *); 11 int (*oneinit)(struct nvkm_fb *); 12 void (*init)(struct nvkm_fb *); 13 int (*init_page)(struct nvkm_fb *); 14 void (*init_unkn)(struct nvkm_fb *); 15 void (*intr)(struct nvkm_fb *); 16 17 struct { 18 int regions; 19 void (*init)(struct nvkm_fb *, int i, u32 addr, u32 size, 20 u32 pitch, u32 flags, struct nvkm_fb_tile *); 21 void (*comp)(struct nvkm_fb *, int i, u32 size, u32 flags, 22 struct nvkm_fb_tile *); 23 void (*fini)(struct nvkm_fb *, int i, struct nvkm_fb_tile *); 24 void (*prog)(struct nvkm_fb *, int i, struct nvkm_fb_tile *); 25 } tile; 26 27 int (*ram_new)(struct nvkm_fb *, struct nvkm_ram **); 28 29 u8 default_bigpage; 30 }; 31 32 void nvkm_fb_ctor(const struct nvkm_fb_func *, struct nvkm_device *device, 33 int index, struct nvkm_fb *); 34 int nvkm_fb_new_(const struct nvkm_fb_func *, struct nvkm_device *device, 35 int index, struct nvkm_fb **); 36 int nvkm_fb_bios_memtype(struct nvkm_bios *); 37 38 void nv10_fb_tile_init(struct nvkm_fb *, int i, u32 addr, u32 size, 39 u32 pitch, u32 flags, struct nvkm_fb_tile *); 40 void nv10_fb_tile_fini(struct nvkm_fb *, int i, struct nvkm_fb_tile *); 41 void nv10_fb_tile_prog(struct nvkm_fb *, int, struct nvkm_fb_tile *); 42 43 u32 nv20_fb_tags(struct nvkm_fb *); 44 void nv20_fb_tile_init(struct nvkm_fb *, int i, u32 addr, u32 size, 45 u32 pitch, u32 flags, struct nvkm_fb_tile *); 46 void nv20_fb_tile_fini(struct nvkm_fb *, int i, struct nvkm_fb_tile *); 47 void nv20_fb_tile_prog(struct nvkm_fb *, int, struct nvkm_fb_tile *); 48 49 void nv30_fb_init(struct nvkm_fb *); 50 void nv30_fb_tile_init(struct nvkm_fb *, int i, u32 addr, u32 size, 51 u32 pitch, u32 flags, struct nvkm_fb_tile *); 52 53 void nv40_fb_tile_comp(struct nvkm_fb *, int i, u32 size, u32 flags, 54 struct nvkm_fb_tile *); 55 56 void nv41_fb_init(struct nvkm_fb *); 57 void nv41_fb_tile_prog(struct nvkm_fb *, int, struct nvkm_fb_tile *); 58 59 void nv44_fb_init(struct nvkm_fb *); 60 void nv44_fb_tile_prog(struct nvkm_fb *, int, struct nvkm_fb_tile *); 61 62 void nv46_fb_tile_init(struct nvkm_fb *, int i, u32 addr, u32 size, 63 u32 pitch, u32 flags, struct nvkm_fb_tile *); 64 65 int gf100_fb_oneinit(struct nvkm_fb *); 66 int gf100_fb_init_page(struct nvkm_fb *); 67 68 int gm200_fb_init_page(struct nvkm_fb *); 69 #endif 70