summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorVince Hsu <vinceh@nvidia.com>2014-12-22 17:11:40 +0800
committerBen Skeggs <bskeggs@redhat.com>2015-01-22 12:15:05 +1000
commit9f79b5ce127dfa1241c2e23e40f900b998806a2c (patch)
treed37e41576dc7f2813a51d469ead31275dbb68acc /drivers/gpu/drm
parent9f7fd620af29d4501ed063333824562656d46da5 (diff)
downloadblackbird-obmc-linux-9f79b5ce127dfa1241c2e23e40f900b998806a2c.tar.gz
blackbird-obmc-linux-9f79b5ce127dfa1241c2e23e40f900b998806a2c.zip
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 <vinceh@nvidia.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/nouveau/core/subdev/clock/base.c3
1 files changed, 3 insertions, 0 deletions
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;
OpenPOWER on IntegriCloud