nv50.h 1.9 KB
Newer Older
1 2
#ifndef __NV50_DISP_H__
#define __NV50_DISP_H__
3
#define nv50_disp(p) container_of((p), struct nv50_disp, base)
4
#include "priv.h"
5
struct nvkm_head;
6

B
Ben Skeggs 已提交
7
struct nv50_disp {
8
	const struct nv50_disp_func *func;
9
	struct nvkm_disp base;
10

11
	struct workqueue_struct *wq;
12 13 14
	struct work_struct supervisor;
	u32 super;

15 16
	struct nvkm_event uevent;

17
	struct {
18
		u32 lvdsconf;
19
	} sor;
20

21 22 23
	struct {
		u8 type[3];
	} pior;
24 25

	struct nv50_disp_chan *chan[17];
26 27
};

28
void nv50_disp_super_1(struct nv50_disp *);
29
void nv50_disp_super_1_0(struct nv50_disp *, struct nvkm_head *);
30
void nv50_disp_super_2_0(struct nv50_disp *, struct nvkm_head *);
31
void nv50_disp_super_2_1(struct nv50_disp *, struct nvkm_head *);
32
void nv50_disp_super_2_2(struct nv50_disp *, struct nvkm_head *);
33
void nv50_disp_super_3_0(struct nv50_disp *, struct nvkm_head *);
34

35 36 37 38 39 40 41
int nv50_disp_new_(const struct nv50_disp_func *, struct nvkm_device *,
		   int index, int heads, struct nvkm_disp **);
int gf119_disp_new_(const struct nv50_disp_func *, struct nvkm_device *,
		    int index, struct nvkm_disp **);

struct nv50_disp_func {
	void (*intr)(struct nv50_disp *);
42
	void (*intr_error)(struct nv50_disp *, int chid);
43 44 45 46 47 48 49

	const struct nvkm_event_func *uevent;
	void (*super)(struct work_struct *);

	const struct nvkm_disp_oclass *root;

	struct {
50
		int (*new)(struct nvkm_disp *, int id);
51 52 53 54
	} head;

	struct {
		int nr;
55
		int (*new)(struct nvkm_disp *, int id);
56 57 58 59
	} dac;

	struct {
		int nr;
60
		int (*new)(struct nvkm_disp *, int id);
61 62 63 64
	} sor;

	struct {
		int nr;
65
		int (*new)(struct nvkm_disp *, int id);
66 67 68 69
	} pior;
};

void nv50_disp_intr(struct nv50_disp *);
70
void nv50_disp_super(struct work_struct *);
71

72
void gf119_disp_intr(struct nv50_disp *);
73
void gf119_disp_super(struct work_struct *);
74
void gf119_disp_intr_error(struct nv50_disp *, int);
75 76 77 78

void nv50_disp_dptmds_war_2(struct nv50_disp *, struct dcb_output *);
void nv50_disp_dptmds_war_3(struct nv50_disp *, struct dcb_output *);
void nv50_disp_update_sppll1(struct nv50_disp *);
79
#endif