aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/core/include/subdev/clock.h
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2012-07-10 17:26:46 +1000
committerBen Skeggs <bskeggs@redhat.com>2012-10-03 13:12:47 +1000
commit70790f4f819875e8f390871fd15bbbf823f28e1b (patch)
tree47949ac5a0af23a9fe1ace1ac5fd8b8823b8e055 /drivers/gpu/drm/nouveau/core/include/subdev/clock.h
parentdrm/nouveau/clk: implement stub clock subdev (diff)
downloadlinux-dev-70790f4f819875e8f390871fd15bbbf823f28e1b.tar.xz
linux-dev-70790f4f819875e8f390871fd15bbbf823f28e1b.zip
drm/nouveau/clock: pull in the implementation from all over the place
Still missing the main bits we use to change performance levels, I'll get to it after all the hard yakka has been finished. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/core/include/subdev/clock.h')
-rw-r--r--drivers/gpu/drm/nouveau/core/include/subdev/clock.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/core/include/subdev/clock.h b/drivers/gpu/drm/nouveau/core/include/subdev/clock.h
index 137c4598a1b6..39e73b91d360 100644
--- a/drivers/gpu/drm/nouveau/core/include/subdev/clock.h
+++ b/drivers/gpu/drm/nouveau/core/include/subdev/clock.h
@@ -4,9 +4,21 @@
#include <core/device.h>
#include <core/subdev.h>
+struct nouveau_pll_vals;
+struct nvbios_pll;
+
struct nouveau_clock {
struct nouveau_subdev base;
- void (*pll_set)(struct nouveau_clock *, u32 type, u32 freq);
+
+ int (*pll_set)(struct nouveau_clock *, u32 type, u32 freq);
+
+ /*XXX: die, these are here *only* to support the completely
+ * bat-shit insane what-was-nouveau_hw.c code
+ */
+ int (*pll_calc)(struct nouveau_clock *, struct nvbios_pll *,
+ int clk, struct nouveau_pll_vals *pv);
+ int (*pll_prog)(struct nouveau_clock *, u32 reg1,
+ struct nouveau_pll_vals *pv);
};
static inline struct nouveau_clock *
@@ -37,4 +49,11 @@ extern struct nouveau_oclass nv50_clock_oclass;
extern struct nouveau_oclass nva3_clock_oclass;
extern struct nouveau_oclass nvc0_clock_oclass;
+int nv04_clock_pll_set(struct nouveau_clock *, u32 type, u32 freq);
+int nv04_clock_pll_calc(struct nouveau_clock *, struct nvbios_pll *,
+ int clk, struct nouveau_pll_vals *);
+int nv04_clock_pll_prog(struct nouveau_clock *, u32 reg1,
+ struct nouveau_pll_vals *);
+
+
#endif