Subject: Re: struct videomode
To: Garrett D'Amore <garrett_damore@tadpole.com>
From: Michael Lorenz <macallan@netbsd.org>
List: tech-kern
Date: 03/04/2006 01:37:50
--Signature_Sat__4_Mar_2006_01_37_50_-0500_IBh2sqmr5O0OtJjJ
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable
Hello,
> 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 advertises.)
Agreed, but it should be possible to add (optional) EDID support later
on in case the monitor in question does support it - like marking the
preferred mode if the monitor defines one, probably shrink or extend the
list based on monitor capabilities and so on. Some monitors may have odd
properties that may be reported via EDID ( like some iMacs which have
built-in CRTs with a fixed 60kHz line frequency )
I have some experimental code to attach
iic* at ffb?
monitor* at iic? addr 0x80
which currently only reads the first EDID data block and then dumps some
values, maybe there should be a real userland interface for that.
So, I think we should be able to use EDID information if it's available
at some point, but not depend on it.
> Anyway, in dev/ic/ there is videomode.h, which has the structure I
> need to use.
>=20
> 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 =3D x resolution, Y =3D y resolution, and
> R =3D vertical refresh rate. So you get a string like "800x600x60" or
> "1280x1024x72"
No objections from me, a list of canonical modes should be useful.
While here we should probably define a standard interface to tell the
console driver which video mode to use - sparc(64) and macppc so far use
whatever the firmware sets up which may be less than optimal ( like old
Apple OF that always comes up in 640x480 without a way to change that )
or on machines that don't usually come up with a graphical console.
have fun
Michael
--Signature_Sat__4_Mar_2006_01_37_50_-0500_IBh2sqmr5O0OtJjJ
Content-Type: application/pgp-signature
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (NetBSD)
iQEVAwUBRAk1vspnzkX8Yg2nAQIXPwf9Hlo0Rq0EEtfCVysqoodDimDE9UCRAkrD
CYfTwdWnLkxelwvwEni3wszNScFzRRMS8DQoF+b9vQOFZsXtIBi8FPt4MlD9zROc
j+xJd+osYRLhLbqS4MUYX/H7a/VRTRKlXXt0HQ/LedsQi0s5vzGq8B03OHL3MnHV
GhvweE4FTWTNj7944Yp/1FZpbfWSRej9BOEJz6d8C8AXXHOQQ2Gyec02Py54CcHL
B4xG8gzvrSYq1QVOnY74PVrAlbF5X+dTIRdtdM27MwBPeOVtxenVoQuu9ZbUzXYj
uv6H4WDddFgA0IxXW61/8f6r0NbTALMdunschHQeCTy0j4JJnnWOrQ==
=IYau
-----END PGP SIGNATURE-----
--Signature_Sat__4_Mar_2006_01_37_50_-0500_IBh2sqmr5O0OtJjJ--