ARM: pmu: add support for interrupt-affinity property
[linux/fpc-iii.git] / drivers / gpu / drm / nouveau / nvkm / engine / pm / priv.h
blob1e6eff2a6d79c687780bdf31a80d286f1dffb797
1 #ifndef __NVKM_PM_PRIV_H__
2 #define __NVKM_PM_PRIV_H__
3 #include <engine/pm.h>
5 struct nvkm_perfctr {
6 struct nvkm_object base;
7 struct list_head head;
8 struct nvkm_perfsig *signal[4];
9 int slot;
10 u32 logic_op;
11 u32 clk;
12 u32 ctr;
15 extern struct nvkm_oclass nvkm_pm_sclass[];
17 #include <core/engctx.h>
19 struct nvkm_perfctx {
20 struct nvkm_engctx base;
23 extern struct nvkm_oclass nvkm_pm_cclass;
25 struct nvkm_specsig {
26 u8 signal;
27 const char *name;
30 struct nvkm_perfsig {
31 const char *name;
34 struct nvkm_perfdom;
35 struct nvkm_perfctr *
36 nvkm_perfsig_wrap(struct nvkm_pm *, const char *, struct nvkm_perfdom **);
38 struct nvkm_specdom {
39 u16 signal_nr;
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[];
48 struct nvkm_perfdom {
49 struct list_head head;
50 struct list_head list;
51 const struct nvkm_funcdom *func;
52 char name[32];
53 u32 addr;
54 u8 quad;
55 u32 signal_nr;
56 struct nvkm_perfsig signal[];
59 struct nvkm_funcdom {
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);
90 #endif