1 /* SPDX-License-Identifier: MIT */ 2 #ifndef __NVKM_DISP_CONN_H__ 3 #define __NVKM_DISP_CONN_H__ 4 #include "priv.h" 5 6 #include <core/notify.h> 7 #include <subdev/bios.h> 8 #include <subdev/bios/conn.h> 9 10 struct nvkm_conn { 11 struct nvkm_disp *disp; 12 int index; 13 struct nvbios_connE info; 14 15 struct nvkm_notify hpd; 16 17 struct list_head head; 18 19 struct nvkm_object object; 20 }; 21 22 int nvkm_conn_new(struct nvkm_disp *, int index, struct nvbios_connE *, 23 struct nvkm_conn **); 24 void nvkm_conn_del(struct nvkm_conn **); 25 void nvkm_conn_init(struct nvkm_conn *); 26 void nvkm_conn_fini(struct nvkm_conn *); 27 28 #define CONN_MSG(c,l,f,a...) do { \ 29 struct nvkm_conn *_conn = (c); \ 30 nvkm_##l(&_conn->disp->engine.subdev, "conn %02x:%02x%02x: "f"\n", \ 31 _conn->index, _conn->info.location, _conn->info.type, ##a); \ 32 } while(0) 33 #define CONN_ERR(c,f,a...) CONN_MSG((c), error, f, ##a) 34 #define CONN_DBG(c,f,a...) CONN_MSG((c), debug, f, ##a) 35 #define CONN_TRACE(c,f,a...) CONN_MSG((c), trace, f, ##a) 36 #endif 37