Commit Graph

50 Commits

Author SHA1 Message Date
macallan
b3e755bed0 prop_dictionary_get_bool() doesn't return FALSE if the property doesn't
exist, so initialize things first.
No more console stealing on sparc64.
2015-09-16 16:52:54 +00:00
macallan
b712ef97ac fix a bunch of bugs & tpyos:
- keep track of registers being mapped or not to avoid double (un)mapping when
  switching between WSDISPLAYIO_MODE_DUMBFB and _MAPPED
- distinguish between _DUMBFB and _MAPPED
- actually map the framebuffer at offset 0 in _DUMBFB
- set BUS_SPACE_MAP_PREFETCHABLE when mmap()ing video memory
now Xorg + xf86-video-wsfb work on top of voodoofb
2014-07-24 09:39:58 +00:00
christos
e58a356cba make pci_intr_string and eisa_intr_string take a buffer and a length
instead of relying in local static storage.
2014-03-29 19:28:24 +00:00
macallan
c905a4b299 (hopefully) shut up warnings about set-but-unused variables. 2013-11-19 06:37:42 +00:00
macallan
da28d6ec38 support WSDISPLAYIO_GET_FBINFO 2013-10-09 17:18:23 +00:00
macallan
4453737ff6 avoid uninitialized use of defattr 2013-07-30 19:16:50 +00:00
joerg
2484b3a328 Fix memset arguments. 2013-07-02 00:18:24 +00:00
rkujawa
73133c0024 Differentiate between Voodoo 3 and Voodoo Banshee (MAX_CLOCK).
Ok'd by macallan@.
2012-11-09 19:50:22 +00:00
rkujawa
e180b43f97 The voodoofb driver also works with Voodoo Banshee. Tested using card from
martin@. Should be modified to take different MAX_CLOCK value into account.
2012-11-09 11:28:40 +00:00
macallan
35c5bb4baa initialize a variable before using it
found by uebayasi@
now why did gcc warn him on x86 but not me on macppc?
2012-04-23 11:51:56 +00:00
macallan
131fa2f6f2 we need to zap the glyph cache when re-initializing after X 2012-03-15 03:12:51 +00:00
elad
0c9d8d15c9 Replace the remaining KAUTH_GENERIC_ISSUSER authorization calls with
something meaningful. All relevant documentation has been updated or
written.

Most of these changes were brought up in the following messages:

    http://mail-index.netbsd.org/tech-kern/2012/01/18/msg012490.html
    http://mail-index.netbsd.org/tech-kern/2012/01/19/msg012502.html
    http://mail-index.netbsd.org/tech-kern/2012/02/17/msg012728.html

Thanks to christos, manu, njoly, and jmmv for input.

Huge thanks to pgoyette for spinning these changes through some build
cycles and ATF.
2012-03-13 18:40:26 +00:00
drochner
d8e1a7b61a Use pci_aprint_devinfo(9) instead of pci_devinfo+aprint_{normal,naive}
where it looks straightforward, and pci_aprint_devinfo_fancy in a few
others where drivers want to supply their own device names instead
of the pcidevs generated one. More complicated cases, where names
are composed at runtime, are left alone for now. It certainly makes
sense to simplify the drivers here rather than inventing a catch-all API.
This should serve as as example for new drivers, and also ensure
consistent output in the AB_QUIET ("boot -q") case. Also, it avoids
excessive stack usage where drivers attach child devices because the
buffer for the device name is not kept on the local stack anymore.
2012-01-30 19:41:18 +00:00
macallan
0f92837504 add a simple glyph cacheing scheme
Glyphs which use the default attribute will be saved into offscreen video
memory the first time they're used and subsequent uses will just copy them
from there instead of rendering them every time.
This should give a nice speedup especially on slow CPUs.
2012-01-25 03:49:12 +00:00
macallan
1a435f513d sprinkle sc_ to make it consistent 2012-01-25 02:04:35 +00:00
macallan
eed205ff9e clear the screen when returning from X 2012-01-22 19:00:45 +00:00
macallan
c3dbb52aea support anti-aliased fonts in 8 bit using host blits 2012-01-19 18:35:27 +00:00
macallan
24ca46a7e7 do some mode validation - for now reject everything above 1680x1200 until
I find out why these don't work ( 1680x1200 works but not 1920x1080 ).
Also use sync polarity info from videomode instead of guessing.
Finally, if there is no useble preferred mode, be a little smarter trying
to find the next best mode.
2012-01-18 08:04:18 +00:00
macallan
8660b78615 we don't access video memory directly, no need to map it 2012-01-17 21:31:46 +00:00
macallan
aba75a640c support DDC2, pick an appropriate video mode if a data are found 2012-01-17 19:13:22 +00:00
macallan
e7d8279470 get rid of HAVE_OPENFIRMWARE 2012-01-17 07:48:48 +00:00
macallan
1fa79ac882 use rasops_init(0, 0) 2012-01-11 15:53:32 +00:00
kiyohara
f339144bf9 Change get parameters(width,height...) from prop_dictionary, like genfb. tested on ofppc only. 2011-10-08 00:22:25 +00:00
cegger
e28cc170ed Implement new WSDISPLAYIO_GET_BUSID ioctl.
It returns the bus id and allows userland (like Xorg) to create mapping
of ttyE? and bus id. For now only PCI is implemented.

First discussed with macallan@ then public on tech-kern@ and tech-x11@
2011-01-22 15:14:27 +00:00
macallan
b5ede66651 remove some ancient, unused debug code 2010-12-25 11:51:21 +00:00
cegger
ca7fa2468a ioctl: KNF switch-case, remove useless brackets 2010-12-16 06:45:50 +00:00
uebayasi
8184d5dc03 Don't pull in the whole uvm(9) API to access only PAGE_SIZE and
some other constants.  These are provided by sys/param.h now.
2010-11-13 13:51:57 +00:00
macallan
598ca8db3e make higher resolutions than 1024x768 work 2010-10-12 16:00:21 +00:00
macallan
9fae8e4448 use alternate font if available ( for autogenerated box drawing characters ) 2010-05-04 05:00:33 +00:00
njoly
85cadc2388 Cleanup interrupt establish error messages. Do not mix
aprint_error/aprint_normal/printf calls for a single line.
2009-11-26 15:17:08 +00:00
macallan
eccd210ff3 use vcons_replay_msgbuf() when appropriate 2009-08-20 02:40:57 +00:00
elad
105d9a093d Replace curlwp->l_cred with kauth_cred_get().
Mailing list reference:

	http://mail-index.netbsd.org/tech-kern/2009/05/05/msg005038.html
2009-05-06 18:41:54 +00:00
joerg
95bdabfada - device/softc split 2008-07-09 15:04:21 +00:00
macallan
346d21c906 nuke clause 3 2008-05-08 01:43:17 +00:00
jmcneill
1a53395e7e Change autoconf message 'direct rendering on dev unsupported' to
the more accurate 'drm at dev not configured'.
2008-05-05 11:42:45 +00:00
cegger
9d57c80079 use aprint_*_dev and device_xname 2008-04-10 19:13:36 +00:00
elad
b2b4fb68be Introduce two missing KAUTH_GENERIC_ISSUSER check in the voodoo and machfb
mmap() code.

This and similar requests will be replaced Soon, but these two in
particular should be pulled up to netbsd-4, and to allow doing that
smoothly, we're first introducing the "issuser" version.

Discussed with and okay macallan@.
2008-03-24 14:16:04 +00:00
macallan
ee03e6b4fb get rid of the last #ifdef macppc and use PCI_MAGIC_IO_RANGE to select
at which offset we mmap PCI IO space
2008-02-27 23:59:37 +00:00
ad
976457d5d6 Back out previous. 2007-12-01 17:00:41 +00:00
ad
0136093bcb Noisy printfs. 2007-12-01 16:54:28 +00:00
xtraeme
d06693ebcd Fix a typo in voodoofb_drm_unmap(), requested by garbled.
cvs: ----------------------------------------------------------------------
2007-06-12 18:16:54 +00:00
jmcneill
f99eecc8b2 Make this compatible with tdfxdrm. 2007-03-27 22:44:42 +00:00
christos
53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
he
ceeb812c89 Unify the declaration of OF_interpret() between sparc{,64} and macppc
by adding the "nargs" argument to the macppc version, and fix the macppc
ports uses of OF_interpret() accordingly.

Also move the declaration of OF_interpt() from macppc's autoconf.h to
ofw/openfirm.h.  This fixes the build of the macppc port.

Approved by macallan@.
2007-01-20 21:42:12 +00:00
cube
529a0e5bcd Complete initializer, and make it compile on (lesser?) archs that don't
have OpenFirmware.
2007-01-13 18:56:35 +00:00
simonb
5754da5b7f Add missing "return 0;" from WSDISPLAYIO_SMODE case in voodoofb_ioctl(). 2006-05-04 02:18:11 +00:00
jmmv
aec18036fd Remove the getwschar and putwschar accessops from wsdisplay drivers as
requested by uwe@.  These were wrong because they were receiving an
emulcookie yet they were accessops (thus having to receive an accesscookie).
Instead, just handle the WSDISPLAYIO_{GET,PUT}WSCHAR ioctls from the
driver's ioctl accessop.

As this reduces the amount of code needed to handle these operations to
two small functions in each driver, remove the WSDISPLAY_CHARFUNCS kernel
option.

Reviewed by, at least, uwe@ and macallan@.  No objections in tech-kern@.
2006-04-15 17:48:23 +00:00
macallan
0c6c2553d0 whitespace nits
( no, perry didn't steal my account )
2006-04-12 23:11:56 +00:00
jmmv
7a51d4dddc Add an extra cookie to the ioctl and mmap wsdisplay accessops that points
to the screen on which they are being called.  The driver cannot guess
this by itself but it is needed to implement, at least, the getwschar and
putwschar functions in the correct place.  There are no functional changes
yet.

Tested on i386 (vga, vga_raster, machfb, vesafb), macppc and sparc64.
Suggested and reviewed by macallan@.
2006-04-12 19:38:22 +00:00
macallan
82ce0b1388 A driver for 3Dfx Voodoo3 graphics boards, may or may not work with Voodoo4,
Voodoo5 or Banshee boards.

So far it supports:
- full acceleration in 8bit graphics mode
- video mode switching
- virtual consoles via vcons

So far it hasn't been tested on anything else than macppc and even there it
needs a hack to overload ofb.

TODO:
- test on i386
- don't hardcode video mode
2006-04-11 16:11:07 +00:00