blob: 4d5db8039576baef9da12d27c86f9537383d0bb8 [file] [log] [blame]
Ben Skeggsc39f4722015-01-13 22:13:14 +10001#ifndef __NVIF_CLIENT_H__
2#define __NVIF_CLIENT_H__
3
4#include <nvif/object.h>
5
6struct nvif_client {
Ben Skeggsa01ca782015-08-20 14:54:15 +10007 struct nvif_object object;
Ben Skeggsc39f4722015-01-13 22:13:14 +10008 const struct nvif_driver *driver;
Ben Skeggs99d4d362015-08-20 14:54:16 +10009 u64 version;
Ben Skeggsa01ca782015-08-20 14:54:15 +100010 u8 route;
Ben Skeggsc39f4722015-01-13 22:13:14 +100011 bool super;
12};
13
Ben Skeggsa01ca782015-08-20 14:54:15 +100014int nvif_client_init(const char *drv, const char *name, u64 device,
15 const char *cfg, const char *dbg,
Ben Skeggsc39f4722015-01-13 22:13:14 +100016 struct nvif_client *);
17void nvif_client_fini(struct nvif_client *);
Ben Skeggsc39f4722015-01-13 22:13:14 +100018int nvif_client_ioctl(struct nvif_client *, void *, u32);
19int nvif_client_suspend(struct nvif_client *);
20int nvif_client_resume(struct nvif_client *);
21
22/*XXX*/
23#include <core/client.h>
Ben Skeggsa01ca782015-08-20 14:54:15 +100024#define nvxx_client(a) ({ \
25 struct nvif_client *_client = (a); \
26 nvkm_client(_client->object.priv); \
Ben Skeggsc39f4722015-01-13 22:13:14 +100027})
Ben Skeggsc39f4722015-01-13 22:13:14 +100028#endif