aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/nouveau/nva3_pm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nva3_pm.c b/drivers/gpu/drm/nouveau/nva3_pm.c
index 5285b9813700..bc357c850dbd 100644
--- a/drivers/gpu/drm/nouveau/nva3_pm.c
+++ b/drivers/gpu/drm/nouveau/nva3_pm.c
@@ -128,7 +128,7 @@ nva3_pm_clock_pre(struct drm_device *dev, struct nouveau_pm_level *perflvl,
128 /* If target clock is within [-2, 3) MHz of a divisor, we'll 128 /* If target clock is within [-2, 3) MHz of a divisor, we'll
129 * use that instead of calculating MNP values 129 * use that instead of calculating MNP values
130 */ 130 */
131 pll->new_div = ((limits.refclk * 2) / (khz - 2999)) & 0x0f; 131 pll->new_div = min((limits.refclk * 2) / (khz - 2999), 16);
132 if (pll->new_div) { 132 if (pll->new_div) {
133 diff = khz - ((limits.refclk * 2) / pll->new_div); 133 diff = khz - ((limits.refclk * 2) / pll->new_div);
134 if (diff < -2000 || diff >= 3000) 134 if (diff < -2000 || diff >= 3000)