summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2011-04-20 06:15:49 +0200
committerBen Skeggs <bskeggs@redhat.com>2011-05-16 02:50:52 +0200
commitbfb61f43b37158d432a1897bc2a4bbbd41215fae (patch)
tree530d0ce6800a04f5a4107c3802afbcf3594bf36c /drivers/gpu
parentdrm/nvc0/pm: parse clock for pll 0x0a (0x137020) from perf table (diff)
downloadlinux-bfb61f43b37158d432a1897bc2a4bbbd41215fae.tar.xz
linux-bfb61f43b37158d432a1897bc2a4bbbd41215fae.zip
drm/nva3/pm: allow use of divisor 16
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
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,
/* 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)