Subject: Re: Wscons in NetBSD 3
To: Bruce O'Neel <edoneel@sdf.lonestar.org>
From: Michael Lorenz <macallan@netbsd.org>
List: port-sparc
Date: 01/31/2006 09:57:12
--Signature_Tue__31_Jan_2006_09_57_12_-0500_HSFK1=N1ps6IrnUh
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Hello,

> So if I wanted to start hacking looking at src/sys/dev/sun/cgsix*
> would be a start, right?

Exactly.

> Ok, next stupid question.  The only mention of tcx* is in=20
> ./dev/sbus/.  I guess I misunderstand then why there is a=20
> ./dev/sbus/cgsix_sbus.c and a dev/sbus/tcx.c, but there is only
> files for cgsix* in src/sys/dev/sun.  Is this a result of wscons?

No, it's the result of cgsix showing up as child node of 'obio' on some
machines and as child of 'sbus' on others.

To support wscons you need to attach a wsdisplay to the driver. This
needs some editing in files.sbus and some hacking in the driver itself.
You need to:
- provide a struct to describe a screen on the tcx
- provide methods to draw on a screen ( or recycle those provided by
  rasops )
- provide methods to switch screens ( can be dummies, you can always add
  support for virtual consoles later. I'll commit a generic virtual
  console framework later so it may not be worth the trouble right now )
- finally attach the wsdisplay device in the driver's attach method

The cgsix driver does all that plus hardware acceleration. You may want
to look at the pnozz driver as well ( in sbus ) - it may be a little
more readable since it doesn't attempt to provide acceleration for the
old console code.

Hmm, the tcx header seems to indicate that there is some sort of blitter
but nobody knows how to use it, the XFree86 driver is unaccelerated as
well.

have fun
Michael

--Signature_Tue__31_Jan_2006_09_57_12_-0500_HSFK1=N1ps6IrnUh
Content-Type: application/pgp-signature

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

iQEVAwUBQ996ycpnzkX8Yg2nAQKeDggAt5YVeAmtpnYYBiWp2D9FkRy63O2PAfx3
7aP4XlS9o1SEOzT7B/OHjeiiiU/QmoqlUBd1qsgotfPVQY5mNPDMl9Yt9dZXqjFo
NOypuotRoK/5C6WfR4L3TtEq1/u52FCEyL2kLDd6lzYubz0r4wM7gZ7K1W0I3vh1
xAhlgwHyoyMYLR7C3weYVzeUzr1qIfi/9zSwogvDYtF3PACcpB9YmmVhp33GCH4j
o3awC70PFbZ3rx2bH6S2qUXkls8RfdaL/8GhN9wBXOmR2UMBqLG2dDNKiady822r
mt47F9awV4ophKX3ytqeKYOViCDrDwYg7Keal9cMWzHGpLWwawoz5Q==
=r5B6
-----END PGP SIGNATURE-----

--Signature_Tue__31_Jan_2006_09_57_12_-0500_HSFK1=N1ps6IrnUh--