diff options
author | Alexandre Courbot <acourbot@nvidia.com> | 2016-02-12 08:59:16 +0100 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2016-03-14 01:13:55 +0100 |
commit | 6871b34a0443e4910594c818c185901da81fdf3f (patch) | |
tree | d421c293eaa17d24ac91e06672498cc7fcc02a44 /drivers/gpu | |
parent | drm/nouveau/clk/gk20a: split gk20a_clk_new() (diff) | |
download | linux-6871b34a0443e4910594c818c185901da81fdf3f.tar.xz linux-6871b34a0443e4910594c818c185901da81fdf3f.zip |
drm/nouveau/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>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk20a.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk20a.c b/drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk20a.c index 4e92186a1bb3..4bc72b1231c8 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk20a.c +++ b/drivers/gpu/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; |