Skip to content

Commit

Permalink
VIDEO: cyberpro: select lowest multipler/divisor for PLL
Browse files Browse the repository at this point in the history
The lowest closest multiplier/divisor combination should be used for
the PLL, not the largest.  Reverse the search order.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Russell King committed Jan 28, 2011
1 parent 1bae4ce commit fcd3c77
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/video/cyber2000fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -681,9 +681,9 @@ cyber2000fb_decode_clock(struct par_info *hw, struct cfb_info *cfb,
* pll_ps_calc = best_div1 / (ref_ps * best_mult)
*/
best_diff = 0x7fffffff;
best_mult = 32;
best_div1 = 255;
for (t_div1 = 32; t_div1 > 1; t_div1 -= 1) {
best_mult = 2;
best_div1 = 32;
for (t_div1 = 2; t_div1 < 32; t_div1 += 1) {
u_int rr, t_mult, t_pll_ps;
int diff;

Expand Down

0 comments on commit fcd3c77

Please sign in to comment.