From bfb61f43b37158d432a1897bc2a4bbbd41215fae Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Wed, 20 Apr 2011 14:15:49 +1000 Subject: [PATCH] drm/nva3/pm: allow use of divisor 16 Signed-off-by: Ben Skeggs --- drivers/gpu/drm/nouveau/nva3_pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nva3_pm.c b/drivers/gpu/drm/nouveau/nva3_pm.c index 5285b981370..bc357c850db 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, /* If target clock is within [-2, 3) MHz of a divisor, we'll * use that instead of calculating MNP values */ - pll->new_div = ((limits.refclk * 2) / (khz - 2999)) & 0x0f; + pll->new_div = min((limits.refclk * 2) / (khz - 2999), 16); if (pll->new_div) { diff = khz - ((limits.refclk * 2) / pll->new_div); if (diff < -2000 || diff >= 3000) -- 2.20.1