mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 05:39:54 -04:00
drm/nouveau/volt/gk104: round up in gk104_volt_set
We always want a equal or higher voltage than the requested ones, otherwise nouveau undervolts. Signed-off-by: Karol Herbst <nouveau@karolherbst.de> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
e976278ad2
commit
d07a97e939
1 changed files with 1 additions and 1 deletions
|
|
@ -56,7 +56,7 @@ gk104_volt_set(struct nvkm_volt *base, u32 uv)
|
|||
|
||||
/* the blob uses this crystal frequency, let's use it too. */
|
||||
div = 27648000 / bios->pwm_freq;
|
||||
duty = (uv - bios->base) * div / bios->pwm_range;
|
||||
duty = DIV_ROUND_UP((uv - bios->base) * div, bios->pwm_range);
|
||||
|
||||
nvkm_wr32(device, 0x20340, div);
|
||||
nvkm_wr32(device, 0x20344, 0x80000000 | duty);
|
||||
|
|
|
|||
Loading…
Reference in a new issue