radeon MergedFB issues

Benjamin Herrenschmidt benh at kernel.crashing.org
Sun Mar 12 22:22:44 PST 2006


> THomas' latest sis driver snapshot on his site has support for keeping
> the DPI constant when switching between clone and dualhad with xrandr.
>  I've been meaning to port it over, but I'm been too busy lately to do
> much with the radeon driver.

Ok. BTW. You are very much welcome having a go at fixing MergedFB :) 

I've been playing a bit on a co-worker machine with MergedFB trying to
setup the laptop so that you have 2 MetaModes: one mergedfb dual head
covering both internal LCD and external screen, and one clone mode based
on the resolution of the latop panel. This is the "ideal" situation
since it allows to unplug/replug the external monitor and just use
xrandr to "adjust"... still not nearly as good as MacOS or Windows but
one step further.

However, this caused all sort of funny problems that I'm listing below
as they come back to memory. I've looked at the mergedfb code in radeon
and ran away in tears tho, thus there is little hope that I'll fix those
myself....

 - When starting X, it's totally on crack... it sets up a virtual
resolution that seems to come from RADEONRecalcDefaultVirtualSize() and
I can't see how that function can make any sense, but then it may just
be me :) Thus we end up with something that looks like the total merged
resolution while we are actually starting in clone mode. Using xrandr to
switch to setting 1 and back to 0 "fixes" it ... Not sure what's up
there.

 - It doesn't like the external monitor being bigger than the internal
panel and not having a resolution equal to the internal panel (in that
case, 1280x854 for internal panel). There, things can be different if I
specify a metamode or not.

   * If not, it tries to pick a best possible clone mode that fits both
screens and comes up with some horrible 1024x768 :) However, it also
fails to enable the RMX properly for some reason on the LCD .... pretty
ugly.

   * If I do set 1280x854+1280x854 in my MetaModes, then it barks
because my external display isn't supposed to support it... and totally
disables MergedFB (could have been nice & just dropped that mode ... oh
well)

   * The only sort-of workable option I found was to add a modeline with
the LCD mode in the only Monitors section, thus forcing MergedFB to
think that both monitors can do that mode... I get some strange
stretched output on the external panel but it works. Pretty annoying
hack though. It would be nice if MetaModes could just find the smallest
mode big enough to grok what was passed in and adds black bands around
the display... shouldn't be too hard...

   * A really nice addition would be to have the ability to specify
"0" (or 0x0) as a valid mode in MetaModes indicating that the selected
screen is off. It would be fairly easy to implement if the MergedFB code
wasn't so klingon to me ... the idea is that internally, you consider
that exactly like a clone mode (or maybe add a new type for it but I
don't think it's necessary) and you just keep track wether it's CRT1 or
CRT2 that is off so you can blank it when actually setting the mode (or
just fill it with black for now). That would nicely fix the problem of
plugging/unplugging the external screen by allowing to set MetaModes to
internal panel only, external screen only, both, etc...  With that, we
are basically one small step away from monitor hotplug which is a way to
update the mode lists for RandR :) Might not even be that hard... 

 - Any good reason why MergedNonRectangular is not the default ? (and I
mean a damn good one :)

 - I see framebuffer corruption when using DRI 3d apps on mergedfb
(looks like it might be only when using dual head mode, not sure yet).
It looks like the texture memory is overlapping with the framebuffer,
not sure yet... (This is an rv350 using current HEAD dri cvs, or almost
current)

 - Weird DPI issue I told you about (MergedDPI doesn't seem to help
much), see bug 4100

I think that's it :) (though that enough I suppose)... As I said, I'm
not too tempted to track those down as I'm really not comfortable with
the code in radeon_mergedfb.c but I suppose I may be able to fix things
with a few hints from your side. I'd really prefer if you could give a
good look yourself though first. Right now, the "out of the box"
experience is pretty horrible...

Ben.





More information about the xorg mailing list