Subject: Re: Fixing {get,put}wschar functions
To: Garrett D'Amore <garrett_damore@tadpole.com>
From: Michael Lorenz <macallan@netbsd.org>
List: tech-kern
Date: 04/12/2006 12:02:12
--Signature_Wed__12_Apr_2006_12_02_12_-0400_ETXHAI8uqSHy=gwX
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Hello,

> >> I was improving the changes to make the get/putwschar functions not
> >> use void pointers as suggested by drochner@ when I noticed an ugly
> >> issue.
> >>
> >> With the previous code, you could only get/put characters from the
> >> screen you owned.  I.e., if you opened /dev/ttyE0, you could only
> >> get/set its characters, no matter if it was active or not.
> >>    =20
> >
> > The ioctl() and mmap() methods should really, really know which
> > device node they're being called from. Stuff like colour maps,
> > read/write characters and so on should work on individual screens,
> > not the whole thing.

> I'll test this today.  I've got a test program which does various
> ioctls and also mmaps the buffer.  It will be easy to see.  I sort of
> think that the mmap logic probably doesn't respect which screen is
> *visible* at the time, and that would represent a gross error.   The
> error in this case may be in my own radeonfb driver, but I want to
> examine the wsdisplay and vcons code to see if they have any logic
> associated with it.  It seems like they could and maybe should, guard
> against this kind of behavior.

Yeah, when you use different vram areas for different screens things get
messy. Currently mmap() has no way to know which screen it's suposed to
work on. Not a problem with my drivers since they use the same fb for
all screens but that's by no means a given.

have fun
Michael

--Signature_Wed__12_Apr_2006_12_02_12_-0400_ETXHAI8uqSHy=gwX
Content-Type: application/pgp-signature

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

iQEVAwUBRD0khMpnzkX8Yg2nAQLzwQf/V28xH3bGek6QQVwzHPkvAB8Uuez6Ji8q
Pew7jULgImPi6J+W5Ikvhv7ts9EBI/+JdeuOGcdJhV+tp4WWwOvfrpemoAZTlEx3
VAG2AUNnpjftxKeoYbnDhhiE+CVV5tOrukjxqGOVNMkvRZaZkIMYXdarUhdzUM4k
QH2wqY+QNHkw+SI1+o/xJOc37CTwh/9f7oQ/mVkvw4h6dThtMGgq/dYHDq8hh5c4
AKsZiHrmIQJAgLDwRLVPzq+6l07sYAYZZOaHnmFZIcpbZBm3nfztVPgLaVDFXR7p
UCe5c4TzNZNGgn5zE3I1d07HsRm4IkmLg7M548iN6Mb2OxY7n5EaMg==
=thW4
-----END PGP SIGNATURE-----

--Signature_Wed__12_Apr_2006_12_02_12_-0400_ETXHAI8uqSHy=gwX--