diff options
author | David Airlie <airlied@asimov.stargames.com.au> | 2006-03-22 09:42:32 +1100 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2006-06-02 10:01:40 +1000 |
commit | 595084d955237f65ddbdc811083b44a328f53e5a (patch) | |
tree | 16d57317aad17352fc709ac60c9a66e97ab63440 | |
parent | fd643d3f35a36fc7ecdd03b4c9a6e21e59a96090 (diff) | |
download | xorg-driver-xf86-video-intel-595084d955237f65ddbdc811083b44a328f53e5a.tar.gz |
fix testm calculation
-rw-r--r-- | src/i830_raw.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/i830_raw.c b/src/i830_raw.c index ca5234fc..7efdbdf6 100644 --- a/src/i830_raw.c +++ b/src/i830_raw.c @@ -177,11 +177,12 @@ i9xx_calc_pll_params(int index, int clock, do { m = ROUND_UP_TO(f_vco * n, PLL_REFCLK) / PLL_REFCLK; fprintf(stderr,"trying m %d n %d\n", m, n); + if (m < plls[index].min_m) + m = plls[index].min_m + 1; + if (m > plls[index].max_m) + m = plls[index].max_m - 1; for (testm = m - 1; testm <= m; testm++) { - if (testm < plls[index].min_m) - testm = plls[index].min_m; - if (testm > plls[index].max_m) - testm = plls[index].max_m; + f_out = CALC_VCLOCK3(testm, n, p); if (splitm(index, testm, &m1, &m2)) { DPRINTF(PFX, "cannot split m = %d\n", testm); |