Merge tag 'mac80211-for-davem-2016-07-06' of git://git.kernel.org/pub/scm/linux/kerne...
[cascardo/linux.git] / 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         int (*oneinit)(struct nvkm_fb *);
10         void (*init)(struct nvkm_fb *);
11         void (*intr)(struct nvkm_fb *);
12
13         struct {
14                 int regions;
15                 void (*init)(struct nvkm_fb *, int i, u32 addr, u32 size,
16                              u32 pitch, u32 flags, struct nvkm_fb_tile *);
17                 void (*comp)(struct nvkm_fb *, int i, u32 size, u32 flags,
18                              struct nvkm_fb_tile *);
19                 void (*fini)(struct nvkm_fb *, int i, struct nvkm_fb_tile *);
20                 void (*prog)(struct nvkm_fb *, int i, struct nvkm_fb_tile *);
21         } tile;
22
23         int (*ram_new)(struct nvkm_fb *, struct nvkm_ram **);
24
25         bool (*memtype_valid)(struct nvkm_fb *, u32 memtype);
26 };
27
28 void nvkm_fb_ctor(const struct nvkm_fb_func *, struct nvkm_device *device,
29                   int index, struct nvkm_fb *);
30 int nvkm_fb_new_(const struct nvkm_fb_func *, struct nvkm_device *device,
31                  int index, struct nvkm_fb **);
32 int nvkm_fb_bios_memtype(struct nvkm_bios *);
33
34 bool nv04_fb_memtype_valid(struct nvkm_fb *, u32 memtype);
35
36 void nv10_fb_tile_init(struct nvkm_fb *, int i, u32 addr, u32 size,
37                        u32 pitch, u32 flags, struct nvkm_fb_tile *);
38 void nv10_fb_tile_fini(struct nvkm_fb *, int i, struct nvkm_fb_tile *);
39 void nv10_fb_tile_prog(struct nvkm_fb *, int, struct nvkm_fb_tile *);
40
41 void nv20_fb_tile_init(struct nvkm_fb *, int i, u32 addr, u32 size,
42                        u32 pitch, u32 flags, struct nvkm_fb_tile *);
43 void nv20_fb_tile_fini(struct nvkm_fb *, int i, struct nvkm_fb_tile *);
44 void nv20_fb_tile_prog(struct nvkm_fb *, int, struct nvkm_fb_tile *);
45
46 void nv30_fb_init(struct nvkm_fb *);
47 void nv30_fb_tile_init(struct nvkm_fb *, int i, u32 addr, u32 size,
48                        u32 pitch, u32 flags, struct nvkm_fb_tile *);
49
50 void nv40_fb_tile_comp(struct nvkm_fb *, int i, u32 size, u32 flags,
51                        struct nvkm_fb_tile *);
52
53 void nv41_fb_init(struct nvkm_fb *);
54 void nv41_fb_tile_prog(struct nvkm_fb *, int, struct nvkm_fb_tile *);
55
56 void nv44_fb_init(struct nvkm_fb *);
57 void nv44_fb_tile_prog(struct nvkm_fb *, int, struct nvkm_fb_tile *);
58
59 void nv46_fb_tile_init(struct nvkm_fb *, int i, u32 addr, u32 size,
60                        u32 pitch, u32 flags, struct nvkm_fb_tile *);
61
62 int gf100_fb_oneinit(struct nvkm_fb *);
63 bool gf100_fb_memtype_valid(struct nvkm_fb *, u32);
64 #endif