Subject: [PATCH] Intel FB pixel clock calculation fix
[safe/jmp/linux-2.6] / drivers / video / intelfb / intelfbhw.c
index 16bc8d7..b21d0de 100644 (file)
@@ -924,10 +924,10 @@ calc_pll_params(int index, int clock, u32 *retm1, u32 *retm2, u32 *retn, u32 *re
                        if (m > pll->max_m)
                                m = pll->max_m - 1;
                        for (testm = m - 1; testm <= m; testm++) {
-                               f_out = calc_vclock3(index, m, n, p);
+                               f_out = calc_vclock3(index, testm, n, p);
                                if (splitm(index, testm, &m1, &m2)) {
-                                       WRN_MSG("cannot split m = %d\n", m);
-                                       n++;
+                                       WRN_MSG("cannot split m = %d\n",
+                                               testm);
                                        continue;
                                }
                                if (clock > f_out)