diff options
author | Alexandre Courbot <acourbot@nvidia.com> | 2016-02-12 16:59:16 +0900 |
---|---|---|
committer | Alexandre Courbot <acourbot@nvidia.com> | 2016-03-12 11:02:07 +0900 |
commit | 8630d0d2684b8c92110e602fe9553fee86b97491 (patch) | |
tree | 43167316b2343694001aa446905b8daed1ef8414 | |
parent | 1f554905922dd1fe220058524b299d488e696c40 (diff) | |
download | nouveau-8630d0d2684b8c92110e602fe9553fee86b97491.tar.gz |
clk/gk20a: set lowest frequency during init()
Err on the safe side by setting the lowest frequency (and thus voltage)
during device init.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
-rw-r--r-- | drm/nouveau/nvkm/subdev/clk/gk20a.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drm/nouveau/nvkm/subdev/clk/gk20a.c b/drm/nouveau/nvkm/subdev/clk/gk20a.c index 4e92186a1..4bc72b123 100644 --- a/drm/nouveau/nvkm/subdev/clk/gk20a.c +++ b/drm/nouveau/nvkm/subdev/clk/gk20a.c @@ -642,9 +642,12 @@ gk20a_clk_init(struct nvkm_clk *base) struct nvkm_device *device = subdev->device; int ret; - nvkm_mask(device, GPC2CLK_OUT, GPC2CLK_OUT_INIT_MASK, GPC2CLK_OUT_INIT_VAL); + nvkm_mask(device, GPC2CLK_OUT, GPC2CLK_OUT_INIT_MASK, + GPC2CLK_OUT_INIT_VAL); - ret = gk20a_clk_prog(&clk->base); + /* Start with lowest frequency */ + base->func->calc(base, &base->func->pstates[0].base); + ret = base->func->prog(&clk->base); if (ret) { nvkm_error(subdev, "cannot initialize clock\n"); return ret; |