From: Paul A. Clarke <hidden> Date: 2007-01-30 20:25:03
I'm resubmitting this with Petr's "Ack", which he sent to me privately.
Could this patch be added to -mm ?
Petr Vandrovec wrote:
I assume that Matrox blessed this code ;-) Unfortunately I cannot
test it anymore as 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 <redacted>
[somehow Mozilla dropped patch from reply...]
Petr
--
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 for architecture).
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 <redacted>
Acked-by: Petr Vandrovec <redacted>
--
@@ -331,15 +331,15 @@tmp|=M1064_XPIXCLKCTRL_PLL_UP;}matroxfb_DAC_out(PMINFOM1064_XPIXCLKCTRL,tmp);-#ifdef __powerpc__-/* This is necessary to avoid jitter on PowerPC-*(OpenFirmware)systems,butapparently-*introducesjitter,atleastonax86-64-*usingDVI.-*Asimpleworkaroundisdisablefornon-PPC.-*/-matroxfb_DAC_out(PMINFOM1064_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 A. Clarke, IBM
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
--
Ville Syrjälä
syrjala@sci.fi
http://www.sci.fi/~syrjala/
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
From: Paul A. Clarke <hidden> Date: 2007-01-31 21:59:10
Ville Syrjälä wrote:
On Tue, Jan 30, 2007 at 02:22:37PM -0600, Paul A. Clarke wrote:
snip...
quoted
+ /* 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 |
Shouldn't this check which CRTC is driving the DVI?
If I read the code correctly, I don't see any way this code gets invoked for CRTC2. __g450_setclk() is only called by
matroxfb_g450_setclk(), which is in turn called in 8 places:
- 2 with pll == M_VIDEO_PLL (a different case in the enclosing switch)
- 1 with pll == M_SYSTEM_PLL (a different case in the enclosing switch)
- 3 which if (m->crtc != MATROXFB_SRC_CRTC1) then pll == M_VIDEO_PLL
- 2 with M_PIXEL_PLL_A and M_PIXEL_PLL_B (once each) at init time to set legacy VGA clocks with both CRTCs disabled
I'll also admit that my level of expertise here is not what I'd prefer, but my (perhaps suboptimal) testing showed good results.
--
Regards,
Paul Clarke
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
From: Ville Syrjälä <syrjala@sci.fi> Date: 2007-01-31 22:37:11
On Wed, Jan 31, 2007 at 03:58:11PM -0600, Paul A. Clarke wrote:
Ville Syrjälä wrote:
quoted
On Tue, Jan 30, 2007 at 02:22:37PM -0600, Paul A. Clarke wrote:
snip...
quoted
+ /* 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 |
Shouldn't this check which CRTC is driving the DVI?
If I read the code correctly, I don't see any way this code gets invoked for CRTC2. __g450_setclk() is only called by
matroxfb_g450_setclk(), which is in turn called in 8 places:
- 2 with pll == M_VIDEO_PLL (a different case in the enclosing switch)
- 1 with pll == M_SYSTEM_PLL (a different case in the enclosing switch)
- 3 which if (m->crtc != MATROXFB_SRC_CRTC1) then pll == M_VIDEO_PLL
- 2 with M_PIXEL_PLL_A and M_PIXEL_PLL_B (once each) at init time to set legacy VGA clocks with both CRTCs disabled
I see. It seems to always use VIDPLL with CRTC2. So if DVICLK is to be
used with CRTC2 it apparently needs to be added in the VIDPLL case.
Hmmm. I wonder if the code even supports CRTC2+DVI because the CRTC2
code seems to leave the C2PIXCLK selection to PCICLK if CRTC2 drives DVI
only. Did you try to map CRTC2 to DVI?
Unfortunately I don't have a TFT so I can't actually test this stuff.
Probably time to get one... :)
--
Ville Syrjälä
syrjala@sci.fi
http://www.sci.fi/~syrjala/
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
From: Paul A. Clarke <hidden> Date: 2007-02-15 20:48:00
Ville,
Ville Syrjälä wrote:
I see. It seems to always use VIDPLL with CRTC2. So if DVICLK is to be
used with CRTC2 it apparently needs to be added in the VIDPLL case.
Hmmm. I wonder if the code even supports CRTC2+DVI because the CRTC2
code seems to leave the C2PIXCLK selection to PCICLK if CRTC2 drives DVI
only. Did you try to map CRTC2 to DVI?
So, I just (finally) ran the following tests, on a SLES10 system (2.6.16+) with
G450, both with and without the patch (results were identical):
- with "video=matroxfb:outputs:012"
D-shell DVI-D
on boot OK junk
X dual fb0/fb1 OK OK
X fb0 only black(!) junk
X fb1 only signal problems(!) OK, but yellow(?)
- with "video=matroxfb:outputs:021"
D-shell DVI-D
on boot junk OK
X dual fb0/fb1 OK OK
X fb0 only junk OK
X fb1 only OK, but yellow OK (blank)
Note that I ignored the DVI-A output, which is apparently the first "output".
Earlier testing showed pretty much what I'd expect on that channel.
So, it appears that CRTC2 can indeed drive DVI-D.
It also appears that this area still needs work, but any objections to moving
the suggested patch into -mm ? It provides clean signals and removes the
platform-specific hacked ifdefs.
--
Regards,
Paul Clarke
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
From: Ville Syrjälä <syrjala@sci.fi> Date: 2007-02-16 17:30:01
On Thu, Feb 15, 2007 at 02:47:27PM -0600, Paul A. Clarke wrote:
It also appears that this area still needs work, but any objections to moving
the suggested patch into -mm ? It provides clean signals and removes the
platform-specific hacked ifdefs.
No objections from me at least.
--
Ville Syrjälä
syrjala@sci.fi
http://www.sci.fi/~syrjala/
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
From: Petr Vandrovec <hidden> Date: 2007-02-17 06:34:16
Ville Syrjälä wrote:
On Thu, Feb 15, 2007 at 02:47:27PM -0600, Paul A. Clarke wrote:
quoted
It also appears that this area still needs work, but any objections to moving
the suggested patch into -mm ? It provides clean signals and removes the
platform-specific hacked ifdefs.
No objections from me at least.
I'm fine with this as well, as I announced earlier...
Petr
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV