Commit Graph

52 Commits

Author SHA1 Message Date
macallan
56e33f114e wsfont_matches() and wsfont_find() take an extra parameter now 2012-01-11 20:41:28 +00:00
macallan
ee402ab400 use rasops_init(0, 0) 2012-01-11 16:12:38 +00:00
mrg
9af887f060 convert to device_t, cfdata_t and CFATTACH_DECL_NEW. 2011-07-26 08:56:26 +00:00
macallan
2b22cbf04c set RI_NO_AUTO then attaching early, clear it otherwise 2010-05-12 20:58:52 +00:00
elad
d52b481791 Change a comment. INSECURE has but one purpose. 2009-12-24 19:16:28 +00:00
macallan
910612113d Make colour depths higher than 8bit work in X.
Now igsfb will switch to 16 or 32 bit colour when entering graphics mode,
depending on available video memory and the given mode.
While there re-initialize the colour map etc. when leaving graphics mode.
2009-11-18 21:59:38 +00:00
macallan
d0b2c36849 add modeseting support. Now if there's a mode string in igsfb_devconfig the
driver will try to use it if at all possible, otherwise fall back to the old
hardcoded 1024x768x60 mode.
2009-11-11 17:01:17 +00:00
macallan
293ac096d1 add support for an optional machine-dependent mmap() method, so the bus
backend can do whatever voodoo necessary to the aperture, IO space etc.
Mainly for shark, to get around the weird ARM bus_space.
2009-11-10 22:23:22 +00:00
cegger
7088512994 use aprint_*_dev and device_xname 2008-04-08 12:07:25 +00:00
ad
a2a3828545 machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h 2007-10-19 11:59:34 +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
cube
4096a1c345 The definition of bus_space_vaddr on i386 makes it inappropriate as the
first argument to memset(), so change the code very slightly to workaround
that.
2007-01-13 19:45:28 +00:00
uwe
dee7f461a0 G/c unnecessary includes. 2006-08-18 02:42:38 +00:00
mrg
afda9ed915 initialise pos.x and pos.y to appease GCC4. 2006-05-20 07:09:08 +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
uwe
ccf4b50a2c KNF: no parentheses around return value. 2006-04-05 01:13:50 +00:00
uwe
a31a2f7d75 ANSI'ify. 2006-04-05 01:05:50 +00:00
uwe
0eaa91ef03 Add dc_stride member to igsfb_devconfig.
Eliminate all mentions of rasops_info from igsfb_ioctl(), we have all
the information in igsfb_devconfig now.  It's semantically correct to
serve that info from there, not from a cached copy in rasops_info.
2006-04-04 23:43:40 +00:00
uwe
771831be53 Use bus_space_vaddr() to get the address of the framebuffer. 2006-04-04 23:00:15 +00:00
uwe
fc2595db94 Use designated initializers for wsscreen structs. It takes less space
and is easier to read.  While here, update function name in comment.
2006-04-04 22:36:15 +00:00
uwe
3995a3168e Nuke delay() that sneaked in with one of old revisions. It's not
necessary.

When we attach as console on netwinder, the timer is not yet attached,
so delay() resorts to a busy loop.  That loop takes BIGNUM seconds(!)
to complete.  That makes you think the machine wedged.
2006-04-04 22:25:23 +00:00
uwe
752f872bf4 Fix indentation nits. 2006-04-03 21:18:20 +00:00
uwe
d5925f5050 Honor RI_FULLCLEAR in igsfb_accel_eraserows. 2006-04-03 21:03:15 +00:00
uwe
774263e48a Properly fix cursor sprite endianness problems: always build
cc_sprite[] in little-endian, as that's how the card wants it.

Tested on netwinder (hardware bswap) by myself, and on current krups
kernel (no bswap) and 3.0 krups kernel (software bswap) by macallan.
2006-04-03 20:44:35 +00:00
macallan
998a8ba3e2 clear the whole screen on startup, fix an endianness mismatch when creating
the cursor sprite - this needs to be tested ( and probably fixed ) on a
netwinder.
2006-02-24 18:35:09 +00:00
macallan
31038cb7db Add support for virtual consoles to igsfb.
Works fine on a Krups, needs testing on other ports.
2006-02-23 08:01:59 +00:00
christos
95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
macallan
8240aaf01d revert unnecessary geometry changes, add missing {} so turning off the
cursor when leaving emulation mode and getting it back when re-entering really
works now.
2005-10-01 01:10:50 +00:00
uwe
e97ebbc6c8 Minor KNF police. 2005-09-30 23:16:26 +00:00
macallan
8d7ddb1d4e - turn off the hardware cursor when leaving WSDISPLAYIO_MODE_EMUL
- only lock the hardware cursor when not in WSDISPLAYIO_MODE_EMUL
- allow cursor position between 0 and (screen width + max. cursor width - 1),
  same for height so it can move partially offscreen in all directions
2005-09-30 22:28:19 +00:00
macallan
fc1aa8099e add a blank line before case WSDISPLAYIO_LINEBYTES 2005-09-12 12:07:47 +00:00
macallan
0841377bbd add ioctl(WSDISPLAYIO_LINEBYTES) - needed by XFree's wsfb 2005-09-12 11:02:21 +00:00
perry
f31bd063e9 nuke trailing whitespace 2005-02-27 00:26:58 +00:00
uwe
520a24ea83 Use standard uintN_t types instead of home-grown u_intN_t types. 2004-11-26 22:29:36 +00:00
uwe
c82b9df9d8 Fix several typos in comments. 2004-11-26 02:07:09 +00:00
chs
e07f0b9362 eliminate uvm_useracc() in favor of checking the return value of
copyin() or copyout().

uvm_useracc() tells us whether the mapping permissions allow access to
the desired part of an address space, and many callers assume that
this is the same as knowing whether an attempt to access that part of
the address space will succeed.  however, access to user space can
fail for reasons other than insufficient permission, most notably that
paging in any non-resident data can fail due to i/o errors.  most of
the callers of uvm_useracc() make the above incorrect assumption.  the
rest are all misguided optimizations, which optimize for the case
where an operation will fail.  we'd rather optimize for operations
succeeding, in which case we should just attempt the access and handle
failures due to insufficient permissions the same way we handle i/o
errors.  since there appear to be no good uses of uvm_useracc(), we'll
just remove it.
2003-11-13 03:09:28 +00:00
uwe
586aada22a Supress bogus -Wuninitialized warnings. 2003-11-07 15:02:28 +00:00
uwe
f7c1e9b8e5 Comment change only, the ioctl is WSDISPLAYIO_PUTCMAP, not ..._SETCMAP.
The function is called igsfb_set_cmap() to follow the get/set/update
naming convention.
2003-08-31 14:41:15 +00:00
uwe
c173e7908e Only install accelerated rasops for CyberPro, we don't know yet how to
access the coprocessor on 1682 in Krups.
2003-06-24 00:13:29 +00:00
uwe
a7ed2dae3d Correct calculation of the blit src/dst for blits we do backwards. 2003-06-10 22:07:38 +00:00
uwe
97e817d08e Implement accelerated text ops using graphic coprocessor. 2003-05-31 23:22:26 +00:00
uwe
a3e1bfb091 Use hardware sprite for the text mode cursor.
Fail cursor related ioctls with EBUSY while in text mode.

Don't do uvm_useracc checks before copyout, instead check copyout()
return value directly.

Minor cleanups.
2003-05-11 03:20:09 +00:00
uwe
6311425db4 Don't need a separate bit expansion table for the cursor mask. 2003-05-10 16:20:23 +00:00
uwe
64e9f09f51 Enforce that the cursor position and the hot spot are within bounds.
Constify a bit.  Fix unsignedness of a few local variables.
2003-05-10 15:25:19 +00:00
uwe
2866542ad3 Redo attachment to support proper cnattach.
wscons on netwinder almost works now.
2003-05-10 01:51:56 +00:00
uwe
333e0ca8a9 Quick patch to allow the (only) screen to be configured with
wsconscfg(8) when it's not being used as the console.
2003-01-12 21:37:59 +00:00
uwe
be3f67ca41 Add some preliminary support for setting up the CyberPro in Netwinder.
Setup sequence obtained from Krups OFW with some CyberPro-specific
magic from Linux driver.  The driver still has a lot of hardcoded
stuff, but it is useful enough to bring up wscons on netwinder.

XXX: Proper console attachment needs to be written (the driver was
originally developed on sparc, where our approach to attaching console
is totally different).

Caveat emptor!
2002-09-24 18:17:24 +00:00
itojun
8dd04cdcd7 correct range check, have overflow check, fix type mismatches,
for cmap args and some other calls.  from openbsd
2002-08-03 00:12:48 +00:00
uwe
fee27e724f Add definitions of IGS coprocessor registers (not used yet).
Always init chip via I/O space.
Map only I/O registers we actually need.
Automatically detect if we need to do bswapping
Add (untested) code to use automagic bswap on CyberPro.
Report video memory amount.
Report if/how bswapping is done.
2002-07-21 02:56:35 +00:00
junyoung
3d826105dc alloc_attr -> allocattr
Approved by Matthias Drochner.
2002-07-04 14:37:10 +00:00