1 /* SPDX-License-Identifier: MIT */
2 #ifndef __NVKM_FB_PRIV_H__
3 #define __NVKM_FB_PRIV_H__
4 #define nvkm_fb(p) container_of((p), struct nvkm_fb, subdev)
6 #include <subdev/therm.h>
10 void *(*dtor
)(struct nvkm_fb
*);
11 u32 (*tags
)(struct nvkm_fb
*);
12 int (*oneinit
)(struct nvkm_fb
*);
13 void (*init
)(struct nvkm_fb
*);
14 void (*init_remapper
)(struct nvkm_fb
*);
15 int (*init_page
)(struct nvkm_fb
*);
16 void (*init_unkn
)(struct nvkm_fb
*);
17 void (*intr
)(struct nvkm_fb
*);
20 bool (*scrub_required
)(struct nvkm_fb
*);
21 int (*scrub
)(struct nvkm_fb
*);
26 void (*init
)(struct nvkm_fb
*, int i
, u32 addr
, u32 size
,
27 u32 pitch
, u32 flags
, struct nvkm_fb_tile
*);
28 void (*comp
)(struct nvkm_fb
*, int i
, u32 size
, u32 flags
,
29 struct nvkm_fb_tile
*);
30 void (*fini
)(struct nvkm_fb
*, int i
, struct nvkm_fb_tile
*);
31 void (*prog
)(struct nvkm_fb
*, int i
, struct nvkm_fb_tile
*);
34 int (*ram_new
)(struct nvkm_fb
*, struct nvkm_ram
**);
37 const struct nvkm_therm_clkgate_pack
*clkgate_pack
;
40 void nvkm_fb_ctor(const struct nvkm_fb_func
*, struct nvkm_device
*device
,
41 int index
, struct nvkm_fb
*);
42 int nvkm_fb_new_(const struct nvkm_fb_func
*, struct nvkm_device
*device
,
43 int index
, struct nvkm_fb
**);
44 int nvkm_fb_bios_memtype(struct nvkm_bios
*);
46 void nv10_fb_tile_init(struct nvkm_fb
*, int i
, u32 addr
, u32 size
,
47 u32 pitch
, u32 flags
, struct nvkm_fb_tile
*);
48 void nv10_fb_tile_fini(struct nvkm_fb
*, int i
, struct nvkm_fb_tile
*);
49 void nv10_fb_tile_prog(struct nvkm_fb
*, int, struct nvkm_fb_tile
*);
51 u32
nv20_fb_tags(struct nvkm_fb
*);
52 void nv20_fb_tile_init(struct nvkm_fb
*, int i
, u32 addr
, u32 size
,
53 u32 pitch
, u32 flags
, struct nvkm_fb_tile
*);
54 void nv20_fb_tile_fini(struct nvkm_fb
*, int i
, struct nvkm_fb_tile
*);
55 void nv20_fb_tile_prog(struct nvkm_fb
*, int, struct nvkm_fb_tile
*);
57 void nv30_fb_init(struct nvkm_fb
*);
58 void nv30_fb_tile_init(struct nvkm_fb
*, int i
, u32 addr
, u32 size
,
59 u32 pitch
, u32 flags
, struct nvkm_fb_tile
*);
61 void nv40_fb_tile_comp(struct nvkm_fb
*, int i
, u32 size
, u32 flags
,
62 struct nvkm_fb_tile
*);
64 void nv41_fb_init(struct nvkm_fb
*);
65 void nv41_fb_tile_prog(struct nvkm_fb
*, int, struct nvkm_fb_tile
*);
67 void nv44_fb_init(struct nvkm_fb
*);
68 void nv44_fb_tile_prog(struct nvkm_fb
*, int, struct nvkm_fb_tile
*);
70 void nv46_fb_tile_init(struct nvkm_fb
*, int i
, u32 addr
, u32 size
,
71 u32 pitch
, u32 flags
, struct nvkm_fb_tile
*);
73 int gf100_fb_oneinit(struct nvkm_fb
*);
74 int gf100_fb_init_page(struct nvkm_fb
*);
76 int gm200_fb_init_page(struct nvkm_fb
*);
78 void gp100_fb_init_remapper(struct nvkm_fb
*);
79 void gp100_fb_init_unkn(struct nvkm_fb
*);
81 int gp102_fb_new_(const struct nvkm_fb_func
*, struct nvkm_device
*, int,
83 bool gp102_fb_vpr_scrub_required(struct nvkm_fb
*);
84 int gp102_fb_vpr_scrub(struct nvkm_fb
*);