1 /* SPDX-License-Identifier: MIT */
2 #ifndef __NVIF_CONN_H__
3 #define __NVIF_CONN_H__
4 #include <nvif/object.h>
5 #include <nvif/event.h>
6 struct nvif_disp;
7 
8 struct nvif_conn {
9 	struct nvif_object object;
10 	u32 id;
11 
12 	struct {
13 		enum {
14 			NVIF_CONN_VGA,
15 			NVIF_CONN_TV,
16 			NVIF_CONN_DVI_I,
17 			NVIF_CONN_DVI_D,
18 			NVIF_CONN_LVDS,
19 			NVIF_CONN_LVDS_SPWG,
20 			NVIF_CONN_HDMI,
21 			NVIF_CONN_DP,
22 			NVIF_CONN_EDP,
23 		} type;
24 	} info;
25 };
26 
27 int nvif_conn_ctor(struct nvif_disp *, const char *name, int id, struct nvif_conn *);
28 void nvif_conn_dtor(struct nvif_conn *);
29 
30 static inline int
nvif_conn_id(struct nvif_conn * conn)31 nvif_conn_id(struct nvif_conn *conn)
32 {
33 	return conn->object.handle;
34 }
35 
36 int nvif_conn_event_ctor(struct nvif_conn *, const char *name, nvif_event_func, u8 types,
37 			 struct nvif_event *);
38 #endif
39