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