Subject: Re: radeon driver design (was Re: generic virtual consoles)
To: Garrett D'Amore <garrett_damore@tadpole.com>
From: Michael Lorenz <macallan@netbsd.org>
List: tech-kern
Date: 12/22/2005 16:01:12
--Signature_Thu__22_Dec_2005_16_01_12_-0500_g1Xv0kA27dwwBL0u
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Hello,

> >Something else - if at all possible please allow your driver to work
> >as a semi-dumb wsdisplay that could be used by XFree and its radeon
> >driver, for instance on sparc64 and macppc where we can't (or don't
> >want to) use vga. For both we have dumb OpenFirmware framebuffer
> >drivers but being able to use acceleration for the console would be
> >nice. 'Semi-dumb' as in no VRAM tricks, use whatever video mode the
> >firmware set up but use the blitter for scrolling, rectangle filling,
> >probably character drawing.

> This might be hard for me to do.  I am not going to rely on "the
> firmware", because on our processor we might not have firmware
> initialization of the card.  So I have to do a lot of that stuff
> myself (making this driver an "interesting" bit of code.)

I didn't mean to ask you to support it right away - just keeping it in
mind and not obstructing it unnecessarily is all I ask for. Figuring out
which resolution/depth we're running at shouldn't be hard and can be
added any time later.

> Additionally, I want to be able to manage CRTCs, etc. from the kernel.

Sure, I only want the ability to use what we find, at some point in the
future - I do not want you to go out of your way doing my work ;)

> The X11 radeon driver wants to take over the whole chip, and the two
> things are quite likely to get in each others way.

Exactly, that's why I asked for 'semi dumb'. If I understood you at all
that could probably be handled by a handful of #ifdefs added later at
some point.

> However, after I've written the code, if someone else wants to go back
> in and try to figure out how to modify the code so that it can do
> that, without destroying the ability to act more intelligently for
> applications like mine, they will be welcome to do so.

That's what I meant, sorry if it didn't get across like that. Many Macs
and quite a few Suns have Radeon-based graphics chips, it would be nice
if we could easily adapt your driver for them. I tried to figure out how
the Radeon blitter works by reading the XFree driver's source but got
hopelessly lost in #define hell.

> (The vga driver is horribly pc-centric.  Someone should really update
> it to be a little more friendly to other platforms.  I tried to make
> it work on a MIPS cpu and gave up after much struggling with it.)

Agreed, I tried the same on macppc a while ago with the same result.

have fun
Michael

--Signature_Thu__22_Dec_2005_16_01_12_-0500_g1Xv0kA27dwwBL0u
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (NetBSD)

iQEVAwUBQ6sUGMpnzkX8Yg2nAQIoIAgAui5Kpcn7ZHox5j0SIS+kbZw2qXPWYsge
m+hciFt8KvHa+lR4SfKwvx5gFvJGxuaca2YrAMeg5dZdb2CCOhse25dv9ACDOnrt
RrCceX1l50Jrf/Wvjbg8xPrX66QH+GwdN7FWviIpi6r6qpdSvgFVRiNomSYjM2hP
PHrR4qrkn29gr+QFlea23V1httt0JCgbmN4AOObY7h11UXCF7gUAApsXs8h9cRzX
skeFjJWEybG+rYYc+91hTGjYXoY5/idp8FzEWgZR13sq1AKWQLQa9RzhJzYXXpfR
D72G52CQugN9lGJtxOkVmwFUl2S+8OuUcJpDAxLl4fJ4iWX8aok9TA==
=Z2CE
-----END PGP SIGNATURE-----

--Signature_Thu__22_Dec_2005_16_01_12_-0500_g1Xv0kA27dwwBL0u--