3 #include <core/subdev.h>
4 #include <core/notify.h>
15 nv_clk_src_hclkm2d3, /* NVAA */
16 nv_clk_src_hclkm4, /* NVAA */
17 nv_clk_src_cclk, /* NVAA */
24 nv_clk_src_mpllsrcref,
51 struct list_head head;
53 u32 domain[nv_clk_src_max];
57 struct list_head head;
58 struct list_head list; /* c-states */
59 struct nvkm_cstate base;
66 u8 bios; /* 0xff for none */
67 #define NVKM_CLK_DOM_FLAG_CORE 0x01
74 const struct nvkm_clk_func *func;
75 struct nvkm_subdev subdev;
77 const struct nvkm_domain *domains;
78 struct nvkm_pstate bstate;
80 struct list_head states;
83 struct work_struct work;
84 wait_queue_head_t wait;
87 struct nvkm_notify pwrsrc_ntfy;
89 int pstate; /* current */
90 int ustate_ac; /* user-requested (-1 disabled, -2 perfmon) */
91 int ustate_dc; /* user-requested (-1 disabled, -2 perfmon) */
92 int astate; /* perfmon adjustment (base) */
93 int tstate; /* thermal adjustment (max-) */
94 int dstate; /* display adjustment (min+) */
98 /*XXX: die, these are here *only* to support the completely
99 * bat-shit insane what-was-nouveau_hw.c code
101 int (*pll_calc)(struct nvkm_clk *, struct nvbios_pll *, int clk,
102 struct nvkm_pll_vals *pv);
103 int (*pll_prog)(struct nvkm_clk *, u32 reg1, struct nvkm_pll_vals *pv);
106 int nvkm_clk_read(struct nvkm_clk *, enum nv_clk_src);
107 int nvkm_clk_ustate(struct nvkm_clk *, int req, int pwr);
108 int nvkm_clk_astate(struct nvkm_clk *, int req, int rel, bool wait);
109 int nvkm_clk_dstate(struct nvkm_clk *, int req, int rel);
110 int nvkm_clk_tstate(struct nvkm_clk *, int req, int rel);
112 int nv04_clk_new(struct nvkm_device *, int, struct nvkm_clk **);
113 int nv40_clk_new(struct nvkm_device *, int, struct nvkm_clk **);
114 int nv50_clk_new(struct nvkm_device *, int, struct nvkm_clk **);
115 int g84_clk_new(struct nvkm_device *, int, struct nvkm_clk **);
116 int mcp77_clk_new(struct nvkm_device *, int, struct nvkm_clk **);
117 int gt215_clk_new(struct nvkm_device *, int, struct nvkm_clk **);
118 int gf100_clk_new(struct nvkm_device *, int, struct nvkm_clk **);
119 int gk104_clk_new(struct nvkm_device *, int, struct nvkm_clk **);
120 int gk20a_clk_new(struct nvkm_device *, int, struct nvkm_clk **);