]>
git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - drivers/gpu/drm/nouveau/core/subdev/pwr/priv.h
ddc614f9a99de551c42b47bc593d35d1de2d12c9
1 #ifndef __NVKM_PWR_PRIV_H__
2 #define __NVKM_PWR_PRIV_H__
4 #include <subdev/pwr.h>
5 #include <subdev/pwr/fuc/os.h>
7 #define nouveau_pwr_create(p, e, o, d) \
8 nouveau_pwr_create_((p), (e), (o), sizeof(**d), (void **)d)
9 #define nouveau_pwr_destroy(p) \
10 nouveau_subdev_destroy(&(p)->base)
11 #define nouveau_pwr_init(p) ({ \
12 struct nouveau_pwr *_ppwr = (p); \
13 _nouveau_pwr_init(nv_object(_ppwr)); \
15 #define nouveau_pwr_fini(p,s) ({ \
16 struct nouveau_pwr *_ppwr = (p); \
17 _nouveau_pwr_fini(nv_object(_ppwr), (s)); \
20 int nouveau_pwr_create_(struct nouveau_object
*, struct nouveau_object
*,
21 struct nouveau_oclass
*, int, void **);
23 int _nouveau_pwr_ctor(struct nouveau_object
*, struct nouveau_object
*,
24 struct nouveau_oclass
*, void *, u32
,
25 struct nouveau_object
**);
26 #define _nouveau_pwr_dtor _nouveau_subdev_dtor
27 int _nouveau_pwr_init(struct nouveau_object
*);
28 int _nouveau_pwr_fini(struct nouveau_object
*, bool);
30 struct nvkm_pwr_impl
{
31 struct nouveau_oclass base
;