summaryrefslogtreecommitdiff
path: root/sys/dev/ic/vga.c
AgeCommit message (Collapse)Author
2021-08-07Merge thorpej-cfargs2.thorpej
2021-04-24Merge thorpej-cfargs branch:thorpej
Simplify and make extensible the config_search() / config_found() / config_attach() interfaces: rather than having different variants for which arguments you want pass along, just have a single call that takes a variadic list of tag-value arguments. Adjust all call sites: - Simplify wherever possible; don't pass along arguments that aren't actually needed. - Don't be explicit about what interface attribute is attaching if the device only has one. (More simplification.) - Add a config_probe() function to be used in indirect configuiration situations, making is visibly easier to see when indirect config is in play, and allowing for future change in semantics. (As of now, this is just a wrapper around config_match(), but that is an implementation detail.) Remove unnecessary or redundant interface attributes where they're not needed. There are currently 5 "cfargs" defined: - CFARG_SUBMATCH (submatch function for direct config) - CFARG_SEARCH (search function for indirect config) - CFARG_IATTR (interface attribte) - CFARG_LOCATORS (locators array) - CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles) ...and a sentinel value CFARG_EOL. Add some extra sanity checking to ensure that interface attributes aren't ambiguous. Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark ports to associate those device handles with device_t instance. This will trickle trough to more places over time (need back-end for pre-OFW Sun OBP; any others?).
2020-04-24BUS_SPACE_MAP_PREFETCHABLE yields a write combining region on x86 and that'sad
not what I intended.. BUS_SPACE_MAP_CACHEABLE is enough.
2019-12-01Map the video RAM cacheable/prefetchable, it's very slow and this helps a bit.ad
2019-11-10in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAITchs
and remove code to handle failures that can no longer happen.
2015-03-01Also unmap video memory when detaching consolemlelstv
2015-01-14remove BIOS-mapping code that was #if-0'd in the previous commit.chs
2014-08-21#if 0 code to map the VGA BIOSmacallan
I've been unable to find any code that actually uses the mapping and we may want to read the ROM from drm2. If no users show up within a week or so I'll delete it.
2014-07-12detach wscons when detaching consolemlelstv
2013-11-04mark variables __diagusedchristos
2013-01-21Make internal functions staticmlelstv
2012-08-09Reset flip/flop using dedicated vga_reset_state() macro we already have.uwe
Explicit vga_raw_read() used here before was incorrect since it reads from *wrong* io handle! Fixes weird problem under VirtualBox where first switch to a different VT caused text mode color 0 (normally black) to become something else.
2012-01-11wsfont_matches() and wsfont_find() take an extra parameter nowmacallan
2011-06-08add support for the interesting parts of ISO-2 and KOI8-R fontsdrochner
to the vga(4) driver
2010-12-09PR/41415: IdOp: Implement save and restore palette for vga.christos
2010-10-19If PCDISPLAY_SOFTCURSOR is defined, disable the hardware cursor on resume.jmcneill
2010-04-19Add default implementations for bus_space_is_equal(9),dyoung
bus_space_tag_create(9), and bus_space_tag_destroy(9). Use bus_space_is_equal(9) throughout the kernel to compare bus_space_tag_t's. Tested on i386 and on sparc64.
2010-03-22pckbc.c, vga.c: It doesn't appear to be helpful to compare twodyoung
bus_space_tag_t's in pckbc_is_console() and vga_is_console(), and MI code should never do such a thing, so don't do it. tcic2.c: #if 0 some diagnostic code that compares two bus_space_tag_t's.
2010-02-25retire our private definitions for the scan1/3/5/7/9 DEC graphicsdrochner
symbols, use the unicode definitions instead (which apparently didn't exist when I wrote that)
2009-02-19Remove vesafb-specific hacks.jmcneill
2008-03-16Always deviter_release().dyoung
2008-03-14In vga_is_console(), use deviter_first/_next() and device_t accessors.dyoung
Ok cube@.
2008-03-14Split device_t and softc for all attachments of vga(4).cube
2007-12-09Merge jmcneill-pm branch.jmcneill
2007-10-19machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.had
2007-07-28Implement bounds checking in some places in display driver code to avoidmjf
the possibility of a local user panic.
2007-07-19include sys/cdefs.h before opt_xxx.hdsl
2007-07-09Merge some of the less invasive changes from the vmlocking branch:ad
- kthread, callout, devsw API changes - select()/poll() improvements - miscellaneous MT safety improvements
2007-03-04Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.christos
2006-11-16__unused removal on arguments; approved by core.christos
2006-10-12- sprinkle __unused on function decls.christos
- fix a couple of unused bugs - no more -Wno-unused for i386
2006-09-13- use c99 initializerschristos
- add missing initializer
2006-08-13Provide a method for other display drivers to ask vga to free resourcesjmcneill
it had claimed while acting as the initial console device. This allows (for example) vga to be the initial console, and an accelerated framebuffer driver to take over later.
2006-04-15Remove the getwschar and putwschar accessops from wsdisplay drivers asjmmv
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-12Add an extra cookie to the ioctl and mmap wsdisplay accessops that pointsjmmv
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-05Move the ga_getborder()/vga_setborder() calls from accessops to thedrochner
ioctl handler. Also fix error reporting for the vga_getborder() call.
2006-02-19Prevent vga from attaching if vesafb is the console. Accessing VGAjmcneill
registers after switching to a VESA linear framebuffer mode is not guaranteed to work. This should fix the majority of the problems people have been experiencing with vesafb. XXX: Still doesn't fix the assertion in wscons with options DIAGNOSTIC.
2005-12-11merge ktrace-lwp.christos
2005-10-21decrement nscreens in vga_free_screendbj
this cleans up a crash on failed allocation, although vga_free_screen may still be leaking resources
2005-02-27nuke trailing whitespaceperry
2004-08-13Fix two annoying display glitches with "fast scrolling" andmycroft
WSDISPLAY_SCROLLSUPPORT.
2004-08-08disable the quirk on the console so that it can scroll.christos
2004-07-30Fix initialitzation of border color at boot time through thejmmv
WSDISPLAY_BORDER_COLOR option, broken by a last-minute change. Pointed out by xtraeme@. Also back out the previous change by dogcow@, which was an attempt to fix kernel builds that didn't define WSDISPLAY_CUSTOM_BORDER; shouldn't be needed now. (Problem also introduced by the same last-minute change; sorry).
2004-07-30let kernels that don't have WSDISPLAY_CUSTOM_BORDER compile again.dogcow
2004-07-29Implement border color customization in wscons(4), only available for vga(4)jmmv
at the moment. This includes the addition of two new wsdisplay ioctls, WSDISPLAY_{G,S}BORDER, one to get the actual color and one to set it, respectively. Possible colors match those defined by ANSI (and listed in wsdisplayvar.h). It also adds two accessops to the underlying graphics device, getborder and setborder, which mach their ioctl counterparts. Two kernel options are added: WSDISPLAY_CUSTOM_BORDER, which enables the ioctls described above (to customize the border color from userland after boot), and WSDISPLAY_BORDER_COLOR, which sets the color at boot time. The former is enabled by default on the GENERIC kernel, but not on INSTALL (among others). The later is always commented out, leaving the usual black border as a default. wsconsctl is modified to allow accessing this value easily. For example, 'wsconsctl -d -w border=blue'.
2004-07-28Implement support to dynamically change wscons console and kernel colors.jmmv
Two new ioctls are added to the wsdisplay device, named WSDISPLAY_GMSGATTRS and WSDISPLAY_SMSGATTRS, used to retrieve the actual values and set them, respectively (the name, if you are wondering, comes from "message attributes"). A new emulop is added to the underlying display driver (only vga, for now) which sets the new attribute for the whole screen, without having to clear it. This is optional, which means that this also works with other drivers that don't have this new operation. Five new kernel options have been added, although only documented in i386 kernels (for now): - WSDISPLAY_CUSTOM_OUTPUT, which enables the ioctls described above to change the colors dynamically from userland. This is enabled by default in the GENERIC kernel (as well as others) but disabled on all INSTALL* kernels (as this feature is useless there). - WS_DEFAULT_COLATTR, WS_DEFAULT_MONOATTR, WS_DEFAULT_BG and WS_DEFAULT_FG, which specify the default colors for the console at boot time. These have the same meaning as the (already existing) WS_KERNEL_* variables. wsconsctl is modified to add msg.default.{attrs,bg,fg} and msg.kernel.{attrs,bg,fg} to the display part, so that colors can be changed after boot. Tested on NetBSD/i386 with vga (and vga in mono mode), and on NetBSD/mac68k. No objections in tech-kern@.
2004-05-29fix another scrolling use that leaked.christos
2004-05-28move scroll function definition last.christos
2004-05-28PR/19925: David Ferlier: Add scrolling support to wscons.christos
2003-06-29Back out the lwp/ktrace changes. They contained a lot of colateral damage,fvdl
and need to be examined and discussed more.