Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ef0e9f55 authored by Martin Peres's avatar Martin Peres Committed by Ben Skeggs
Browse files

drm/nouveau/volt/pwm/gk104: fix an off-by-one resulting in the voltage not being set

parent f5e55187
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
}