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.
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@.
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.
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.
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.
- 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
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.
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.
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!
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.