Home | History | Annotate | Line # | Download | only in nvif
      1 /*	$NetBSD: client.h,v 1.3 2021/12/18 23:45:33 riastradh Exp $	*/
      2 
      3 /* SPDX-License-Identifier: MIT */
      4 #ifndef __NVIF_CLIENT_H__
      5 #define __NVIF_CLIENT_H__
      6 
      7 #include <nvif/object.h>
      8 
      9 struct nvif_client {
     10 	struct nvif_object object;
     11 	const struct nvif_driver *driver;
     12 	u64 version;
     13 	u8 route;
     14 	bool super;
     15 };
     16 
     17 int  nvif_client_init(struct nvif_client *parent, const char *name, u64 device,
     18 		      struct nvif_client *);
     19 void nvif_client_fini(struct nvif_client *);
     20 int  nvif_client_ioctl(struct nvif_client *, void *, u32);
     21 int  nvif_client_suspend(struct nvif_client *);
     22 int  nvif_client_resume(struct nvif_client *);
     23 
     24 /*XXX*/
     25 #include <core/client.h>
     26 #define nvxx_client(a) ({                                                      \
     27 	struct nvif_client *_client = (a);                                     \
     28 	(struct nvkm_client *)_client->object.priv;                            \
     29 })
     30 #endif
     31