aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nva3_pm.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2011-04-27 12:34:21 -0400
committerBen Skeggs <bskeggs@redhat.com>2011-05-15 20:50:59 -0400
commit52eba8dd5e830a836425e92d002bc51e42d3280e (patch)
tree88faa691a4828e7a3ca874e4d8d45a2a6feff23f /drivers/gpu/drm/nouveau/nva3_pm.c
parent96d1fcf8b5a3a9c66fddeaa9fb71e4e68ee2e08b (diff)
drm/nva3/clk: better pll calculation when no fractional fb div available
The core/mem/shader clocks don't support the fractional feedback divider, causing our calculated clocks to be off by quite a lot in some cases. To solve this we will switch to a search-based algorithm when fN is NULL. For my NVA8 at PL3, this actually generates identical cooefficients to the binary driver. Hopefully that's a good sign, and that does not break VPLL calculation for someone.. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nva3_pm.c')
-rw-r--r--drivers/gpu/drm/nouveau/nva3_pm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nva3_pm.c b/drivers/gpu/drm/nouveau/nva3_pm.c
index bc357c850dbd..e4b2b9e934b2 100644
--- a/drivers/gpu/drm/nouveau/nva3_pm.c
+++ b/drivers/gpu/drm/nouveau/nva3_pm.c
@@ -104,7 +104,7 @@ nva3_pm_clock_pre(struct drm_device *dev, struct nouveau_pm_level *perflvl,
104{ 104{
105 struct nva3_pm_state *pll; 105 struct nva3_pm_state *pll;
106 struct pll_lims limits; 106 struct pll_lims limits;
107 int N, fN, M, P, diff; 107 int N, M, P, diff;
108 int ret, off; 108 int ret, off;
109 109
110 ret = get_pll_limits(dev, id, &limits); 110 ret = get_pll_limits(dev, id, &limits);
@@ -136,7 +136,7 @@ nva3_pm_clock_pre(struct drm_device *dev, struct nouveau_pm_level *perflvl,
136 } 136 }
137 137
138 if (!pll->new_div) { 138 if (!pll->new_div) {
139 ret = nv50_calc_pll2(dev, &limits, khz, &N, &fN, &M, &P); 139 ret = nva3_calc_pll(dev, &limits, khz, &N, NULL, &M, &P);
140 if (ret < 0) 140 if (ret < 0)
141 return ERR_PTR(ret); 141 return ERR_PTR(ret);
142 142