Subject: Re: struct videomode
To: Christos Zoulas <email@example.com>
From: Garrett D'Amore <firstname.lastname@example.org>
Date: 03/03/2006 15:56:47
Christos Zoulas wrote:
> In article <4408BC45.email@example.com>,
> Garrett D'Amore <firstname.lastname@example.org> wrote:
>> In order to implement a framebuffer driver for Radeon boards, I need a
>> reasonable database of video timings. (Yes, I know I could use EDID and
>> DDC, but I'm not that far yet. And not all monitors support these. And
>> some folks might want to use a resolution other than what the monitor
>> Anyway, in dev/ic/ there is videomode.h, which has the structure I need
>> to use.
>> There are two questions here. First, anyone object to me moving this to
>> dev/ic/videomode/ and placing a .c file here with a reasonable database
>> (an array of struct videomode)? (Actually, the .c will be generated by
>> an awk script, from a file containing a bunch of XFree86 Modeline
>> definitions -- such as
>> xsrc/xc/programs/Xserver/hw/xfree86/etc/vesamodes.) Both the source
>> file(s) and the awk script will also be in that new directory.
>> Second, struct videomode has a void* member called misc_data. I want to
>> replace this with a const char *, which will be a "name" for the mode in
>> the form "XxYxR" where X = x resolution, Y = y resolution, and R =
>> vertical refresh rate. So you get a string like "800x600x60" or
>> This would allow device drivers to locate potential video modes by
>> scanning for them in the list by name. The name would presumably come
> >from some other configuration mechanism, such as device properties, etc.
>> Right now the only place struct videomode is used is in vga_raster.c and
>> machfb.c. Neither of them initialize or use the opaque misc_data member.
> Sounds fine to me. Drivers should also look at the flags field so that
> they can tell if the mode is interlaced etc. The whole struct array should
> be const right?
Btw, I'm probably going to move this to dev/videomode rather than than
Garrett D'Amore, Principal Software Engineer
Tadpole Computer / Computing Technologies Division,
General Dynamics C4 Systems
Phone: 951 325-2134 Fax: 951 325-2191