Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 321622
b: refs/heads/master
c: 9830605
h: refs/heads/master
v: v3
  • Loading branch information
Dave Airlie committed Aug 10, 2012
1 parent ffe094e commit bfa55dc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f7b83b908fbecadefa73c0d76b9c719d09c1d96d
refs/heads/master: 9830605d4c070b16ec5c24a75503877cc7698409
12 changes: 7 additions & 5 deletions trunk/drivers/gpu/drm/mgag200/mgag200_mode.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,10 +468,11 @@ static int mga_g200er_set_plls(struct mga_device *mdev, long clock)
{
unsigned int vcomax, vcomin, pllreffreq;
unsigned int delta, tmpdelta;
unsigned int testr, testn, testm, testo;
int testr, testn, testm, testo;
unsigned int p, m, n;
unsigned int computed;
unsigned int computed, vco;
int tmp;
const unsigned int m_div_val[] = { 1, 2, 4, 8 };

m = n = p = 0;
vcomax = 1488000;
Expand All @@ -490,12 +491,13 @@ static int mga_g200er_set_plls(struct mga_device *mdev, long clock)
if (delta == 0)
break;
for (testo = 5; testo < 33; testo++) {
computed = pllreffreq * (testn + 1) /
vco = pllreffreq * (testn + 1) /
(testr + 1);
if (computed < vcomin)
if (vco < vcomin)
continue;
if (computed > vcomax)
if (vco > vcomax)
continue;
computed = vco / (m_div_val[testm] * (testo + 1));
if (computed > clock)
tmpdelta = computed - clock;
else
Expand Down

0 comments on commit bfa55dc

Please sign in to comment.