Re: [AD] [AL] VESA3 refresh rate setting

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


(I'm directing this reply onto the Allegro developers list)

"S.Sakamaki" <emt@xxxxxxxxxx> writes:
> I would like to set refresh rate with VESA3 in Allegro. Please add this 
> or like this to Allegro.
> 
> This code tested on CL-GD5465 + SDD.
> http://www.geocities.co.jp/SiliconValley-PaloAlto/9441/allegro3931_req_refresh_rate.zip

Nice, but a couple of things worry me about this particular implementation...

Mostly, it bothers me to be supplying a list of hardcoded CRTC settings.
I know very little about this aspect of graphics coding, but it seems 
strange that we have to provide all this extra info just in order to 
change the reset rate, plus this obviously limits us to only the modes 
contained in that list. Is there no way that the CRTC values can be 
calculated just from the resolution width and height, or read from VESA in 
some way? Comments from anyone who better understands this area would be 
much appreciated.

Also, do we really need to specify the refresh rate in hundreds rather 
than direct per-second units? I know that is how VESA does it, but it 
seems less intuitive to me. Given that the requested rate gets rounded by 
the driver in any case, are there really situations where you might need 
to request a rate with greater precision than say 70 vs. 71?

My final uncertainty: what to do about errors? Not all drivers can or will 
support retrace rate adjustments, but we don't know how to check that when 
the refresh rate is set, since we don't even know what graphics driver 
will be used until a later call to set_gfx_mode(). A similar two-phase 
situation happens with set_color_depth(), and in that case, the call to 
set_gfx_mode() will simply fail if the requested depth is not available. 
That seems a bit too much to do if a refresh rate can't be selected, 
though, especially since it is quite normal that the refresh rate will get 
rounded slightly. Maybe there should be a second function for checking 
what rate was actually set, so that you can see whether set_gfx_mode() was 
able to follow the request?



-- 
Shawn Hargreaves - shawn@xxxxxxxxxx - http://www.talula.demon.co.uk/
"A binary is barely software: it's more like hardware on a floppy disk."



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