summaryrefslogtreecommitdiffstats
path: root/sys/dev/rasops (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Include the optimized putchar functions only if RASOPS_SMALL is notfcambus2021-01-091-4/+4
| | | | | | defined, as was previously the case. OK kettenis@
* Only enable rasops1_putchar8() and rasops1_putchar16() optomizations onkettenis2020-12-211-5/+5
| | | | | | | | | big-endian architectectures. These functions assume big-endian bit order whereas rasops1_putchar() assumes native-endian bit order. Since ssdfb(4) assumes little-endian bit order and is the only consumer of these interfaces on little-endian platforms, go with the rasop1_putchar() convention for now. ok mpi@
* Fix comments to match code; OK fcambus@tim2020-07-231-3/+3
|
* Fix various whitespace and formatting issues in rasops(9).fcambus2020-07-203-16/+12
|
* Merge the two if blocks checking if the font in use contains a givenfcambus2020-07-171-8/+3
| | | | | | character in rasops_mapchar(). OK kn@, cheloha@
* Optimize character rendering in 32bpp mode, with unrolled rows andfcambus2020-07-151-26/+112
| | | | | | | | | | | | | pairwise foreground / background pixel rendering. This does double-pixel rendering for the common font widths (8, 12, 16, and 32 pixels wide), resulting in a significant speed-up. No regression noticed on 32-bit architectures. Tested by weerd@, and by abieber@ on macppc. From John Carmack, thanks!
* Optimize rasops_vcons_copyrows() so write-only framebuffer consolesfcambus2020-07-111-11/+26
| | | | | | | | | only redraw the characters that differ between the start and end positions. This makes scrolling significantly faster. From John Carmack, thanks! OK jcs@
* Remove old commented out line and fix indent.mortimer2020-06-161-3/+2
| | | | | | clang-10 complains about the misleading indentation. ok patrick@
* change wsdisplay attribute type from long to uint32_tjsg2020-05-259-107/+107
| | | | | | | | miod explained it was initially a long as it was thought drivers may need to allocate storage but in practice they don't need more than 32 bits for an attribute. suggested and reviewed by miod@
* rename wsdisplay alloc_attr() to pack_attr()jsg2020-05-252-18/+18
| | | | | | | | Suggested by John Carmack. miod agrees a rename would make sense and explained it was initially thought drivers may need to allocate storage but in practice they don't need more than 32 bits for an attribute. ok mpi@
* Revert rasops32_putchar() changes introduced in revision 1.8.fcambus2019-03-241-8/+5
| | | | | | | | 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@
* Modify rasops_list_font_cb() to not filter out fonts with differentfcambus2019-03-181-5/+1
| | | | | | | | | | | | 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@
* Enable Spleen in wsfont and modify the font selection logic at runtimefcambus2019-01-091-6/+15
| | | | | | | | | | | | | | | | | 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@
* Remove the rasops24_erasecols and rasops24_eraserows functions fromfcambus2018-12-261-225/+1
| | | | | | | | | | | | | | | 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@
* Only clear the character backing store when the RI_CLEAR flag is set.kettenis2018-09-221-5/+7
| | | | ok deraadt@
* Add an interface that allows drivers to claim a framebuffer and checkkettenis2018-08-272-2/+40
| | | | | | | | | 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@
* The current rasops cursor implementation simply inverts the appropriatekettenis2018-08-251-17/+44
| | | | | | | | | | | | 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@
* Use the default background attribute when erasing rows in doswitch andjsg2018-05-031-8/+8
| | | | | scrollback. Fixes use of an uninitialised attribute value in scrollback. Patch from miod@ ok kettenis@
* rasops: implement scrollbackjcs2018-04-272-17/+87
| | | | | | activate it for efifb and inteldrm ok kettenis
* oops, snapshot tests not ready yetderaadt2018-04-202-87/+17
|
* syncderaadt2018-04-202-17/+87
|
* Fix underline rotation on CCW (quarter counter-clockwise) rotatedfcambus2018-01-231-1/+3
| | | | | | | | screens. The "underline" was actually drawn above text. OK jcs@
* Remove dead assignment.fcambus2017-12-231-4/+1
| | | | | | Now that we call rasops_putchar_rotated(), we don't need ri anymore. OK kettenis@
* In copycols() remove useless code that modifies the uninitializedbluhm2017-09-071-4/+2
| | | | | sp variable. Its value is not used, it is overwritten later on. found by clang -Wuninitialized; OK deraadt@
* Update inaccurate comment: rasops_copycols() doesn't use bcopy()fcambus2017-08-221-3/+3
| | | | | | anymore, but either memmove() or slow_bcopy(). OK nayden@
* Implement counter-clockwise rotation.kettenis2017-08-172-18/+27
| | | | ok bcook@, stsp@
* Fix rotation in combination wth vcons support by callingkettenis2017-08-131-3/+3
| | | | | | rasops_putchar_rotated() within the other rotation support functions. ok patrick@
* when allocating a new screen, only copy the current buffer contentsjcs2017-05-161-2/+2
| | | | | | | to it for visible screens (i.e., the console). initialize other virtual screens with just blank character cells. ok mpi
* memcpy a character row at a time to the framebuffer, rather thanjcs2017-02-201-5/+8
| | | | | | | | | 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
* Remove rasops2 (2-bit color depth) functions, they are unused.fcambus2016-12-154-485/+7
| | | | | | It seems unlikely that any future new platform will ever need them. OK mpi@
* Avoid calculating offset several times. This was done for a few functions already, but not all of them.fcambus2016-09-261-9/+17
| | | | OK natano@
* Make it possible to use RI_WRONLY for the aframebuffer during early boot.kettenis2015-09-072-7/+120
| | | | | | | | | 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@
* uses sizes for free()deraadt2015-09-011-5/+6
|
* Don't leak mem if wsfont_rotate() fails.jca2015-06-211-4/+2
| | | | Problem reported by Maxime Villard, ok miod@
* Remove some includes include-what-you-use claims don'tjsg2015-03-141-2/+1
| | | | | | | have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
* remove the second void * argument on tasks.dlg2015-01-271-5/+5
| | | | | | | | | | | | | | | | | | | | | 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@
* Replace switch workq with taskq, using the blambert@ method (tm).krw2014-12-222-10/+13
| | | | Tested with non-drm and wsfb systems. ok kettenis@ miod@
* Use <sys/endian.h> instead of <machine/endian.h>guenther2014-12-196-14/+12
| | | | ok dlg@ mpi@ bcook@ millert@ miod@
* yet more mallocarray() changes.doug2014-12-131-3/+5
| | | | ok tedu@ deraadt@
* Fix previous.landry2014-11-201-1/+3
| | | | | Build failure reported by Sebastien Marie testing & ok phessler@
* oops, mangled the prototypederaadt2014-11-201-1/+2
|
* Rename slow_ovbcopy() to slow_bcopy(), since ovbcopy means nothing toderaadt2014-11-201-10/+7
| | | | | the young kids and old greybeards who know that bcopy has always handled the ov case.
* add a size argument to free. will be used soon, but for now default to 0.tedu2014-07-121-4/+4
| | | | after discussions with beck deraadt kettenis.
* No longer store fonts added with the WSDISPLAYIO_LDFONT ioctl into themiod2013-10-202-2/+55
| | | | | | | | | | | | | | | 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.
* Add a load_font accessop to rasops, to allow for fonts to be loaded andmiod2013-10-202-2/+87
| | | | | | | 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.
* Make sure that, when a particular mapchar() can't find a proper glyph for themiod2013-10-181-4/+4
| | | | | | | | | 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.
* Define WS_DEFAULT_FG and WS_DEFAULT_BG as default colors (black on white forkettenis2013-08-201-3/+3
| | | | | | | sparc/sparc64, white on black for everybody else), and use them to construct a default color attribute in the rasops(4) code. ok miod@
* Add support for write-only framebuffers. This makes the code that copieskettenis2013-06-282-5/+36
| | | | | | | | 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@
* Replace all ovbcopy with memmove; swap the src and dst arguments tooderaadt2013-06-111-5/+5
| | | | ok otto
* Implement wsmoused support based on the new multiple screen support. Onlykettenis2013-05-172-8/+26
| | | | | works if the RI_VCONS flag is specified when initializing a rasops_info descriptor.