18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: MIT */
28c2ecf20Sopenharmony_ci#ifndef __NVIF_CLIENT_H__
38c2ecf20Sopenharmony_ci#define __NVIF_CLIENT_H__
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci#include <nvif/object.h>
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_cistruct nvif_client {
88c2ecf20Sopenharmony_ci	struct nvif_object object;
98c2ecf20Sopenharmony_ci	const struct nvif_driver *driver;
108c2ecf20Sopenharmony_ci	u64 version;
118c2ecf20Sopenharmony_ci	u8 route;
128c2ecf20Sopenharmony_ci	bool super;
138c2ecf20Sopenharmony_ci};
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ciint  nvif_client_ctor(struct nvif_client *parent, const char *name, u64 device,
168c2ecf20Sopenharmony_ci		      struct nvif_client *);
178c2ecf20Sopenharmony_civoid nvif_client_dtor(struct nvif_client *);
188c2ecf20Sopenharmony_ciint  nvif_client_ioctl(struct nvif_client *, void *, u32);
198c2ecf20Sopenharmony_ciint  nvif_client_suspend(struct nvif_client *);
208c2ecf20Sopenharmony_ciint  nvif_client_resume(struct nvif_client *);
218c2ecf20Sopenharmony_ci
228c2ecf20Sopenharmony_ci/*XXX*/
238c2ecf20Sopenharmony_ci#include <core/client.h>
248c2ecf20Sopenharmony_ci#define nvxx_client(a) ({                                                      \
258c2ecf20Sopenharmony_ci	struct nvif_client *_client = (a);                                     \
268c2ecf20Sopenharmony_ci	(struct nvkm_client *)_client->object.priv;                            \
278c2ecf20Sopenharmony_ci})
288c2ecf20Sopenharmony_ci#endif
29