Skip to content

Commit

Permalink
drm/nouveau/volt/pwm/gk104: fix an off-by-one resulting in the voltag…
Browse files Browse the repository at this point in the history
…e not being set

Reported-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Martin Peres <martin.peres@free.fr>
  • Loading branch information
Martin Peres authored and Ben Skeggs committed Nov 25, 2015
1 parent f5e5518 commit ef0e9f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk104.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ gk104_volt_set(struct nvkm_volt *base, u32 uv)
duty = (uv - bios->base) * div / bios->pwm_range;

nvkm_wr32(device, 0x20340, div);
nvkm_wr32(device, 0x20344, 0x8000000 | duty);
nvkm_wr32(device, 0x20344, 0x80000000 | duty);

return 0;
}
Expand Down

0 comments on commit ef0e9f5

Please sign in to comment.