summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nvkm
diff options
context:
space:
mode:
authorAlexandre Courbot <acourbot@nvidia.com>2016-02-12 08:59:16 +0100
committerBen Skeggs <bskeggs@redhat.com>2016-03-14 01:13:55 +0100
commit6871b34a0443e4910594c818c185901da81fdf3f (patch)
treed421c293eaa17d24ac91e06672498cc7fcc02a44 /drivers/gpu/drm/nouveau/nvkm
parentdrm/nouveau/clk/gk20a: split gk20a_clk_new() (diff)
downloadlinux-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/drm/nouveau/nvkm')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk20a.c7
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;