* [Fwd: [PATCH] matroxfb: another attempt to rectify jitter (G450/G550)]
@ 2007-07-27 20:01 Paul A. Clarke
2007-07-27 21:21 ` Antonino A. Daplas
0 siblings, 1 reply; 2+ messages in thread
From: Paul A. Clarke @ 2007-07-27 20:01 UTC (permalink / raw)
To: linux-fbdev-devel
I posted this back in January, but it never got picked up.
Can we push it to -mm?
I'm including the Ack that Petr sent me off-list:
Petr Vandrovec wrote:
> I assume that Matrox blessed this code ;-) Unfortunately I cannot
> test it anymore as I moved to California last autumn, and I have no
> Matrox hardware anymore... So let's try to put it into -mm kernels, and
> let's see what happens ;-)
>
> Acked-by: Petr Vandrovec <petr@vandrovec.name>
>
> [somehow Mozilla dropped patch from reply...]
>
> Petr
-------- Original Message --------
Subject: [Linux-fbdev-devel] [PATCH] matroxfb: another attempt to rectify jitter (G450/G550)
Date: Mon, 22 Jan 2007 18:17:38 -0600
From: Paul A. Clarke <pc@us.ibm.com>
Reply-To: linux-fbdev-devel@lists.sourceforge.net
To: linux-fbdev-devel@lists.sourceforge.net
This builds upon my previous attempts to resolve some jitter problems seen with
the Matrox G450 and G550 -based cards, including odd disparities observed
between x86 and Power -based machines in a somewhat less hackish way (removing
the hacked ifdefs).
Apparently, preference should be given to use the DVI PLL when frequencies
permit, the Standard PLL otherwise. The max pixel clock for the panellink
interface is extracted from the PInS information on the card and used as a limit
to determine which PLL to use.
Signed-off-by: Paul A. Clarke <pc@us.ibm.com>
--
--- linux-2.6.19-rc6/drivers/video/matrox/matroxfb_base.h 2006-11-15
22:03:40.000000000 -0600
+++ patched/drivers/video/matrox/matroxfb_base.h 2006-11-22 13:02:58.000000000 -0600
@@ -424,6 +424,7 @@
} mmio;
unsigned int max_pixel_clock;
+ unsigned int max_pixel_clock_panellink;
struct matrox_switch* hw_switch;
--- linux-2.6.19-rc6/drivers/video/matrox/matroxfb_DAC1064.h 2006-11-15
22:03:40.000000000 -0600
+++ patched/drivers/video/matrox/matroxfb_DAC1064.h 2006-11-16
08:43:33.000000000 -0600
@@ -40,6 +40,21 @@
#define M1064_XCURCOL1GREEN 0x0D
#define M1064_XCURCOL1BLUE 0x0E
#define M1064_XDVICLKCTRL 0x0F
+ /* drive DVI by standard(0)/DVI(1) PLL */
+ /* if set(1), C?DVICLKEN and C?DVICLKSEL must be set(1) */
+#define M1064_XDVICLKCTRL_DVIDATAPATHSEL 0x01
+ /* drive CRTC1 by standard(0)/DVI(1) PLL */
+#define M1064_XDVICLKCTRL_C1DVICLKSEL 0x02
+ /* drive CRTC2 by standard(0)/DVI(1) PLL */
+#define M1064_XDVICLKCTRL_C2DVICLKSEL 0x04
+ /* pixel clock allowed to(0)/blocked from(1) driving CRTC1 */
+#define M1064_XDVICLKCTRL_C1DVICLKEN 0x08
+ /* DVI PLL loop filter bandwidth selection bits */
+#define M1064_XDVICLKCTRL_DVILOOPCTL 0x30
+ /* CRTC2 pixel clock allowed to(0)/blocked from(1) driving CRTC2 */
+#define M1064_XDVICLKCTRL_C2DVICLKEN 0x40
+ /* P1PLL loop filter bandwith selection */
+#define M1064_XDVICLKCTRL_P1LOOPBWDTCTL 0x80
#define M1064_XCURCOL2RED 0x10
#define M1064_XCURCOL2GREEN 0x11
#define M1064_XCURCOL2BLUE 0x12
--- linux-2.6.19-rc6/drivers/video/matrox/matroxfb_misc.c 2006-11-15
22:03:40.000000000 -0600
+++ patched/drivers/video/matrox/matroxfb_misc.c 2006-11-22 13:03:46.000000000 -0600
@@ -658,6 +658,7 @@
MINFO->values.reg.mctlwtst_core = (MINFO->values.reg.mctlwtst & ~7) |
wtst_xlat[MINFO->values.reg.mctlwtst & 7];
}
+ MINFO->max_pixel_clock_panellink = bd->pins[47] * 4000;
return 0;
}
--- linux-2.6.19-rc6/drivers/video/matrox/g450_pll.c 2006-11-15
22:03:40.000000000 -0600
+++ patched/drivers/video/matrox/g450_pll.c 2006-11-22 13:04:31.000000000 -0600
@@ -331,15 +331,15 @@
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__ */
+ /* DVI PLL preferred for frequencies up to panellink 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);
--
Regards,
Paul Clarke
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Fwd: [PATCH] matroxfb: another attempt to rectify jitter (G450/G550)]
2007-07-27 20:01 [Fwd: [PATCH] matroxfb: another attempt to rectify jitter (G450/G550)] Paul A. Clarke
@ 2007-07-27 21:21 ` Antonino A. Daplas
0 siblings, 0 replies; 2+ messages in thread
From: Antonino A. Daplas @ 2007-07-27 21:21 UTC (permalink / raw)
To: linux-fbdev-devel; +Cc: Paul A. Clarke
On Fri, 2007-07-27 at 15:01 -0500, Paul A. Clarke wrote:
> I posted this back in January, but it never got picked up.
>
> Can we push it to -mm?
Okay.
Tony
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-07-27 21:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-27 20:01 [Fwd: [PATCH] matroxfb: another attempt to rectify jitter (G450/G550)] Paul A. Clarke
2007-07-27 21:21 ` Antonino A. Daplas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).