These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / drivers / gpu / drm / nouveau / nvkm / subdev / fb / priv.h
1 #ifndef __NVKM_FB_PRIV_H__
2 #define __NVKM_FB_PRIV_H__
3 #define nvkm_fb(p) container_of((p), struct nvkm_fb, subdev)
4 #include <subdev/fb.h>
5 struct nvkm_bios;
6
7 struct nvkm_fb_func {
8         void *(*dtor)(struct nvkm_fb *);
9         void (*init)(struct nvkm_fb *);
10         void (*intr)(struct nvkm_fb *);
11
12         struct {
13                 int regions;
14                 void (*init)(struct nvkm_fb *, int i, u32 addr, u32 size,
15                              u32 pitch, u32 flags, struct nvkm_fb_tile *);
16                 void (*comp)(struct nvkm_fb *, int i, u32 size, u32 flags,
17                              struct nvkm_fb_tile *);
18                 void (*fini)(struct nvkm_fb *, int i, struct nvkm_fb_tile *);
19                 void (*prog)(struct nvkm_fb *, int i, struct nvkm_fb_tile *);
20         } tile;
21
22         int (*ram_new)(struct nvkm_fb *, struct nvkm_ram **);
23
24         bool (*memtype_valid)(struct nvkm_fb *, u32 memtype);
25 };
26
27 void nvkm_fb_ctor(const struct nvkm_fb_func *, struct nvkm_device *device,
28                   int index, struct nvkm_fb *);
29 int nvkm_fb_new_(const struct nvkm_fb_func *, struct nvkm_device *device,
30                  int index, struct nvkm_fb **);
31 int nvkm_fb_bios_memtype(struct nvkm_bios *);
32
33 bool nv04_fb_memtype_valid(struct nvkm_fb *, u32 memtype);
34
35 void nv10_fb_tile_init(struct nvkm_fb *, int i, u32 addr, u32 size,
36                        u32 pitch, u32 flags, struct nvkm_fb_tile *);
37 void nv10_fb_tile_fini(struct nvkm_fb *, int i, struct nvkm_fb_tile *);
38 void nv10_fb_tile_prog(struct nvkm_fb *, int, struct nvkm_fb_tile *);
39
40 void nv20_fb_tile_init(struct nvkm_fb *, int i, u32 addr, u32 size,
41                        u32 pitch, u32 flags, struct nvkm_fb_tile *);
42 void nv20_fb_tile_fini(struct nvkm_fb *, int i, struct nvkm_fb_tile *);
43 void nv20_fb_tile_prog(struct nvkm_fb *, int, struct nvkm_fb_tile *);
44
45 void nv30_fb_init(struct nvkm_fb *);
46 void nv30_fb_tile_init(struct nvkm_fb *, int i, u32 addr, u32 size,
47                        u32 pitch, u32 flags, struct nvkm_fb_tile *);
48
49 void nv40_fb_tile_comp(struct nvkm_fb *, int i, u32 size, u32 flags,
50                        struct nvkm_fb_tile *);
51
52 void nv41_fb_init(struct nvkm_fb *);
53 void nv41_fb_tile_prog(struct nvkm_fb *, int, struct nvkm_fb_tile *);
54
55 void nv44_fb_init(struct nvkm_fb *);
56 void nv44_fb_tile_prog(struct nvkm_fb *, int, struct nvkm_fb_tile *);
57
58 void nv46_fb_tile_init(struct nvkm_fb *, int i, u32 addr, u32 size,
59                        u32 pitch, u32 flags, struct nvkm_fb_tile *);
60
61 bool gf100_fb_memtype_valid(struct nvkm_fb *, u32);
62 #endif