From: Vince Hsu Date: Mon, 22 Dec 2014 09:11:40 +0000 (+0800) Subject: drm/nouveau/clk: allow users to enable auto mode when loading driver X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=9f79b5ce127dfa1241c2e23e40f900b998806a2c;p=openwrt%2Fstaging%2Fblogic.git drm/nouveau/clk: allow users to enable auto mode when loading driver 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 Signed-off-by: Ben Skeggs --- diff --git a/drivers/gpu/drm/nouveau/core/subdev/clock/base.c b/drivers/gpu/drm/nouveau/core/subdev/clock/base.c index b1bbe764fa35..bc095b470121 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/clock/base.c +++ b/drivers/gpu/drm/nouveau/core/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;