1 #ifndef __NVKM_PM_PRIV_H__
2 #define __NVKM_PM_PRIV_H__
6 struct nvkm_object base
;
8 struct nvkm_perfsig
*signal
[4];
15 extern struct nvkm_oclass nvkm_pm_sclass
[];
17 #include <core/engctx.h>
20 struct nvkm_engctx base
;
23 extern struct nvkm_oclass nvkm_pm_cclass
;
36 nvkm_perfsig_wrap(struct nvkm_pm
*, const char *, struct nvkm_perfdom
**);
40 const struct nvkm_specsig
*signal
;
41 const struct nvkm_funcdom
*func
;
44 extern const struct nvkm_specdom gt215_pm_pwr
[];
45 extern const struct nvkm_specdom gf100_pm_pwr
[];
46 extern const struct nvkm_specdom gk104_pm_pwr
[];
49 struct list_head head
;
50 struct list_head list
;
51 const struct nvkm_funcdom
*func
;
56 struct nvkm_perfsig signal
[];
60 void (*init
)(struct nvkm_pm
*, struct nvkm_perfdom
*,
61 struct nvkm_perfctr
*);
62 void (*read
)(struct nvkm_pm
*, struct nvkm_perfdom
*,
63 struct nvkm_perfctr
*);
64 void (*next
)(struct nvkm_pm
*, struct nvkm_perfdom
*);
67 int nvkm_perfdom_new(struct nvkm_pm
*, const char *, u32
, u32
, u32
, u32
,
68 const struct nvkm_specdom
*);
70 #define nvkm_pm_create(p,e,o,d) \
71 nvkm_pm_create_((p), (e), (o), sizeof(**d), (void **)d)
72 #define nvkm_pm_dtor(p) ({ \
73 struct nvkm_pm *c = (p); \
74 _nvkm_pm_dtor(nv_object(c)); \
76 #define nvkm_pm_init(p) ({ \
77 struct nvkm_pm *c = (p); \
78 _nvkm_pm_init(nv_object(c)); \
80 #define nvkm_pm_fini(p,s) ({ \
81 struct nvkm_pm *c = (p); \
82 _nvkm_pm_fini(nv_object(c), (s)); \
85 int nvkm_pm_create_(struct nvkm_object
*, struct nvkm_object
*,
86 struct nvkm_oclass
*, int, void **);
87 void _nvkm_pm_dtor(struct nvkm_object
*);
88 int _nvkm_pm_init(struct nvkm_object
*);
89 int _nvkm_pm_fini(struct nvkm_object
*, bool);