Re: [AD] More X Mode Setting

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On January 17, 2011, Peter Wang wrote:
> On 2011-01-17, Thomas Fjellstrom <tfjellstrom@xxxxxxxxxx> wrote:
> > On January 17, 2011, Peter Wang wrote:
> > > If that's right, we should be able to query _only_ which extensions are
> > > in effect, _without_ getting detailed information about monitors and
> > > screen modes, and decide if the blacklisting code is required.  That
> > > would be pretty lazy for the common cases (single adapter, or using
> > > randr).
> > 
> > We might be able to get away with that, but we still have the issue of
> > TwinView. As long as the user never sets the "new adapter" or "new
> > adapter position" I think we might be able to lazy init. Otherwise we
> > need to query things like the number of adapters and their offsets when
> > creating a display.
> 
> Could you work on that, assuming we have a function to detect if
> TwinView is in effect?

I could see if things work, sure. But I think the case we're trying to target 
is a corner case, so I'm not sure its worth it.

The time it takes to link all the examples on my laptop (15-20 seconds) annoys 
me far more than 200ms it takes to init xrandr ;D

> I've had a look at the NVCtrl library (it is open source, MIT-style).
> It seems we won't need to duplicate *too* much code to check if TwinView
> is used.  Alternatively we could just run "nvidia-settings -q TwinView".
> I should be able to work on that later today.

Of course this assumes that the fglrx driver's BigDesktop crap doesn't do 
similar things (I think it might). I haven't tested it at all though. So just 
using the NV-CONTROL extension isn't really going to help with that.

The reason I went with comparing xinerama's screen count against xrandr's is 
because it was a pretty generic way of doing it. It will always catch the 
broken platforms.

> > That all said, I don't think it may even be necessary. Are you still
> > seeing that ugly monitor blanking on even windowed displays? I haven't
> > seen any on either my desktop (older Xorg with latest nvidia driver) or
> > my laptop (bleeding edge xorg with bleeding edge intel driver). The only
> > annoying thing is that the XRandR XRRGetScreenResources function can
> > take upwards of 200-500ms to call.
> 
> I don't remember any blanking recently.  Then again, since upgrading my
> graphics card, I haven't plugged in the spare monitor (with analogue
> connector) that I was using for testing dual-head.  I'd need to find a
> VGA-DVI adaptor, I think.

I don't think connecting a second monitor would change it at all. I remember 
seeing the blanks with a single screen back when they happened. I think thats 
been fixed within the past /couple/ years.

> The delay is the slowest part of Allegro startup by far, so is worth
> avoiding.  Not essential, though.

I don't even notice it myself. On my laptop here the delay is only about 
200ms. The visual decoding and gl extension setup takes at least 300ms, both 
are per display, where as the xrandr setup is only done once.

> Peter
> 
> ---------------------------------------------------------------------------
> --- Protect Your Site and Customers from Malware Attacks
> Learn about various malware tactics and how to avoid them. Understand
> malware threats, the impact they can have on your business, and how you
> can protect your company and customers by using code signing.
> http://p.sf.net/sfu/oracle-sfdevnl


-- 
Thomas Fjellstrom
tfjellstrom@xxxxxxxxxx




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/