]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/video/matrox/g450_pll.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394...
[linux-2.6-omap-h63xx.git] / drivers / video / matrox / g450_pll.c
index 7c76e079ca7d378495f4d4b27e583531e0da172a..d42346e7fdda104da9e64776c21f3b8332812a7a 100644 (file)
@@ -331,16 +331,19 @@ static int __g450_setclk(WPMINFO unsigned int fout, unsigned int pll,
                                        tmp |= M1064_XPIXCLKCTRL_PLL_UP;
                                }
                                matroxfb_DAC_out(PMINFO M1064_XPIXCLKCTRL, tmp);
-#ifdef __powerpc__
-                               /* This is necessary to avoid jitter on PowerPC
-                                * (OpenFirmware) systems, but apparently
-                                * introduces jitter, at least on a x86-64
-                                * using DVI.
-                                * A simple workaround is disable for non-PPC.
-                                */
-                               matroxfb_DAC_out(PMINFO M1064_XDVICLKCTRL, 0);
-#endif /* __powerpc__ */
-                               matroxfb_DAC_out(PMINFO M1064_XPWRCTRL, xpwrctrl);
+                               /* DVI PLL preferred for frequencies up to
+                                  panel link max, standard PLL otherwise */
+                               if (fout >= MINFO->max_pixel_clock_panellink)
+                                       tmp = 0;
+                               else tmp =
+                                       M1064_XDVICLKCTRL_DVIDATAPATHSEL |
+                                       M1064_XDVICLKCTRL_C1DVICLKSEL |
+                                       M1064_XDVICLKCTRL_C1DVICLKEN |
+                                       M1064_XDVICLKCTRL_DVILOOPCTL |
+                                       M1064_XDVICLKCTRL_P1LOOPBWDTCTL;
+                               matroxfb_DAC_out(PMINFO M1064_XDVICLKCTRL,tmp);
+                               matroxfb_DAC_out(PMINFO M1064_XPWRCTRL,
+                                                xpwrctrl);
 
                                matroxfb_DAC_unlock_irqrestore(flags);
                        }