[Nouveau] [PATCH V2 4/4] clk: allow users to enable auto mode when loading driver
Vince Hsu
vinceh at nvidia.com
Mon Dec 22 01:11:40 PST 2014
This patch adds one option for the boot config strings "NvClkMode*", so
that we can enable the "auto" mode when loading module.
Signed-off-by: Vince Hsu <vinceh at nvidia.com>
---
v2: none. (v1 is the RFC)
nvkm/subdev/clock/base.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/nvkm/subdev/clock/base.c b/nvkm/subdev/clock/base.c
index b1bbe764fa35..bc095b470121 100644
--- a/nvkm/subdev/clock/base.c
+++ b/nvkm/subdev/clock/base.c
@@ -401,6 +401,9 @@ nouveau_clock_nstate(struct nouveau_clock *clk, const char *mode, int arglen)
{
int ret = 1;
+ if (clk->allow_reclock && !strncasecmpz(mode, "auto", arglen))
+ return -2;
+
if (strncasecmpz(mode, "disabled", arglen)) {
char save = mode[arglen];
long v;
--
1.9.1
More information about the Nouveau
mailing list