Problem using vga_addtiming()

Search this archive.

From: Andrea Mazzoleni (am@mediacom.it)
Date: Sun 05 Jan 2003 - 19:51:04 IST


In my program I need to set some arbitrary modelines, and I'm
using the vga_addtiming() function. It generally works, except
you need to use more than one modeline of the same size.

The problem is that the svgalib internal logic is to always
choose the user defined modeline with the highest dot-clock
if more than one compatible modeline is available.
It implies that you cannot alternatively use two or more
different modelines of the same size in the same run of
the program.

I've also tried to use the vga_changetiming() function, but it
has some limitations :
) I cannot precisely control the modeline which is used the first time.
It depend on all the previous stored modelines. Obviously I can use
vga_getcurrenttimings and eventually adjust it, but it requires an additional
mode set.
) The flags argument is completely ignored, so you cannot change a
doublescan mode in a singlescan mode and viceversa.
It's probably a bug.
) The return value is always 1. It's probably a bug.

My proposal (attached patch force.diff) is to add a new modeline
flag called FORCE which change the behavior of vga_addtiming().
If the FORCE flag is set the use of the new user modeline is forced
over all the previous stored modelines.
If the FORCE flag is not set the behavior is backward
compatible.

Please take in consideration to add this patch in the official
distribution.

Another possible approach is to directly add a new svgalib call
vga_setmodeline() which directly set an arbitrary modeline
without calling vga_setmode(). If requested, I can work on it.

I've also found that all the modeline flags like DOUBLESCAN,
INTERLACED defined in timings.h are not present in any public include.
Probably they need to be moved in vga.h. I suggest also to prepend a VGA_
string to these flags to prevent name conflicts with other library
definitions.

-- 
Andrea Mazzoleni
935A 2D3C 5C70 BCD6 CB0C  ED89 7C19 4321 6340 3F6D



------------------------------------------------------------------ Unsubscribe: To: listbot@svgalib.org Body: unsubscribe linux-svgalib

This archive was generated by hypermail 2.1.4 : Wed 21 Jan 2004 - 22:10:25 IST