xref: /linux/drivers/gpu/drm/nouveau/nvkm/engine/disp/conn.h (revision fcc8487d477a3452a1d0ccbdd4c5e0e1e3cb8bed)
1 #ifndef __NVKM_DISP_CONN_H__
2 #define __NVKM_DISP_CONN_H__
3 #include <engine/disp.h>
4 
5 #include <core/notify.h>
6 #include <subdev/bios.h>
7 #include <subdev/bios/conn.h>
8 
9 struct nvkm_connector {
10 	struct nvkm_disp *disp;
11 	int index;
12 	struct nvbios_connE info;
13 
14 	struct nvkm_notify hpd;
15 
16 	struct list_head head;
17 };
18 
19 int  nvkm_connector_new(struct nvkm_disp *, int index, struct nvbios_connE *,
20 			struct nvkm_connector **);
21 void nvkm_connector_del(struct nvkm_connector **);
22 void nvkm_connector_init(struct nvkm_connector *);
23 void nvkm_connector_fini(struct nvkm_connector *);
24 
25 #define CONN_MSG(c,l,f,a...) do {                                              \
26 	struct nvkm_connector *_conn = (c);                                    \
27 	nvkm_##l(&_conn->disp->engine.subdev, "conn %02x:%02x%02x: "f"\n",     \
28 		 _conn->index, _conn->info.location, _conn->info.type, ##a);   \
29 } while(0)
30 #define CONN_ERR(c,f,a...) CONN_MSG((c), error, f, ##a)
31 #define CONN_DBG(c,f,a...) CONN_MSG((c), debug, f, ##a)
32 #define CONN_TRACE(c,f,a...) CONN_MSG((c), trace, f, ##a)
33 #endif
34