Commit 6871b34a authored by Alexandre Courbot's avatar Alexandre Courbot Committed by Ben Skeggs

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: default avatarAlexandre Courbot <acourbot@nvidia.com>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 2efd3908
...@@ -642,9 +642,12 @@ gk20a_clk_init(struct nvkm_clk *base) ...@@ -642,9 +642,12 @@ gk20a_clk_init(struct nvkm_clk *base)
struct nvkm_device *device = subdev->device; struct nvkm_device *device = subdev->device;
int ret; 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) { if (ret) {
nvkm_error(subdev, "cannot initialize clock\n"); nvkm_error(subdev, "cannot initialize clock\n");
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment