1 #ifndef __NVKM_DISP_CONN_H__ 2 #define __NVKM_DISP_CONN_H__ 3 4 #include "priv.h" 5 6 struct nvkm_connector { 7 struct nouveau_object base; 8 struct list_head head; 9 10 struct nvbios_connE info; 11 int index; 12 13 struct nvkm_notify hpd; 14 }; 15 16 #define nvkm_connector_create(p,e,c,b,i,d) \ 17 nvkm_connector_create_((p), (e), (c), (b), (i), sizeof(**d), (void **)d) 18 #define nvkm_connector_destroy(d) ({ \ 19 struct nvkm_connector *disp = (d); \ 20 _nvkm_connector_dtor(nv_object(disp)); \ 21 }) 22 #define nvkm_connector_init(d) ({ \ 23 struct nvkm_connector *disp = (d); \ 24 _nvkm_connector_init(nv_object(disp)); \ 25 }) 26 #define nvkm_connector_fini(d,s) ({ \ 27 struct nvkm_connector *disp = (d); \ 28 _nvkm_connector_fini(nv_object(disp), (s)); \ 29 }) 30 31 int nvkm_connector_create_(struct nouveau_object *, struct nouveau_object *, 32 struct nouveau_oclass *, struct nvbios_connE *, 33 int, int, void **); 34 35 int _nvkm_connector_ctor(struct nouveau_object *, struct nouveau_object *, 36 struct nouveau_oclass *, void *, u32, 37 struct nouveau_object **); 38 void _nvkm_connector_dtor(struct nouveau_object *); 39 int _nvkm_connector_init(struct nouveau_object *); 40 int _nvkm_connector_fini(struct nouveau_object *, bool); 41 42 struct nvkm_connector_impl { 43 struct nouveau_oclass base; 44 }; 45 46 #ifndef MSG 47 #define MSG(l,f,a...) do { \ 48 struct nvkm_connector *_conn = (void *)conn; \ 49 nv_##l(_conn, "%02x:%02x%02x: "f, _conn->index, \ 50 _conn->info.location, _conn->info.type, ##a); \ 51 } while(0) 52 #define DBG(f,a...) MSG(debug, f, ##a) 53 #define ERR(f,a...) MSG(error, f, ##a) 54 #endif 55 56 #endif 57