summaryrefslogtreecommitdiff
path: root/sys/dev/rasops
AgeCommit message (Collapse)Author
2019-03-24Revert rasops32_putchar() changes introduced in revision 1.8.Frederic Cambus
This significantly speeds up character plotting on inteldrm and radeondrm, and also on efifb(4) since the driver now remaps the framebuffer in write combining mode. OK kettenis@, jcs@
2019-03-18Modify rasops_list_font_cb() to not filter out fonts with differentFrederic Cambus
sizes than the currently used one. This allows getting a list of all loaded fonts when using the WSDISPLAYIO_LSFONT ioctl. On top of allowing to see all fonts which are currently loaded when invoking the -l option of wsfontload(8), it also removes the confusion as to why we might reach the WSDISPLAY_MAXFONTCOUNT limit faster than expected when loading more fonts. OK sthen@
2019-01-09Enable Spleen in wsfont and modify the font selection logic at runtimeFrederic Cambus
in rasops(9) to allow selecting larger fonts when available. Summary of the changes: - Enable spleen8x16 for all architectures, replacing bold8x16_iso1. - Enable spleen12x24 on all arches but sparc64, replacing gallant12x22. - Enable spleen16x32 and spleen32x64 on amd64, i386, and arm64 for GENERIC kernels. - Modify the font selection logic in rasops(9) so the 16x32 and 32x64 fonts are selected if at least 120 columns can be displayed. Screens with widths equal or larger than 1920px will use the 16x32 font, and screens with widths equal or larger than 3840px the 32x64 one. OK kettenis@, ratchov@, deraadt@
2018-12-26Remove the rasops24_erasecols and rasops24_eraserows functions fromFrederic Cambus
rasops(9). We only build rasops24 functions on amd64 (for EFI support in QEMU) and on armv7 and arm64, and we can safely use the generic functions on those platforms, like we do for all other color depths. No other platform uses rasops24, Miod explains why here [1]. No performance regression observed when testing with QEMU in EFI mode. [1] https://marc.info/?l=openbsd-ppc&m=118664346819989&w=2 OK kettenis@
2018-09-22Only clear the character backing store when the RI_CLEAR flag is set.Mark Kettenis
ok deraadt@
2018-08-27Add an interface that allows drivers to claim a framebuffer and checkMark Kettenis
whether another driver has already claimed a framebuffer. Use this in radeondrm(4) and simplefb(4) to prevent the latter from attaching if radeondrm(4) is attached to the hardware that provides the framebuffer set up by the firmware. ok mlarkin@
2018-08-25The current rasops cursor implementation simply inverts the appropriateMark Kettenis
framebuffer pixels by doing an XOR with an all-ones bit pattern. This means the code has to read from the framebuffer which can be very slow. Add an implementation that simply redraws the character covered by the cursor with the foreground and background color swapped. While this doesn't necessarily have the same visual result, most people probably won't notice the difference (let's see). Use this implementation when the RI_WRONLY or the RI_VCONS flags are set. ok fcambus@
2018-05-03Use the default background attribute when erasing rows in doswitch andJonathan Gray
scrollback. Fixes use of an uninitialised attribute value in scrollback. Patch from miod@ ok kettenis@
2018-04-27rasops: implement scrollbackJoshua Stein
activate it for efifb and inteldrm ok kettenis
2018-04-20oops, snapshot tests not ready yetTheo de Raadt
2018-04-20syncTheo de Raadt
2018-01-23Fix underline rotation on CCW (quarter counter-clockwise) rotatedFrederic Cambus
screens. The "underline" was actually drawn above text. OK jcs@
2017-12-23Remove dead assignment.Frederic Cambus
Now that we call rasops_putchar_rotated(), we don't need ri anymore. OK kettenis@
2017-09-07In copycols() remove useless code that modifies the uninitializedAlexander Bluhm
sp variable. Its value is not used, it is overwritten later on. found by clang -Wuninitialized; OK deraadt@
2017-08-22Update inaccurate comment: rasops_copycols() doesn't use bcopy()Frederic Cambus
anymore, but either memmove() or slow_bcopy(). OK nayden@
2017-08-17Implement counter-clockwise rotation.Mark Kettenis
ok bcook@, stsp@
2017-08-13Fix rotation in combination wth vcons support by callingMark Kettenis
rasops_putchar_rotated() within the other rotation support functions. ok patrick@
2017-05-16when allocating a new screen, only copy the current buffer contentsJoshua Stein
to it for visible screens (i.e., the console). initialize other virtual screens with just blank character cells. ok mpi
2017-02-20memcpy a character row at a time to the framebuffer, rather thanJoshua Stein
sending pixel by pixel greatly speeds up the text framebuffer on some EFI implementations, such as shaving 10 seconds off a boot under VMWare Fusion ok deraadt
2016-12-15Remove rasops2 (2-bit color depth) functions, they are unused.Frederic Cambus
It seems unlikely that any future new platform will ever need them. OK mpi@
2016-09-26Avoid calculating offset several times. This was done for a few functions ↵Frederic Cambus
already, but not all of them. OK natano@
2015-09-07Make it possible to use RI_WRONLY for the aframebuffer during early boot.Mark Kettenis
In this case, the caller has to provide the backing store for the screen contents by setting the ri_bs member of "struct rasops_info". The screen contents are retained if the rasops_info descriptor is later reinitialized after adding the RI_VCONS flag. ok yasuoka@, deraadt@
2015-09-01uses sizes for free()Theo de Raadt
2015-06-21Don't leak mem if wsfont_rotate() fails.Jeremie Courreges-Anglas
Problem reported by Maxime Villard, ok miod@
2015-03-14Remove some includes include-what-you-use claims don'tJonathan Gray
have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
2015-01-27remove the second void * argument on tasks.David Gwynne
when workqs were introduced, we provided a second argument so you could pass a thing and some context to work on it in. there were very few things that took advantage of the second argument, so when i introduced pools i suggested removing it. since tasks were meant to replace workqs, it was requested that we keep the second argument to make porting from workqs to tasks easier. now that workqs are gone, i had a look at the use of the second argument again and found only one good use of it (vdsp(4) on sparc64 if you're interested) and a tiny handful of questionable uses. the vast majority of tasks only used a single argument. i have since modified all tasks that used two args to only use one, so now we can remove the second argument. so this is a mechanical change. all tasks only passed NULL as their second argument, so we can just remove it. ok krw@
2014-12-22Replace switch workq with taskq, using the blambert@ method (tm).Kenneth R Westerback
Tested with non-drm and wsfb systems. ok kettenis@ miod@
2014-12-19Use <sys/endian.h> instead of <machine/endian.h>Philip Guenther
ok dlg@ mpi@ bcook@ millert@ miod@
2014-12-13yet more mallocarray() changes.Doug Hogan
ok tedu@ deraadt@
2014-11-20Fix previous.Landry Breuil
Build failure reported by Sebastien Marie testing & ok phessler@
2014-11-20oops, mangled the prototypeTheo de Raadt
2014-11-20Rename slow_ovbcopy() to slow_bcopy(), since ovbcopy means nothing toTheo de Raadt
the young kids and old greybeards who know that bcopy has always handled the ov case.
2014-07-12add a size argument to free. will be used soon, but for now default to 0.Ted Unangst
after discussions with beck deraadt kettenis.
2013-10-20No longer store fonts added with the WSDISPLAYIO_LDFONT ioctl into theMiod Vallat
wsdisplay softc. Instead, since the knowledge about available fonts lies in the parent driver itself, introduce a list_font wsdisplay_accessop which queries a font index, suitable to use within the WSDISPLAYIO_LSFONT ioctl. With this in place: - there is no global wsdisplay limit on the number of fonts loaded. Such a limit will be enforced by the display drivers themselves. - built-in kernel fonts will now appear in the list of fonts. Grow a list_font accesop for rasops, which relies upon wsfont_enum(), which is turned into something useful (and abortable if you do not need to iterate further). Not used by any rasops driver yet.
2013-10-20Add a load_font accessop to rasops, to allow for fonts to be loaded andMiod Vallat
selected. All rasops fonts are managed by wsfont, which allows a font to be loaded on a rasops device and used on another. Currently not plumbed in any driver yet. This is work in progress.
2013-10-18Make sure that, when a particular mapchar() can't find a proper glyph for theMiod Vallat
requested character in the font it is using, it suggests a question mark character, instead of a space, so that the existence of the non-representable character becomes visible. Note that this is consistent with pcdisplay which suggests a diamond for missing glyphs.
2013-08-20Define WS_DEFAULT_FG and WS_DEFAULT_BG as default colors (black on white forMark Kettenis
sparc/sparc64, white on black for everybody else), and use them to construct a default color attribute in the rasops(4) code. ok miod@
2013-06-28Add support for write-only framebuffers. This makes the code that copiesMark Kettenis
rows and columns redraw the destination area instead of reading pixel values from the framebuffer. This can be a considerable performance win. Only works together with RI_VCONS. ok miod@
2013-06-11Replace all ovbcopy with memmove; swap the src and dst arguments tooTheo de Raadt
ok otto
2013-05-17Implement wsmoused support based on the new multiple screen support. OnlyMark Kettenis
works if the RI_VCONS flag is specified when initializing a rasops_info descriptor.
2013-03-25Add basic support for multiple screens.Mark Kettenis
ok mpi@, miod@
2011-06-23a bit more ansi; ok teduTheo de Raadt
2010-08-28ansify function definitions, and constify a few arrays while there.Miod Vallat
no functional change.
2010-07-01remove crappy old README filesTed Unangst
2010-01-12Do not check malloc return value against NULL, as M_WAITOK is used.Charles Longeau
ok miod@
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.
2008-08-20If RI_FORCEMONO is set in ri_flags, build ri_devcmap as if it was a 1bppMiod Vallat
frame buffer.
2008-06-26First pass at removing clauses 3 and 4 from NetBSD licenses.Ray Lai
Not sure what's more surprising: how long it took for NetBSD to catch up to the rest of the BSDs (including UCB), or the amount of code that NetBSD has claimed for itself without attributing to the actual authors. OK deraadt@
2007-09-01Fix space and underline handling in rasops24_putchar(), spotted by Leon Zadorin.Miod Vallat
2006-12-02Oops, prevent a warning if rasops_bswap is not required.Miod Vallat