summaryrefslogtreecommitdiff
path: root/sys/dev/ic/vga.c
AgeCommit message (Collapse)Author
2013-03-17Better way to prevent the VGA text console wsdisplay instance from atachingMark Kettenis
after we've taken over control of the VGA hardware.
2013-03-15Skip further initialization of a vga devices if a drm driver attached aMark Kettenis
wsdisplay device itself.
2011-04-03Sprinkle spltty around code which plays with either the video memory orMiod Vallat
the backing store. The state of a VT is only coherent if both the active flag and the backing store are in order, which is not the case during VT switches. This fixes display glitches occuring during VT switches if one of the VT involved is doing a lot of tty updates. Noticed by deraadt@ on a machine too fast for mere mortals.
2010-08-28ansify function definitions, and constify a few arrays while there.Miod Vallat
no functional change.
2010-08-08Try to save the vga hardware state around suspend, and also redisplay theMiod Vallat
textmode video memory contents if we had to POST the vga bios. ok deraadt@ kettenis@
2009-09-05Change the wsdisplay_emulops return types from void to int; emulops will nowMiod Vallat
return zero on success and nonzero on failure. This commit only performs mechanical changes for the existing emulops to always return zero.
2009-08-12Backing store for ega and vga virtual console is not allocated until theMiod Vallat
second vc is created. However, it was allocated using the geometry of the second vc to allocate backing store for the first. Be sure to use the proper values in case geometries differ.
2009-03-29make various strings ("can't map mem space" and similar) more consistentStuart Henderson
between instances, saving space in the kernel. feedback from many (some incorporated, some left for future work). ok deraadt, kettenis, "why not" miod.
2009-02-15change M_WAITOK --> M_WAITOK | M_CANFAILCharles Longeau
with help from miod@ ok miod@ oga@
2009-02-01Save the text mode color palette upon startup, and restore it whenMiod Vallat
switching consoles or when X11 exits. Almost all other operating systems do this, and thus do not suffer from palette bugs in some X11 drivers. From FreeBSD.
2008-03-16Make agp(4) attach at vga(4) instead of pchb(4). This is because sometimesOwain Ainsworth
agp and drm need to use the same memory mapping, the best way to deal with that is to allow them to share (that's coming later), for this to work cleanly we move the attach point of agp. Ideally most agp drivers would attach at pchb, with only agp_i810 (and any that work similarly) attaching at vga, but this will do for now. ok kettenis@, miod@.
2007-10-01More easy bzero() -> M_ZERO. Use 'p = malloc(sizeof(*p) ...'.Kenneth R Westerback
2007-02-11Remove _KERNEL_OPT leftovers.Miod Vallat
2007-02-06Evil typo; spotted by Thorsten GlaserMiod Vallat
2006-12-02In alloc_attr(), make sure xxansitopc[] indicies are within bounds.Miod Vallat
2006-11-29Change the getchar wsdisplay_accessops function to not return aMiod Vallat
display-dependent value, but instead fill a structure with the chaarcter and a valid attribute, suitable for use with unpack_attr. Adapt the wsmoused code to these changes, and remove all knowledge of the text-mode style pc video attributes in it. This will eventually allow wsmoused to be used on non-pcdisplay devices.
2006-11-29Add an unpack_attr function to struct wsdisplay_emulops, to match theMiod Vallat
existing alloc_attr function. This allows rasops_unpack_attr to be kept private to rasops, yet available to the screen drivers.
2006-11-29Add a new member to struct wsemuldisplaydev_attach_args, for a frame bufferMiod Vallat
driver to be able to tell how many wscons screens to attach to it, instead of WSDISPLAY_DEFAULTSCREENS which is a global setting.
2006-09-29If option PCDISPLAY_SOFTCURSOR, force the hardware cursor off every timeMiod Vallat
we switch vt, so that the hardware cursor does not reappear after starting X11, and switching to a text vt. Spotted by jmc@
2005-01-31Be sure to always return an error for unrecognized ioctls. Found by matthieu@Miod Vallat
2005-01-05Let wsdisplay drivers return zero for WSDISPLAYIO_[GS]VIDEO ioctls - mostMiod Vallat
of the work is done in the upper layer, but they get to see the ioctl, so don't always return an error.
2004-12-26Use list and queue macros where applicable to make the code easier to read;Miod Vallat
no change in compiler assembly output.
2004-12-25Do not allow loading a font in an used font slot; discussed with and ok mickey@Miod Vallat
2004-11-04fix memory leak on deleting a screen; from janjaap@stack.nl via pr3977Michael Shalayeff
2004-08-06Easy one! Remove two redundant assignments.Per Fogelstrom
OK from miod@, millert@, henning@, marcus@ .... :)
2004-02-27Fix a botched strchr() inlining in vga_load_font and avoid dereferencingTodd C. Miller
data->name if it is NULL. Fixes the WSDISPLAY_USEFONT ioctl. Adapted from a patch by Benjamin Lewis; NULL check from NetBSD. OK tdeval@
2003-05-17Replace suspect strncpy with strlcpy to ensure null termination.Kenneth R Westerback
ok tdeval@ deraadt@ miod@
2002-07-12support for the agp gart on various agp chipsets.Michael Shalayeff
only i810 driver was tested though. based on the netbsd's lkm, initially ported by hunter@dg.net.ua and later made into shape by mickey. testing by art@ and millert@ .
2002-03-14Final __P removal plus some cosmetic fixupsTodd C. Miller
2002-03-14First round of __P removal in sysTodd C. Miller
2001-08-03Avoid warning when building with vga on isa without vga on pci; ok mickey@Thorsten Lockert
2001-05-16allocate memory w/ NOWAIT during autoconf time and check for NULL returnMichael Shalayeff
2001-05-08inplement screen burner in screenblank(1) style (no program though).Michael Shalayeff
disabled by default, also supports vsync blanking, disabled by default. aaron@ looked at it a while back and i fixed problems he had indicated.
2001-05-08support a hook for vga_pci-based ioctls; aaron@ ookMichael Shalayeff
2001-04-14Kernel support for console mouse functionality which will be controlled byAaron Campbell
the wsmoused daemon (replacement for moused which was used with PCVT). Adds a "getchar" method to the display drivers which returns the value of the character currently under the cursor (e.g., so it may be inversed). From jbm@. Still needs a bit of cleanup and improvement, especially X cohabitation features. The pointer moves to fast as well. These sorts of issues will be corrected in-tree.
2001-04-01if we have a secondary fontset loaded and itMichael Shalayeff
does mapchar for it w /the same success as primary, prefer secondary mapping. this fixes non-lat char display. from Igor Grabin <violent@death.kiev.ua>
2001-03-22remember vga type as passed from lower level attachMichael Shalayeff
2001-03-16zero vga_config after allocMichael Shalayeff
2001-03-14allow listing and soon deleting fonts; aaron@ okMichael Shalayeff
2001-02-28do not blindely bus_space_ma the vga bios,Michael Shalayeff
it could be of a different size than 0x8000, and now bios(4) does it for us the right way. besides, would the prom be at the same address on non-i386?
2001-02-08Cause keypresses to reset the screen in case we are in scrollback (previouslyAaron Campbell
the screen was only restored if a new character was actually displayed on the screen); jcs@rt.fm. This brings us closer to the behavior of PCVT. Also, while I'm here, add some #ifdef so wskbd does not depend on wsdisplay (pointed out to me by fgsch@).
2001-01-31OpenBSD does have paddr_t, I can't explain why I thought it didn't; art@Aaron Campbell
2001-01-31Some int -> u_long (I incorrectly converted paddr_t to int when porting this).Aaron Campbell
2000-11-22Set visible offset properly.Aaron Campbell
2000-11-15Updated VGA driver; from NetBSD. Needed for wscons on i386 and alpha. TheseAaron Campbell
files could probably be updated even a bit further (they are from mid-summer). In addition, I've added support for console scrollback, somewhat inspired by Linux's vgacon driver. Basically, instead of allocating our own buffer and doing lots of copies, we take advantage of Video RAM and just modify the VGA display origin register as appropriate. This approach has a few advantages: simple to implement, no wasted KVM, it's fast, and after a boot you can now scroll back all the way to the BIOS messages (assuming your msgbuf is of a typical length :). Disadvantages are that the VRAM buffer is relatively small (only 32k) and we do not support raster devices through this method. (thanks to mickey@ for pointing this out). The code for this is fairly unobtrusive, so should we come up with a better approach to console scrollback at a later time (i.e., even more platform independent) it should be easy to revert this. We're one step further in porting nice features of PCVT over to wscons.
1998-09-28support powerpc port (needs ifdef to use powerpc_btop()), is thereDale S. Rahn
a machine independant function that calls this md function??
1997-11-06Add some missing things for the MI vga driver. Move wscons to an MI place asNiklas Hallqvist
well. $OpenBSD$ tagging
1997-11-06temp <machine_btop() fixMichael Shalayeff
1997-11-06We need an MI vga driver. The alpha one was most MI. Not entirely yet though.Niklas Hallqvist
Some files were move behind CVS back.
1997-08-25better mmap support, what funTheo de Raadt