priv.h 2.4 KB
Newer Older
1 2
#ifndef __NVKM_FB_PRIV_H__
#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 8
struct nvkm_fb_func {
	void *(*dtor)(struct nvkm_fb *);
9
	u32 (*tags)(struct nvkm_fb *);
10
	int (*oneinit)(struct nvkm_fb *);
11
	void (*init)(struct nvkm_fb *);
12
	int (*init_page)(struct nvkm_fb *);
13
	void (*init_unkn)(struct nvkm_fb *);
14 15 16 17 18 19 20 21 22 23 24 25
	void (*intr)(struct nvkm_fb *);

	struct {
		int regions;
		void (*init)(struct nvkm_fb *, int i, u32 addr, u32 size,
			     u32 pitch, u32 flags, struct nvkm_fb_tile *);
		void (*comp)(struct nvkm_fb *, int i, u32 size, u32 flags,
			     struct nvkm_fb_tile *);
		void (*fini)(struct nvkm_fb *, int i, struct nvkm_fb_tile *);
		void (*prog)(struct nvkm_fb *, int i, struct nvkm_fb_tile *);
	} tile;

26
	int (*ram_new)(struct nvkm_fb *, struct nvkm_ram **);
27

28
	u8 default_bigpage;
29 30
};

31 32 33 34 35 36 37 38 39 40 41
void nvkm_fb_ctor(const struct nvkm_fb_func *, struct nvkm_device *device,
		  int index, struct nvkm_fb *);
int nvkm_fb_new_(const struct nvkm_fb_func *, struct nvkm_device *device,
		 int index, struct nvkm_fb **);
int nvkm_fb_bios_memtype(struct nvkm_bios *);

void nv10_fb_tile_init(struct nvkm_fb *, int i, u32 addr, u32 size,
		       u32 pitch, u32 flags, struct nvkm_fb_tile *);
void nv10_fb_tile_fini(struct nvkm_fb *, int i, struct nvkm_fb_tile *);
void nv10_fb_tile_prog(struct nvkm_fb *, int, struct nvkm_fb_tile *);

42
u32 nv20_fb_tags(struct nvkm_fb *);
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
void nv20_fb_tile_init(struct nvkm_fb *, int i, u32 addr, u32 size,
		       u32 pitch, u32 flags, struct nvkm_fb_tile *);
void nv20_fb_tile_fini(struct nvkm_fb *, int i, struct nvkm_fb_tile *);
void nv20_fb_tile_prog(struct nvkm_fb *, int, struct nvkm_fb_tile *);

void nv30_fb_init(struct nvkm_fb *);
void nv30_fb_tile_init(struct nvkm_fb *, int i, u32 addr, u32 size,
		       u32 pitch, u32 flags, struct nvkm_fb_tile *);

void nv40_fb_tile_comp(struct nvkm_fb *, int i, u32 size, u32 flags,
		       struct nvkm_fb_tile *);

void nv41_fb_init(struct nvkm_fb *);
void nv41_fb_tile_prog(struct nvkm_fb *, int, struct nvkm_fb_tile *);

void nv44_fb_init(struct nvkm_fb *);
void nv44_fb_tile_prog(struct nvkm_fb *, int, struct nvkm_fb_tile *);

void nv46_fb_tile_init(struct nvkm_fb *, int i, u32 addr, u32 size,
		       u32 pitch, u32 flags, struct nvkm_fb_tile *);

64
int gf100_fb_oneinit(struct nvkm_fb *);
65
int gf100_fb_init_page(struct nvkm_fb *);
66

67
int gm200_fb_init_page(struct nvkm_fb *);
68
#endif