blob: cd6fbfa887621efcf147365b29c8603dbe463da4 [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 Skeggsa01ca782015-08-20 14:54:15 +10009 u8 route;
Ben Skeggsc39f4722015-01-13 22:13:14 +100010 bool super;
11};
12
Ben Skeggsa01ca782015-08-20 14:54:15 +100013int nvif_client_init(const char *drv, const char *name, u64 device,
14 const char *cfg, const char *dbg,
Ben Skeggsc39f4722015-01-13 22:13:14 +100015 struct nvif_client *);
16void nvif_client_fini(struct nvif_client *);
Ben Skeggsc39f4722015-01-13 22:13:14 +100017int nvif_client_ioctl(struct nvif_client *, void *, u32);
18int nvif_client_suspend(struct nvif_client *);
19int nvif_client_resume(struct nvif_client *);
20
21/*XXX*/
22#include <core/client.h>
Ben Skeggsa01ca782015-08-20 14:54:15 +100023#define nvxx_client(a) ({ \
24 struct nvif_client *_client = (a); \
25 nvkm_client(_client->object.priv); \
Ben Skeggsc39f4722015-01-13 22:13:14 +100026})
Ben Skeggsc39f4722015-01-13 22:13:14 +100027#endif