162306a36Sopenharmony_ci/* SPDX-License-Identifier: MIT */ 262306a36Sopenharmony_ci#ifndef __NVIF_CLIENT_H__ 362306a36Sopenharmony_ci#define __NVIF_CLIENT_H__ 462306a36Sopenharmony_ci 562306a36Sopenharmony_ci#include <nvif/object.h> 662306a36Sopenharmony_ci 762306a36Sopenharmony_cistruct nvif_client { 862306a36Sopenharmony_ci struct nvif_object object; 962306a36Sopenharmony_ci const struct nvif_driver *driver; 1062306a36Sopenharmony_ci u64 version; 1162306a36Sopenharmony_ci u8 route; 1262306a36Sopenharmony_ci}; 1362306a36Sopenharmony_ci 1462306a36Sopenharmony_ciint nvif_client_ctor(struct nvif_client *parent, const char *name, u64 device, 1562306a36Sopenharmony_ci struct nvif_client *); 1662306a36Sopenharmony_civoid nvif_client_dtor(struct nvif_client *); 1762306a36Sopenharmony_ciint nvif_client_ioctl(struct nvif_client *, void *, u32); 1862306a36Sopenharmony_ciint nvif_client_suspend(struct nvif_client *); 1962306a36Sopenharmony_ciint nvif_client_resume(struct nvif_client *); 2062306a36Sopenharmony_ci 2162306a36Sopenharmony_ci/*XXX*/ 2262306a36Sopenharmony_ci#include <core/client.h> 2362306a36Sopenharmony_ci#define nvxx_client(a) ({ \ 2462306a36Sopenharmony_ci struct nvif_client *_client = (a); \ 2562306a36Sopenharmony_ci (struct nvkm_client *)_client->object.priv; \ 2662306a36Sopenharmony_ci}) 2762306a36Sopenharmony_ci#endif 28