xref: /linux/drivers/gpu/drm/nouveau/nvkm/engine/disp/priv.h (revision b85d45947951d23cb22d90caecf4c1eb81342c96)
1 #ifndef __NVKM_DISP_PRIV_H__
2 #define __NVKM_DISP_PRIV_H__
3 #include <engine/disp.h>
4 #include "outp.h"
5 #include "outpdp.h"
6 
7 int nvkm_disp_ctor(const struct nvkm_disp_func *, struct nvkm_device *,
8 		   int index, int heads, struct nvkm_disp *);
9 int nvkm_disp_new_(const struct nvkm_disp_func *, struct nvkm_device *,
10 		   int index, int heads, struct nvkm_disp **);
11 void nvkm_disp_vblank(struct nvkm_disp *, int head);
12 
13 struct nvkm_disp_func_outp {
14 	int (* crt)(struct nvkm_disp *, int index, struct dcb_output *,
15 		    struct nvkm_output **);
16 	int (*  tv)(struct nvkm_disp *, int index, struct dcb_output *,
17 		    struct nvkm_output **);
18 	int (*tmds)(struct nvkm_disp *, int index, struct dcb_output *,
19 		    struct nvkm_output **);
20 	int (*lvds)(struct nvkm_disp *, int index, struct dcb_output *,
21 		    struct nvkm_output **);
22 	int (*  dp)(struct nvkm_disp *, int index, struct dcb_output *,
23 		    struct nvkm_output **);
24 };
25 
26 struct nvkm_disp_func {
27 	void *(*dtor)(struct nvkm_disp *);
28 	void (*intr)(struct nvkm_disp *);
29 
30 	const struct nvkm_disp_oclass *(*root)(struct nvkm_disp *);
31 
32 	struct {
33 		void (*vblank_init)(struct nvkm_disp *, int head);
34 		void (*vblank_fini)(struct nvkm_disp *, int head);
35 	} head;
36 
37 	struct {
38 		const struct nvkm_disp_func_outp internal;
39 		const struct nvkm_disp_func_outp external;
40 	} outp;
41 };
42 
43 int  nvkm_disp_ntfy(struct nvkm_object *, u32, struct nvkm_event **);
44 
45 extern const struct nvkm_disp_oclass nv04_disp_root_oclass;
46 
47 struct nvkm_disp_oclass {
48 	int (*ctor)(struct nvkm_disp *, const struct nvkm_oclass *,
49 		    void *data, u32 size, struct nvkm_object **);
50 	struct nvkm_sclass base;
51 };
52 #endif
53