I started writing Dualhead support for r128. the current patch doesn't work quite yet. I'm able to set up the PLLs ok, but when dualhead is enabled, the LCD is screwed up and the vga port doesn't produce a signal. I suspect there is a special ordering needed for restoring the relevant crtc, etc. registers, but I haven't had time to sort it out yet. If someone is motivated to fix things I'm open to patches. Otherwise I'll try and get to it at some point.
Created attachment 1207 [details] [review] r128 dualhead patch current patch. also avaialble here: http://www.botchco.com/alex/r128/r128dh.diff
taking bug
Created attachment 1229 [details] [review] workign patch I finally got dualhead working on r128. It still needs some cleanup and there are a few bugs I haven't worked out yet: - modes on crtc2: the right side flickers and has some artifacts - doesn't play well with the bios: if you have both the crt and the lcd active when you start X in dualhead mode, both crtcs will flicker horribly. Not sure why yet. workaround is to switch to lcd only before starting dualhead X. Other than that it works fine in basic testing.
new patch: http://www.botchco.com/alex/r128/r128dh.diff Corruption onf crtc2 is now fixed. thanks to Aymeric Vincent for the clues that led to the fix (bad shift in dda2_on_off in InitDDA2Registers()). The only problem that remains now is that SwitchMode() doesn't work right on crtc2. The mode on crtc2 gets set correctly on server startup and by switching to another VT and back, but not when using switchmode(). when you use switchmode() crtc2 ends up with these very odd modes or modes that are out of sync. if you switch to one of these modes and then swicth to another VT and back the proper mode gets set on crtc2. I can't seem to figure out why. I tried resetting the modes on both crtc2 and crtc1 when switchmode() is called on crtc2; I tried several different mode restore orderings, and several other things (turning off the dac/unsourcing crtc2, etc.), but none had any effect. Ideas welcome.
Created attachment 1368 [details] [review] latest patch attaching latest patch. SwitchMode() doesn't work unless you change VTs
ppc users will need to also apply the patch in bug 2089 to get dualhead working.
Created attachment 1570 [details] [review] newest patch applied to HEAD
closing for now. If anything comes up, reopen.
*** Bug 5023 has been marked as a duplicate of this bug. ***
alex, this patch is dlloader-dirty. you define gR128EntityIndex in ati_drv.so but reference it from r128_drv.so, which means r128 can't be loaded directly anymore.
(In reply to comment #10) > alex, this patch is dlloader-dirty. you define gR128EntityIndex in ati_drv.so > but reference it from r128_drv.so, which means r128 can't be loaded directly > anymore. However we decide to tackle this, radeon will need a similar fix.
Created attachment 3948 [details] [review] awful-multihead-ati-hack-1.patch something like this, i think: if loadable server if symbol exists return its value else return -1 else symbol always exists because ati is built-in, so just return value i think this is the right semantics, but it's certainly disgusting. the ati wrapper driver desperately needs to die.
This looks right to me too. I've tested it with both "ati" and "r128" on a R128Pro card and with both "ati" and "radeon" on a R100 card, and it appears to work in all cases.
applied to modular and monolithic ati driver, closing.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.