Subject: Re: struct videomode
To: None <>
From: Christos Zoulas <>
List: tech-kern
Date: 03/03/2006 23:42:13
In article <>,
Garrett D'Amore <> 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?