The sync-on-green issue might be either 1) composite sync isn't being
setup, which I've not figured out how the kernel mga framebuffer driver
or the X mga driver does it, or 2) some bad DAC register offsets in the
X driver.
>From debugging, I'm pretty sure I'm taking the "sync-on-green" path
through the MGA X driver. And I've compared it to the mga framebuffer
driver, and can't see what might be going wrong. I'm certain I'm
hitting the code in X's "mga_dacG.c":
if (pMga->SyncOnGreen) {
MGA_NOT_HAL(pReg->DacRegs[MGA1064_GEN_CTL] &| ~0x20);
pReg->ExtVga[3] |= 0x40;
}
That, at face value, is equivalent to the frambuffer driver code matroxfb_DAC1064.h:
hw->DACreg[POS1064_XGENCTRL] &= ~M1064_XGENCTRL_SYNC_ON_GREEN_MASK;
hw->DACreg[POS1064_XGENCTRL] |= (m->sync &
FB_SYNC_ON_GREEN)?M1064_XGENCTRL_SYNC_ON_GREEN:M1064_XGENCTRL_NOT_SYNC_ON_GREEN;
I look at the register indices being used and I'm stumped... The X
driver register offset is (mga_reg.h):
#define MGA1064_GEN_CTL 0x1d
While the frambuffer driver uses an enum that would make
"POS1064_XGENCTRL" an offset of 0x0f (in matroxfb_DAC1064.h):
enum POS1064 {
POS1064_XCURADDL=0, POS1064_XCURADDH, POS1064_XCURCTRL,
POS1064_XCURCOL0RED, POS1064_XCURCOL0GREEN, POS1064_XCURCOL0BLUE,
POS1064_XCURCOL1RED, POS1064_XCURCOL1GREEN, POS1064_XCURCOL1BLUE,
POS1064_XCURCOL2RED, POS1064_XCURCOL2GREEN, POS1064_XCURCOL2BLUE,
POS1064_XVREFCTRL, POS1064_XMULCTRL, POS1064_XPIXCLKCTRL,
POS1064_XGENCTRL,...
When I compare the other register offsets in these two files for this
DAC register set, it still makes no sense; the offsets are close, but
different and in different orders.
Any ideas?
Chris
On Tue, 2002-12-17 at 13:58, Chris Worley wrote:
> The "sync on green" problem is not a syntax error... in checking the
> log:
>
> (**) MGA(0): Option "SyncOnGreen" "on"
>
> It seems to think it set SyncOnGreen, but it doesn't. Since the
> framebuffer driver works (see sync=0x28, below), it must be the X driver
> not setting the option correctly on the hardware.
>
> Thanks,
>
> Chris
> On Tue, 2002-12-17 at 08:48, Chris Worley wrote:
> > First, the "SyncOnGreen" option doesn't work...
> >
> > Running XFree 4.2.0, on SuSE 8.1, kernel 2.4.19, and the Matrox Frame
> > Buffer driver on a dual P3 with an MGA G200 AGP video card and a fixed
> > sync, sync on green, monitor.
> >
> > The frame buffer driver works flawlessly! The boot line I use is:
> >
> >
>append="video=matrox:vesa:0x11A,pixclock:135,xres:1280,yres:1024,fh:78125,fv:72,depth:16,sync:28,right:64,hslen:192,left:192,bottom:3,vslen:3,upper:55"
> >
> > Which is derived from the XF86Config settings:
> >
> > Section "Monitor"
> > HorizSync 78.125
> > Identifier "Monitor[0]"
> > ModelName "A1097A"
> > VendorName "Hewlett-Packard"
> > VertRefresh 72.008
> > UseModes "Modes[0]"
> > EndSection
> >
> >
> > Section "Modes"
> > Identifier "Modes[0]"
> > Modeline "1280x1024" 135.00 1280 1344 1536 1728 1024 1027 1030 1085
> > EndSection
> >
> > The video card settings are:
> >
> > Section "Device"
> > BoardName "MGA G200 AGP"
> > BusID "1:0:0"
> > Driver "mga"
> > Identifier "Device[0]"
> > Option "DRI"
> > Option "HWcursor"
> > Option "MergedFB"
> > # Option "SyncOnGreen"
> > Option "SyncOnGreen" "on"
> > Screen 0
> > VendorName "Matrox"
> > Videoram 8192
> > EndSection
> >
> > At boot, the above "append" line works great (had to get rid of SuSE's
> > splash screen and the vesa driver from their kernel configuration)...
> > right after the lilo boot, the monitor syncs and the boot messages are
> > clear.
> >
> > When X launches, sync is lost. I make a "Poor Mans OR" with BNC "T"
> > connectors and join the horizontal and vertical syncs with the "green",
> > and sync is restored (note: I know there is a proper, simple, circuit
> > for doing this, but I've never been able to make it correctly, and this
> > BNC "T" technique has worked with a wide variety of combined sync and
> > sync-on-green monitors before, with picture degradation, and it's
> > probably shortened the life of the monitors).
> >
> > I've searched all over and never seen the the proper way to express the
> > "boolean" argument for SyncOnGreen... "on" is my best guess. Hopefully,
> > it's just my syntax.
> >
> > Any ideas?
> >
> > Next problem, same configuration (with the same problems whether or not
> > I'm using the Matrox or VESA framebuffer driver or a regular multi-sync
> > or my fixed sync monitor), DRI doesn't work... the salient parts of the
> > XF86Config are:
> >
> > Section "Module"
> > Load "type1"
> > Load "freetype"
> > Load "dri"
> > Load "extmod"
> > Load "glx"
> > Load "dbe"
> > Load "speedo"
> > Load "v4l"
> > EndSection
> >
> > and...
> >
> > Section "DRI"
> > Group "video"
> > Mode 0660
> > EndSection
> >
> > Tuxracer goes berzerk; the tuxracer window looks like it's stride is all
> > wrong (you can see the initial picture but it's expanded and missing
> > lines), and most of the screen is flickering (like it's fighting to
> > write to parts of the screen it doesn't own). Here's Tuxracer's output:
> >
> > > tuxracer
> > Tux Racer 0.61 -- a Sunspire Studios Production
>(http://www.sunspirestudios.com)
> > (c) 1999-2000 Jasmin F. Patry <[EMAIL PROTECTED]>
> > "Tux Racer" is a trademark of Jasmin F. Patry
> > Tux Racer comes with ABSOLUTELY NO WARRANTY. This is free software,
> > and you are welcome to redistribute it under certain conditions.
> > See http://www.gnu.org/copyleft/gpl.html for details.
> >
> > mcop warning: user defined signal handler found for SIG_PIPE, overriding
> > mcop warning: user defined signal handler found for SIG_PIPE, overriding
> > %%% tuxracer warning: Warning: Couldn't set 22050 Hz 16-bit audio
> > Reason: Unable to initialize ARTS
> >
> > Failed to upload texture, sz 11008
> > Memory heap (nil):
> > heap == 0
> > End of memory blocks
> > Failed to upload texture, sz 174592
> > Memory heap (nil):
> > heap == 0
> > End of memory blocks
> >
> > That last set of messages starts spewing at warp speed; I have to "killall -9" to
>stop it.
> >
> > SimCity3K just aborts on launch:
> >
> > > ./sc3u
> >
> > BUG! (Segmentation Fault) Going down hard...
> > Sim City 3000 Unlimited 2.0.955
> > Built with glibc-2.1
> > Stack dump:
> > {
> > ./sc3u [0x8479fad]
> > /lib/libpthread.so.0 [0x4003212b]
> > /lib/libc.so.6 [0x4008ad68]
> > ./sc3u(_dlerror_run+0xc9) [0x853f9d5]
> > ./sc3u(__dlopen_check+0x25) [0x853f695]
> > ./sc3u(Load__13cGZCOMLibrary+0x7ac) [0x8360de4]
> > ./sc3u(UpdateClassRegistry__6cGZCOMR13cGZCOMLibrary+0x20) [0x8362838]
> > ./sc3u(AddLibrary__6cGZCOMRC10cIGZString+0x1c1) [0x8361a25]
> > ./sc3u [0x8161174]
> >
>./sc3u(EnumEntries__10cRZIniFileRC9cRZStringPFRC9cRZStringRC9cRZStringPv_vPv+0x759)
>[0x83a0ead]
> > ./sc3u(AddDynamicLibrariesHere__7cSC3App+0x63e) [0x8161c86]
> > ./sc3u(sInit__12cGZFrameWorkR10cRZCmdLineb+0x13a) [0x835c80a]
> > ./sc3u(Main__12cGZFrameWorkR10cRZCmdLineb+0x26) [0x835ce62]
> > ./sc3u(main+0x45) [0x8158521]
> > /lib/libc.so.6(__libc_start_main+0xa2) [0x400794a2]
> > ./sc3u(shmat+0x55) [0x8149f41]
> > }
> >
> > Any ideas?
> >
> > Thanks,
> >
> > Chris
> >
> >
> > _______________________________________________
> > Xpert mailing list
> > [EMAIL PROTECTED]
> > http://XFree86.Org/mailman/listinfo/xpert
> --
> Chris Worley <[EMAIL PROTECTED]>
>
> _______________________________________________
> Xpert mailing list
> [EMAIL PROTECTED]
> http://XFree86.Org/mailman/listinfo/xpert
_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert