• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* SPDX-License-Identifier: MIT */
2 #ifndef __NVKM_DISP_H__
3 #define __NVKM_DISP_H__
4 #define nvkm_disp(p) container_of((p), struct nvkm_disp, engine)
5 #include <core/engine.h>
6 #include <core/object.h>
7 #include <core/event.h>
8 
9 struct nvkm_disp {
10 	const struct nvkm_disp_func *func;
11 	struct nvkm_engine engine;
12 
13 	struct list_head heads;
14 	struct list_head iors;
15 	struct list_head outps;
16 	struct list_head conns;
17 
18 	struct nvkm_event hpd;
19 	struct nvkm_event vblank;
20 
21 	struct {
22 		struct workqueue_struct *wq;
23 		struct work_struct work;
24 		u32 pending;
25 		struct mutex mutex;
26 	} super;
27 
28 #define NVKM_DISP_EVENT_CHAN_AWAKEN BIT(0)
29 	struct nvkm_event uevent;
30 
31 	struct {
32 		unsigned long mask;
33 		int nr;
34 	} wndw, head, dac;
35 
36 	struct {
37 		unsigned long mask;
38 		int nr;
39 		u32 lvdsconf;
40 	} sor;
41 
42 	struct {
43 		unsigned long mask;
44 		int nr;
45 		u8 type[3];
46 	} pior;
47 
48 	struct nvkm_gpuobj *inst;
49 	struct nvkm_ramht *ramht;
50 
51 	struct nvkm_disp_chan *chan[81];
52 
53 	struct {
54 		spinlock_t lock;
55 		struct nvkm_object object;
56 	} client;
57 };
58 
59 int nv04_disp_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_disp **);
60 int nv50_disp_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_disp **);
61 int g84_disp_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_disp **);
62 int gt200_disp_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_disp **);
63 int g94_disp_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_disp **);
64 int mcp77_disp_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_disp **);
65 int gt215_disp_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_disp **);
66 int mcp89_disp_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_disp **);
67 int gf119_disp_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_disp **);
68 int gk104_disp_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_disp **);
69 int gk110_disp_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_disp **);
70 int gm107_disp_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_disp **);
71 int gm200_disp_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_disp **);
72 int gp100_disp_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_disp **);
73 int gp102_disp_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_disp **);
74 int gv100_disp_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_disp **);
75 int tu102_disp_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_disp **);
76 int ga102_disp_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_disp **);
77 #endif
78