Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 27463
b: refs/heads/master
c: 8492f08
h: refs/heads/master
i:
  27461: c5f64b1
  27459: 408964c
  27455: 9fe79ab
v: v3
  • Loading branch information
Dave Airlie committed Apr 3, 2006
1 parent 44f7e9d commit 1192ecd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 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: d024960cff5173bef6e83c01cf9cd2763c2c0ab0
refs/heads/master: 8492f081e5552ff388068f612eae6f55f7210ed4
24 changes: 13 additions & 11 deletions trunk/drivers/video/intelfb/intelfbhw.c
Original file line number Diff line number Diff line change
Expand Up @@ -746,20 +746,22 @@ static int
splitm(int index, unsigned int m, unsigned int *retm1, unsigned int *retm2)
{
int m1, m2;

m1 = (m - 2 - (plls[index].min_m1 + plls[index].max_m2) / 2) / 5 - 2;
if (m1 < plls[index].min_m1)
m1 = plls[index].min_m1;
if (m1 > plls[index].max_m1)
m1 = plls[index].max_m1;
m2 = m - 5 * (m1 + 2) - 2;
if (m2 < plls[index].min_m2 || m2 > plls[index].max_m2 || m2 >= m1) {
return 1;
} else {
int testm;
/* no point optimising too much - brute force m */
for (m1 = plls[index].min_m1; m1 < plls[index].max_m1+1; m1++)
{
for (m2 = plls[index].min_m2; m2 < plls[index].max_m2+1; m2++)
{
testm = ( 5 * ( m1 + 2 )) + (m2 + 2);
if (testm == m)
{
*retm1 = (unsigned int)m1;
*retm2 = (unsigned int)m2;
*retm2 = (unsigned int)m2;
return 0;
}
}
}
return 1;
}

/* Split the P parameter into P1 and P2. */
Expand Down

0 comments on commit 1192ecd

Please sign in to comment.