XFree86/Xorg S3 Savage Duoview Support
Get the latest code here.
So having talked to a few people and dug around on the web a bit, I figured out the basics
of how Duoview (sometimes called DuoVue) works on Savage chips. To the best of my
knowledge it is only supported on the mobile versions (MX/IX and SuperSavage). I'm doing my
development on an IBM T20 laptop, so I can only really test the Savage IX, although the MX
and IX are really the same chip, the IX just has memory on the same package.
S3 debuted Duoview support on the Virge MX. I'd imagine Duoview works similarly on both,
so if you have any information about the Virge MX, that might be helpful. If so I'd
be happy to try and add duoview support to the Virge driver once I got it working on
the Savage. I'm not sure if S3 required NDAs for the Virge databook, but they apparently do
for the Savage.
My current work is against DRI cvs, however, my latest tarballs can be dropped into just about any X distro and should build fine.
If you have any questions about the driver or feel you might have something to contribute
(such as hardware or databooks :) ), send me email at agd5f (at) yahoo
I've got the CRTCs and the dot clocks programmed correctly for each head, however, I can't seem
to get a signal on the vga port. I suspect there is a bit somewhere that needs to be flipped to
power up the vga port. If anyone knows more about this please let me know. I'd also like some info
on how the streams regs and bitmap descriptors are dealt with on crtc2.
I've narrowed the problem down to crtc2. All the dot clocks and outputs work fine, however nothing
seems to work when connected to crtc2. Tests:
CRTC DCLK Output Result
crtc1 dclk1 FP/CRT/Both Works
crtc1 dclk2 FP/CRT/Both Works
crtc2 dclk1 FP/CRT/Both No signal
crtc2 dclk2 FP/CRT/Both No signal
To make sure I wasn't programming crtc2 wrong in my second head code path, I reworked the single head
version of the driver with writes to the crtcs mirrored (mirrored writes, reads from crtc1). I
verified the correct values were written to the regs in the register dumps. that way the same mode
would be written to each controller. No dice.
SUCCESS AT LAST! I can finally get crtc2 up! nothing more than a cloned desktop at the moment, but now that I have the modes working, the rest should come in time. latest code and binary here. Many thanks go out to Austin who helped me figure this out.
Now that I've got crtc2 producing an image, I've got some new problems. I can't seem to change the framebuffer offset for crtc2. It's always locked at 0. Also the second hardware cursor doesn't seem to show up.
I now have a working patch available for duoview. The patch is available here and is against DRI cvs (trunk). I've also provided a binary
(compiled on redhat 8ish) and a sample XF86Config file here . I can
only verify that it works on savage IX/MX, but it may also work on supersavages. As far as I know,
mobile twister and prosavage chips only have 1 crtc. There are no dualhead desktop savage chips
that I know of. If someone knows otherwise please let me
know. TV out and s3switch will probably break duoview if you use it so be careful. The current
support is something of a hack...a proof of concept if you will.
New Patch. This new code ports over the recent changes from xorg cvs. The main change is the restructuing of the streams code in the addition of a new savage_streams.c,h. In addition to the patch you will need to download the savage_streams.c and h. Same problems still apply.
Full MergedFB support for Savage. Grab the tarball here. I ported my radeon mergedfb code to savage. There are still a few bugs, but it works fine for the most part. Same problems with crtc2, hwcursor, etc. apply here as well. What does this mean? well, you now get xinerama support for apps that use it, and proper mode validation on both heads.
A supersavage user has confirmed that duoview works on his laptop AND... CRTC2'S OFFSET MOVES! Hopefully I can figure out how supersavage is being set up differently that allows crtc2 to move. If not, then either MX/IX has an additional tweak I don't know about or the/my HW is slightly broken.
CRTC2 problem is solved. CR65 does not need to be set on SavageIX/MX. New patches soon to follow.
New tarball available. MergedFB works pretty well. I've also attempted to add support for "regular" multihead, although it doesn't really work right just yet. I'm not quite sure what the problem is. Xv also isn't quite working yet.
New tarball available (savage-duo-full.tar.gz)! Just about everything now works: MergedFB and "xinerama" multi-head. Xv is untested, but probably broken (that's next on the block for fixin'). The console also gets hopelessly corrupted once dualhead has been enabled. Thanks again to Austin at S3/VIA! Without his help, none of this would have been possible. Also thanks to Ian McIntosh for testing and fixing a bug in the matchbiosmodes() output. Sample configs available here.
I'm slowly merging the dualhead code into xorg. The first order of business is to merge "regular" dualhead then mergedfb. My initial patch for merging is available here.
I committed my initial patch to xorg cvs last night along with some other clean ups.
I committed some small fixes for supersavage users to xorg cvs last week. Also some supersavage users report problems with XaaScreenToScreenCopy on crtc2. If you experience that problem add the XaaNoScreenToScreenCopy option to your device config. At somepoint I'll get around to fixing it.
Fixed HW cursor on crtc2. CR45 is shadowed. Xv on crtc2 is almost there. This and several other updates will be committed as soon as fd.o cvs is back up.
Mark van Reijn reports that dualhead with tv-out works! Just set the the 'TvOnly' option in your second device section.
Xinerama Configuration notes
Same as other multi-head adaptors (Screen 0/Screen 1, etc.). Make sure you specify the same BusID for both device sections.
MergedFB Configuration notes
MergedFB is configured the same way as on sis and radeon.
See the updated man page here.
- Setting mode and refresh on crtc1 and 2
- Multi-head DRI in MergedFB mode (assuming you have an enough videoram)
- DPMS for both LCD and CRT
- TV out in conjuction with duoview
Not implemented (yet)
- Secondary streams on crtc2 (Xv) (in progress)
- Non-bios mode setting on crtc2
Links to other sites of note:
Tim Roberts' S3 Savage Webpage
Tim Roberts' S3 Savage Wiki
S3's Savage IX Webpage
DRI OpenGL Driver for Savage chipsets
Utah GLX OpenGL Driver for Savage chipsets
Other Stuff I'm working on
Xorg/XFree86 Dualhead Status