1b7019ac5SIlia Mirkin /* SPDX-License-Identifier: MIT */ 2c39f472eSBen Skeggs #ifndef __NVKM_DISP_CONN_H__ 3c39f472eSBen Skeggs #define __NVKM_DISP_CONN_H__ 4*95983aeaSBen Skeggs #include "priv.h" 55025407bSBen Skeggs 6878da15aSBen Skeggs #include <subdev/bios.h> 7878da15aSBen Skeggs #include <subdev/bios/conn.h> 8878da15aSBen Skeggs 9981a8162SBen Skeggs struct nvkm_conn { 10f2c906fcSBen Skeggs struct nvkm_disp *disp; 11c39f472eSBen Skeggs int index; 12f2c906fcSBen Skeggs struct nvbios_connE info; 13c39f472eSBen Skeggs 14f2c906fcSBen Skeggs struct list_head head; 15*95983aeaSBen Skeggs 16*95983aeaSBen Skeggs struct nvkm_object object; 17c39f472eSBen Skeggs }; 18c39f472eSBen Skeggs 19981a8162SBen Skeggs int nvkm_conn_new(struct nvkm_disp *, int index, struct nvbios_connE *, 20981a8162SBen Skeggs struct nvkm_conn **); 21981a8162SBen Skeggs void nvkm_conn_del(struct nvkm_conn **); 22c39f472eSBen Skeggs 23f2c906fcSBen Skeggs #define CONN_MSG(c,l,f,a...) do { \ 24981a8162SBen Skeggs struct nvkm_conn *_conn = (c); \ 25f2c906fcSBen Skeggs nvkm_##l(&_conn->disp->engine.subdev, "conn %02x:%02x%02x: "f"\n", \ 26f2c906fcSBen Skeggs _conn->index, _conn->info.location, _conn->info.type, ##a); \ 27c39f472eSBen Skeggs } while(0) 28f2c906fcSBen Skeggs #define CONN_ERR(c,f,a...) CONN_MSG((c), error, f, ##a) 29f2c906fcSBen Skeggs #define CONN_DBG(c,f,a...) CONN_MSG((c), debug, f, ##a) 30f2c906fcSBen Skeggs #define CONN_TRACE(c,f,a...) CONN_MSG((c), trace, f, ##a) 31c39f472eSBen Skeggs #endif 32