162306a36Sopenharmony_ci/* SPDX-License-Identifier: MIT */ 262306a36Sopenharmony_ci#ifndef __NVIF_CONN_H__ 362306a36Sopenharmony_ci#define __NVIF_CONN_H__ 462306a36Sopenharmony_ci#include <nvif/object.h> 562306a36Sopenharmony_ci#include <nvif/event.h> 662306a36Sopenharmony_cistruct nvif_disp; 762306a36Sopenharmony_ci 862306a36Sopenharmony_cistruct nvif_conn { 962306a36Sopenharmony_ci struct nvif_object object; 1062306a36Sopenharmony_ci}; 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_ciint nvif_conn_ctor(struct nvif_disp *, const char *name, int id, struct nvif_conn *); 1362306a36Sopenharmony_civoid nvif_conn_dtor(struct nvif_conn *); 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_cistatic inline int 1662306a36Sopenharmony_cinvif_conn_id(struct nvif_conn *conn) 1762306a36Sopenharmony_ci{ 1862306a36Sopenharmony_ci return conn->object.handle; 1962306a36Sopenharmony_ci} 2062306a36Sopenharmony_ci 2162306a36Sopenharmony_ci#define NVIF_CONN_HPD_STATUS_UNSUPPORTED 0 /* negative if query fails */ 2262306a36Sopenharmony_ci#define NVIF_CONN_HPD_STATUS_NOT_PRESENT 1 2362306a36Sopenharmony_ci#define NVIF_CONN_HPD_STATUS_PRESENT 2 2462306a36Sopenharmony_ciint nvif_conn_hpd_status(struct nvif_conn *); 2562306a36Sopenharmony_ci 2662306a36Sopenharmony_ciint nvif_conn_event_ctor(struct nvif_conn *, const char *name, nvif_event_func, u8 types, 2762306a36Sopenharmony_ci struct nvif_event *); 2862306a36Sopenharmony_ci#endif 29