Home | History | Annotate | Download | only in wscons
History log of /src/sys/dev/wscons/wsdisplay_vcons.c
RevisionDateAuthorComments
 1.70  28-Apr-2025  macallan allow to specify the font's height in WSDISPLAYIO_SFONT.
now you can:
/home/ml# wsfontload -l
Gallant 12x22
Droid Sans Mono 10x20
Droid Sans Mono 12x22
Terminal 8x13
HP ROM 10x20
/home/ml# wsconsctl -dw font="Droid Sans Mono@20"
font -> "Droid Sans Mono@20"
/home/ml# wsconsctl -dw font="Droid Sans Mono@22"
font -> "Droid Sans Mono@22"
/home/ml# wsconsctl -dw font="Droid Sans Mono@15"
wsconsctl: WSDISPLAYIO_SFONT: No such file or directory
 1.69  20-Oct-2024  mlelstv Add WSDISPLAYIO_GFONT ioctl to query the installed font name.
 1.68  09-Feb-2024  andvar branches: 1.68.2;
fix spelling mistakes, mainly in comments and log messages.
 1.67  15-Feb-2023  riastradh dev/wscons/wsdisplay_vcons.c: Sprinkle KNF.
 1.66  14-Feb-2023  macallan add flags for drivers to requesr R2L bit/byte-ordered fonts, default to
L2R, chack them in vcons_load_font() instead of just trusting that we'd get
what we need
 1.65  14-Feb-2023  macallan make vcons_putchar_buffer() return a flag indicating if anything actually
changed, skip the actual drawing op if nothing did
 1.64  18-Jul-2022  martin branches: 1.64.4;
Make it compile w/o warnings for !VCONS_DRAW_INTR
 1.63  17-Jul-2022  riastradh wsdisplay(4): Make most of struct vcons_data private.

More importantly, make sizeof(struct vcons_data) independent of
whether VCONS_DRAW_INTR &c. is defined.

Allocate the private space with kmem rather than in the caller.

This still doesn't have very good separation between interface
parameters and internal state, but it's better than before, and is
necessary to make genfb usable in modules.

In arm_simplefb.c, this removes use of the use_intr member. That
assignment became redundant with the introduction of vcons_earlyinit,
so there's no need to replace it by anything.
 1.62  17-Jul-2022  riastradh wsdisplay(4): KNF: return foo, not return (foo)

No functional change intended.
 1.61  17-Jul-2022  riastradh wsdisplay(4): KASSERT(a && b) -> KASSERT(a); KASSERT(b)

Better diagnostics this way. No other functional change. Omit
needless #ifdef DIAGNOSTIC while here; the compiler can optimize the
dead code away.
 1.60  17-Jul-2022  riastradh wsdisplay(4): Use DPRINTF; reduce #ifdefs.
 1.59  17-Jul-2022  riastradh wsdisplay(4): Insert memory barriers for scr_dirty synchronization.

Otherwise vcons_update_screen in vcons_softintr might attempt to draw
stale data from the buffers on the screen.
 1.58  17-Jul-2022  riastradh wsdisplay(4): Factor out scr_dirty setting.

Reduces #ifdefs. No functional change intended.
 1.57  17-Jul-2022  riastradh wsdisplay(4): Factor out use_intr tests.

Nix a lot of #ifdefs this way. Compiler can take care of dead code
if appropriate. No functional change intended.
 1.56  17-Jul-2022  riastradh wsdisplay(4): Factor out WSDISPLAY_SCROLLSUPPORT logic.

Should find a way to avoid the #ifdefs in the .h file, but this makes
the code a good deal more legible and easier to maitain, at least.
No functional change intended.
 1.55  17-Jul-2022  riastradh wsdisplay(4): Nix trailing whitespace.
 1.54  16-Jul-2022  mlelstv modify screen before updating cache.
 1.53  16-May-2021  mlelstv Try to guess attributes better.
 1.52  16-May-2021  mlelstv No need to check cell count.
 1.51  28-Jan-2021  macallan branches: 1.51.4; 1.51.6;
fix logic botch from previous - if we're asked to draw the cursor somewhere
else and it's still visible we need to clear it
 1.50  26-Jan-2021  macallan - refactor vcons_cursor_noread() a bit so it works the same way as the other
_noread() methods instead of duplicating half of vcons_cursor()
- skip clearing the cursor only if we use all _noread() methods
- clear RI_CURSOR in all copy*_noread() methods as well if we overwrite the
cursor
 1.49  25-Jan-2021  macallan clear the RI_CURSOR flag when we overwrite the cursor so we can skip clearing
it when asked to do it later on
saves a bunch of framebuffer writes
 1.48  21-Jan-2021  macallan introduce a putchar() based implementation of cursor() in order to avoid
framebuffer reads
quite a speedup on arm64 / genfb
 1.47  17-Jan-2021  jmcneill Revert previous and introduce vcons_earlyinit, which is like vcons_init
except it does not setup a vcons_intr thread.
 1.46  17-Jan-2021  jmcneill The change from config_interrupts to a kthread for VCONS_DRAW_INTR init
unfortunately makes it easier to trigger a race that results in characters
not being erased properly at boot. Work around the original issue a
different way by creating a fake device_t and defer initialization until
we are sure that config_interrupt threads are done. This is not ideal and
the race is still present but fixing this properly would require a rewrite
to make this code MP-safe.
 1.45  02-Jan-2021  macallan be more careful when optimizing stretches of blanks into erasecols()
now testpat's output is redrawn properly
 1.44  28-Dec-2020  macallan provide (bug)compatibility with vga in WSDISPLAYIO_{PUT|GET}WSCHAR
if row == 0 treat col as linear index into the text / attribute buffer,
transform into proper coordinates as needed for putchar()

with this wsmoused works as expected
 1.43  23-Dec-2020  macallan fix tpyo
spotted by RVP, thanks!
 1.42  21-Nov-2020  mlelstv Fix previous and tag the right callout...
 1.41  21-Nov-2020  mlelstv Run callout without kernel lock, the softint itself is still protected.
 1.40  31-Jul-2019  rin branches: 1.40.8;
When font is switched, not only putchar, but also other ri_ops can be
changed by backend driver, e.g., see rasops1.c:

https://nxr.netbsd.org/xref/src/sys/dev/rasops/rasops1.c#58
 1.39  01-Dec-2018  msaitoh branches: 1.39.4;
Don't abuse config_interrupts()'s first argument. Use kthread instead of
config_interrupt(). OK'd by jmcneill and macallan.
 1.38  02-Jun-2017  macallan branches: 1.38.8; 1.38.10;
- add a cookie to show_screen_cb()
- call show_screen_cb() when loading a font into a visible screen, so this can
be used to track parameters by drivers that use the glyph cache
 1.37  19-May-2017  macallan add support for loading fonts in vcons and subsequently resizing screens
- drivers can use this by setting VCONS_LOADFONT and WSSCREEN_RESIZE
- each vcons screen can now have its own font and geometry
- while there, add support for xterm's ESC[18t to report the text buffer's
size

With this tou can:
wsfontload -N foo /usr/share/wscons/fonts/flori.816
wsconsctl -dw font=foo
currently this is limited to drivers that don't use the glyph cache, like genfb
 1.36  26-Apr-2017  macallan properly optimize drawing stretches of blanks that are interrupted only by
a change in background colour or flags
 1.35  08-Nov-2015  christos branches: 1.35.8;
PR/50413: Vicente Chaves: Check the allocattr return and return an error.
 1.34  19-Jul-2015  mlelstv use optimized refresh with VCONS_DRAW_INTR even when in polling mode.
 1.33  10-Nov-2014  jmcneill branches: 1.33.2;
allocate char and attr buffers with M_ZERO
 1.32  18-Mar-2014  riastradh branches: 1.32.4;
Merge riastradh-drm2 to HEAD.
 1.31  21-Jan-2014  mlelstv fix build
 1.30  21-Jan-2014  mlelstv keep track of VCONS_DRAW_INTR screen cache also in erasecols/rows and
copycols/rows methods.
 1.29  15-Sep-2013  martin Remove unused variable
 1.28  28-May-2013  macallan branches: 1.28.2; 1.28.4;
in vcons_redraw_screen():
- if RI_FULLCLEAR is set and we use it to clear the screen, don't draw any
whitespaces with the default background colour
- draw stretches of whitespaces with the same background colour using erasecols
 1.27  04-Jan-2012  macallan branches: 1.27.6;
bump character buffers and cache to 32bit per character so flags we store
in the upper bits don't get lost
now autogenerated line drawing characters work with VCONS_DRAW_INTR and don't
get lost when switching screens
 1.26  25-May-2011  macallan branches: 1.26.4; 1.26.8;
remove VCONS_DRAW_ASYNC
it was always experimental, VCONS_DRAW_INTR is much simpler and Just Works.
 1.25  25-May-2011  macallan add a cache so when we update the screen we only redraw the character cells
that actually changed since last time. This gives a noticeable speedup on
slower hardware with dumb framebuffers.
For now this works with VCONS_DRAW_INTR and VCONS_DONT_READ only.
 1.24  18-Feb-2011  jmcneill add vcons_hard_switch, for switching w/o callouts (eg. entering ddb)
 1.23  09-Feb-2011  jmcneill add vcons_{enable,disable}_polling and genfb_{enable,disable}_polling
functions, to switch between intr and polling modes when VCONS_DRAW_INTR
is defined
 1.22  08-Feb-2011  jmcneill VCONS_DRAW_INTR changes:
- use softint instead of workqueue for drawing
- track scr_dirty with atomic_ops
 1.21  08-Feb-2011  jmcneill abuse config_interrupts to make sure we don't switch to 'intr' mode until
interrupts are enabled
 1.20  08-Feb-2011  jmcneill add support for command buffering in vcons. still a WIP, same limitations
as async drawing (no ddb, needs interrupts). you can try it with options
VCONS_DRAW_INTR. as with async, there are still occasional glitches.
 1.19  25-Jan-2011  macallan Add support for asynchronous drawing in vcons.
This is not finished but good enough for others to play with, enable with
options VCONS_DRAW_ASYNC
With this all drawing operations will be posted to a ring buffer instead
of being run directly, and run by a kernel thread. This avoids having to wait
for drawing operations to finish with the kernel lock held ( to a degree at
least ) and scrolling a (slow) framebuffer console should not disrupt other
operations anymore.
Problems:
- we need to switch back to synchronous operations when panicing or entering
ddb, also re-enable async drawing when leaving ddb
- there are still occasional glitches
tested on an SS20 with cg14 and cg6 for dumb and accelerated cases
 1.18  21-Sep-2010  macallan branches: 1.18.2; 1.18.4;
add separate flags for putchar() based copycols() and copyrows() methods
for hw that can accelerate one but not the other, like Sun's Creator series
VCONS_DONT_READ does the same as before
 1.17  18-Aug-2010  macallan Add copycols() and copyrows() methods which, instead of calling the underlying
driver methods, call the driver's putchar() method to redraw the affected
areas.
For unaccelerated framebuffers where reads are expensive and we can't spare
any memory for a shadow framebuffer. Enabled by setting VCONS_DONT_READ in
scr_flags
 1.16  28-Apr-2008  martin branches: 1.16.20; 1.16.22;
Remove clause 3 and 4 from TNF licenses
 1.15  17-Oct-2007  joerg branches: 1.15.16; 1.15.18; 1.15.20;
Use callout_setfunc/callout_schedule and don't cast function pointers.
 1.14  06-Aug-2007  macallan branches: 1.14.2; 1.14.4; 1.14.6; 1.14.8;
add scrollback support
 1.13  28-Jul-2007  rumble branches: 1.13.4;
Set the 'ri' pointer before use.
 1.12  28-Jul-2007  mjf Implement bounds checking in some places in display driver code to avoid
the possibility of a local user panic.
 1.11  09-Jul-2007  ad branches: 1.11.2;
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
 1.10  04-Mar-2007  christos branches: 1.10.2; 1.10.4;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.9  16-Nov-2006  christos branches: 1.9.2; 1.9.4; 1.9.8;
__unused removal on arguments; approved by core.
 1.8  12-Oct-2006  christos - sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386
 1.7  14-May-2006  elad branches: 1.7.6; 1.7.10; 1.7.12; 1.7.14;
integrate kauth.
 1.6  15-Apr-2006  jmmv branches: 1.6.2;
Remove the getwschar and putwschar accessops from wsdisplay drivers as
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@.
 1.5  19-Feb-2006  macallan branches: 1.5.2; 1.5.4; 1.5.6;
add a flag to completely disable drawing on a screen
 1.4  18-Feb-2006  jmcneill Bunch of changes to wscons in preparation for splash screen support:
* Add WSDISPLAY_TYPE_VESA for vesafb. While here, fix a typo in a comment.
* Add WSDISPLAYIO_SSPLASH and WSDISPLAYIO_SPROGRESS ioctls. The former
toggles the splash screen on and off, and the latter updates the progress
animation.
* Prevent more than one hw driver from claiming to be the console.
* In vcons, keep two pointers to the screen's vcons_data. This lets us
override the original (ie with null emulops during boot), and restore
them later on.
 1.3  14-Feb-2006  macallan branches: 1.3.2;
bzero() -> memset()
 1.2  14-Feb-2006  macallan do some extra initialization and zeroing, fixes odd problems on x86
 1.1  12-Feb-2006  macallan framework for generic virtual consoles
 1.3.2.3  01-Mar-2006  yamt sync with head.
 1.3.2.2  18-Feb-2006  yamt sync with head.
 1.3.2.1  14-Feb-2006  yamt file wsdisplay_vcons.c was added on branch yamt-uio_vmspace on 2006-02-18 15:39:12 +0000
 1.5.6.1  24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.5.4.1  19-Apr-2006  elad sync with head.
 1.5.2.1  24-May-2006  yamt sync with head.
 1.6.2.2  22-Apr-2006  simonb Sync with head.
 1.6.2.1  15-Apr-2006  simonb file wsdisplay_vcons.c was added on branch simonb-timecounters on 2006-04-22 11:39:44 +0000
 1.7.14.2  10-Dec-2006  yamt sync with head.
 1.7.14.1  22-Oct-2006  yamt sync with head
 1.7.12.2  09-Sep-2006  rpaulo sync with head
 1.7.12.1  14-May-2006  rpaulo file wsdisplay_vcons.c was added on branch rpaulo-netinet-merge-pcb on 2006-09-09 02:56:07 +0000
 1.7.10.1  18-Nov-2006  ad Sync with head.
 1.7.6.5  27-Oct-2007  yamt sync with head.
 1.7.6.4  03-Sep-2007  yamt sync with head.
 1.7.6.3  30-Dec-2006  yamt sync with head.
 1.7.6.2  21-Jun-2006  yamt sync with head.
 1.7.6.1  14-May-2006  yamt file wsdisplay_vcons.c was added on branch yamt-lazymbuf on 2006-06-21 15:08:12 +0000
 1.9.8.1  03-Sep-2007  wrstuden Sync w/ NetBSD-4-RC_1
 1.9.4.1  12-Mar-2007  rmind Sync with HEAD.
 1.9.2.1  30-Jul-2007  liamjfoy Pull up following revision(s) (requested by mjf in ticket #799):
sys/dev/ic/pcdisplay_subr.c: revision 1.33
sys/dev/wscons/wsdisplay_vcons.c: revision 1.12
sys/dev/wscons/wsdisplay_vcons.c: revision 1.13
sys/dev/ic/vga_raster.c: revision 1.29
sys/dev/pci/chipsfb.c: revision 1.10
sys/dev/ic/vga.c: revision 1.95
sys/dev/rasops/rasops.c: revision 1.56
sys/dev/isa/ega.c: revision 1.23
Implement bounds checking in some places in display driver code to avoid
the possibility of a local user panic.
Set the 'ri' pointer before use.
 1.10.4.1  11-Jul-2007  mjf Sync with head.
 1.10.2.3  23-Oct-2007  ad Sync with head.
 1.10.2.2  20-Aug-2007  ad Sync with HEAD.
 1.10.2.1  01-Jul-2007  ad Adapt to callout API change.
 1.11.2.1  15-Aug-2007  skrll Sync with HEAD.
 1.13.4.2  26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.13.4.1  09-Aug-2007  jmcneill Sync with HEAD.
 1.14.8.2  06-Aug-2007  macallan add scrollback support
 1.14.8.1  06-Aug-2007  macallan file wsdisplay_vcons.c was added on branch matt-mips64 on 2007-08-06 03:11:33 +0000
 1.14.6.1  25-Oct-2007  bouyer Sync with HEAD.
 1.14.4.1  18-Oct-2007  yamt sync with head.
 1.14.2.1  06-Nov-2007  matt sync with HEAD
 1.15.20.2  09-Oct-2010  yamt sync with head
 1.15.20.1  16-May-2008  yamt sync with head.
 1.15.18.1  18-May-2008  yamt sync with head.
 1.15.16.1  02-Jun-2008  mjf Sync with HEAD.
 1.16.22.2  31-May-2011  rmind sync with head
 1.16.22.1  05-Mar-2011  rmind sync with head
 1.16.20.1  22-Oct-2010  uebayasi Sync with HEAD (-D20101022).
 1.18.4.3  05-Mar-2011  bouyer Sync with HEAD
 1.18.4.2  17-Feb-2011  bouyer Sync with HEAD
 1.18.4.1  08-Feb-2011  bouyer Sync with HEAD
 1.18.2.1  06-Jun-2011  jruoho Sync with HEAD.
 1.26.8.1  18-Feb-2012  mrg merge to -current.
 1.26.4.2  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.26.4.1  17-Apr-2012  yamt sync with head
 1.27.6.3  03-Dec-2017  jdolecek update from HEAD
 1.27.6.2  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.27.6.1  23-Jun-2013  tls resync from head
 1.28.4.1  30-Jan-2014  riastradh Make wsdisplay_vcons likelier to be modularizable too.
 1.28.2.1  18-May-2014  rmind sync with head
 1.32.4.1  11-Nov-2014  martin Pull up following revision(s) (requested by jmcneill in ticket #212):
sys/dev/wscons/wsdisplay_vcons.c: revision 1.33
allocate char and attr buffers with M_ZERO
 1.33.2.3  28-Aug-2017  skrll Sync with HEAD
 1.33.2.2  27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.33.2.1  22-Sep-2015  skrll Sync with HEAD
 1.35.8.1  02-May-2017  pgoyette Sync with HEAD - tag prg-localcount2-base1
 1.38.10.2  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.38.10.1  10-Jun-2019  christos Sync with HEAD
 1.38.8.1  26-Dec-2018  pgoyette Sync with HEAD, resolve a few conflicts
 1.39.4.1  15-Aug-2019  martin Pull up following revision(s) (requested by rin in ticket #56):

sys/dev/rasops/rasops.c: revision 1.120
sys/dev/rasops/rasops.h: revision 1.40
sys/dev/rasops/rasops.c: revision 1.121
sys/dev/rasops/rasops.h: revision 1.41
sys/dev/rasops/rasops.c: revision 1.122
sys/dev/rasops/rasops.h: revision 1.42
sys/dev/rasops/rasops.h: revision 1.43
sys/dev/rasops/rasops.h: revision 1.44
sys/dev/rasops/rasops.h: revision 1.45
sys/dev/rasops/rasops.h: revision 1.46
sys/dev/rasops/rasops.h: revision 1.47
sys/dev/rasops/rasops.h: revision 1.48
sys/dev/rasops/rasops32.c: revision 1.40
sys/dev/rasops/rasops32.c: revision 1.41
sys/dev/rasops/rasops32.c: revision 1.42
sys/dev/rasops/rasops32.c: revision 1.43
sys/dev/rasops/rasops32.c: revision 1.44
sys/dev/rasops/rasops32.c: revision 1.45
sys/dev/rasops/rasops32.c: revision 1.46
sys/dev/rasops/rasops1-4_putchar.h: revision 1.1
sys/dev/rasops/rasops1-4_putchar.h: revision 1.2
sys/dev/rasops/rasops1-4_putchar.h: revision 1.3
sys/dev/rasops/rasops1_putchar_width.h: revision 1.3
sys/dev/rasops/rasops1_putchar_width.h: revision 1.4
sys/dev/rasops/rasops1_putchar_width.h: revision 1.5
sys/dev/rasops/rasops1_putchar_width.h: revision 1.6
sys/dev/rasops/README: revision 1.7
sys/dev/rasops/rasops_putchar_aa.h: revision 1.5
sys/dev/rasops/rasops_putchar_aa.h: revision 1.6
sys/dev/rasops/rasops8.c: revision 1.45
sys/dev/rasops/rasops8.c: revision 1.46
sys/dev/rasops/rasops8.c: revision 1.47
sys/dev/rasops/rasops24.c: revision 1.40
sys/dev/rasops/rasops8.c: revision 1.48
sys/dev/rasops/rasops24.c: revision 1.41
sys/dev/rasops/rasops8.c: revision 1.49
sys/dev/rasops/rasops24.c: revision 1.42
sys/dev/rasops/rasops24.c: revision 1.43
sys/dev/rasops/rasops24.c: revision 1.44
sys/dev/rasops/rasops_masks.c: revision 1.10
doc/CHANGES: revision 1.2566
sys/dev/rasops/rasops24.c: revision 1.45
doc/CHANGES: revision 1.2567
sys/dev/rasops/rasops24.c: revision 1.46
sys/dev/rasops/rasops24.c: revision 1.47
sys/dev/rasops/rasops24.c: revision 1.48
sys/dev/rasops/rasops24.c: revision 1.49
sys/dev/rasops/rasops_bitops.h: revision 1.19
sys/dev/rasops/rasops_putchar_aa.h: file removal
sys/dev/wscons/wsdisplay_vcons.c: revision 1.40
sys/dev/rasops/rasops8.c: revision 1.50
sys/dev/rasops/rasops8.c: revision 1.51
sys/dev/rasops/rasops24.c: revision 1.50
sys/arch/luna68k/dev/omrasops.c: revision 1.21
sys/dev/rasops/rasops_bitops.h: revision 1.20
sys/dev/wsfb/genfb.c: revision 1.68
sys/dev/rasops/rasops_bitops.h: revision 1.21
sys/dev/wsfb/genfb.c: revision 1.69
sys/dev/rasops/rasops_putchar_width.h: revision 1.10
sys/dev/rasops/rasops_bitops.h: revision 1.22
sys/dev/rasops/rasops_putchar_width.h: revision 1.11
sys/dev/rasops/rasops_bitops.h: revision 1.23
sys/dev/rasops/rasops_putchar_width.h: revision 1.12
sys/dev/rasops/rasops_bitops.h: revision 1.24
sys/dev/rasops/rasops_putchar_width.h: revision 1.13
sys/dev/rasops/rasops_bitops.h: revision 1.25
sys/dev/rasops/rasops_putchar_width.h: revision 1.14
sys/dev/rasops/rasops_putchar_width.h: revision 1.15
sys/dev/rasops/rasops1.c: revision 1.32
sys/dev/rasops/rasops1.c: revision 1.33
sys/dev/rasops/rasops1.c: revision 1.34
sys/dev/rasops/rasops1.c: revision 1.35
sys/dev/rasops/rasops1.c: revision 1.36
sys/dev/rasops/rasops1.c: revision 1.37
sys/dev/rasops/rasops4.c: revision 1.21
sys/dev/rasops/rasops4.c: revision 1.22
sys/dev/rasops/rasops4.c: revision 1.23
sys/dev/rasops/rasops4.c: revision 1.24
sys/dev/rasops/rasops4.c: revision 1.25
sys/dev/rasops/rasops4.c: revision 1.26
sys/dev/rasops/rasops4.c: revision 1.27
sys/dev/rasops/rasops4.c: revision 1.28
sys/dev/wsfb/genfb.c: revision 1.70
sys/dev/rasops/rasops2.c: revision 1.27
sys/dev/rasops/rasops2.c: revision 1.28
share/man/man9/rasops.9: revision 1.18
sys/dev/rasops/rasops.c: revision 1.102
sys/dev/rasops/rasops2.c: revision 1.29
share/man/man9/rasops.9: revision 1.19
sys/dev/rasops/rasops.c: revision 1.103
sys/dev/rasops/rasops.c: revision 1.104
sys/dev/rasops/rasops.c: revision 1.105
sys/dev/rasops/rasops.c: revision 1.106
sys/dev/rasops/rasops.c: revision 1.107
sys/dev/rasops/rasops_putchar.h: revision 1.6
sys/dev/rasops/rasops.c: revision 1.108
sys/dev/rasops/rasops_putchar.h: revision 1.7
sys/dev/rasops/rasops.c: revision 1.109
sys/dev/rasops/rasops_putchar.h: revision 1.8
sys/dev/rasops/rasops2.c: revision 1.30
sys/dev/rasops/rasops2.c: revision 1.31
sys/dev/rasops/rasops15.c: revision 1.32
sys/dev/rasops/rasops2.c: revision 1.32
sys/dev/rasops/rasops15.c: revision 1.33
sys/dev/rasops/rasops2.c: revision 1.33
sys/dev/rasops/rasops15.c: revision 1.34
sys/dev/rasops/rasops15.c: revision 1.35
sys/dev/rasops/rasops15.c: revision 1.36
sys/dev/rasops/rasops.c: revision 1.110
sys/dev/rasops/rasops15.c: revision 1.37
sys/dev/rasops/rasops.c: revision 1.111
sys/dev/rasops/rasops15.c: revision 1.38
sys/dev/rasops/rasops.c: revision 1.112
sys/dev/rasops/rasops15.c: revision 1.39
sys/dev/rasops/rasops.c: revision 1.113
sys/dev/rasops/rasops.c: revision 1.114
sys/dev/rasops/rasops.c: revision 1.115
sys/dev/rasops/rasops_masks.h: revision 1.9
sys/dev/rasops/rasops.c: revision 1.116
sys/dev/rasops/rasops.c: revision 1.117
sys/dev/rasops/rasops.c: revision 1.118
sys/dev/rasops/rasops.c: revision 1.119
sys/dev/rasops/rasops.h: revision 1.39

Misc clean-up's:
- protect private stuff in rasops.h by _RASOPS_PRIVATE
- staticify rasops_copycols() and rasops_isgray[]
- G/C unused extern int cold
Switch to per-device stamp, and retire stamp_mutex.

Provide buffer capable of single-row pixels in order to make things simpler.

Factor out copy-paste. No functional changes.
When font is switched, not only putchar, but also other ri_ops can be
changed by backend driver, e.g., see rasops1.c:
https://nxr.netbsd.org/xref/src/sys/dev/rasops/rasops1.c#58
4 is 1 << 2, not 1 << 3...

Fix erasecols and do_cursor for font width >= 32 bits.
Also, some cosmetic clean-up's.

Oops, for rasops_copycols(), we cannot use memmove even if src == dst.
On the other hand, memmove is safe for rasops_copyrows().
Fix unaligned writes to buffer, that are introduced in 1.105:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/rasops/rasops.c#rev1.105

Support font width 32 on monochrome screen.

Remove duplicate substitution. Style. No functional changes.

Correct copy count. This affects ``left-to-right'' copy for region
including word boundary.

Fix a bug in shadow fb support for copycols on 1, 2, and 4bpp screen,
which was introduced in 1.18:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/rasops/rasops_bitops.h#rev1.18

Add general putchar functions for 2 and 4bpp.
Note that 1bpp continues to use its local version in rasops1.c,
which is much faster and simpler.

Cosmetic changes. No functional changes.

Reflect reality.

Notify size of shadow framebuffer if enabled.

Fix unaligned word write's to buffer, introduced in rev 1.42:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/rasops/rasops24.c#rev1.42

Real fix for 24-bpp color:
- When centering screen, locate effective base address of framebuffer to
both word and 24-bit color boundary.
- Consistently convert ri_devcmap to ``big endian'' if not RI_BSWAP.

Also, fix possible bug for 15/16-bpp with RI_BSWAP (not tested).

Protect rasops_copy{rows,cols}() by _RASOPS_PRIVATE.

Use _KERNEL_OPT.

Simplify calculation for 12-byte alignment.
No functional changes.

Fix black color-attribution for depths 2 and 4.

Depth 2 is monochrome.
IMO, it is impossible to support ANSI colors on 2-bpp display; fore-
and background can be same value even if they are different colors
logically.

Fix a critical bug for rasops_copyrows() introduced in rev. 1.90:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/rasops/rasops.c#rev1.90
When src < dst, we have to copy backward.

Simplify rasops_do_cursor():
- Use static masks similar to that used in rasops_bitops.h,
rather than generating them on the fly.
- Use pointer for proper type to avoid unnecessary casts.

Use "hp" instead of "hrp" consistently with other files.
No functional changes.

Stop allocating ri_buf and ri_stamp dynamically. As commented in
rasops.h, it is not safe to use kmem_alloc(9) in rasops_init();
rasops routines can be used for early putchar, which means that
UVM is not fully initialized.

Should fix a problem reported by macallan:
http://mail-index.netbsd.org/tech-kern/2019/08/02/msg025327.html

Instead of using ri_buf, inline function rasops_memcpy32() is
introduced to fill 32bit data efficiently.

Instead of using ri_stamp (per device stamp), stamp_ri is
introduced to distinguish for which device stamp is calculated.

Oops, revert an unintentional change for now.

If RI_CLEAR is set, do not forget to clear real framebuffer.

Modify struct rasops_info again (ride 9.99.4 bump).
- remove ri_buf and friends.
- remove ri_stamp and frieds.
- introduce ri_ul, which will be used for scaling underline with font.

Also add hack for ri_ul; adjust its size to obsoleted member, ri_delta,
which was only used rasops routines internally. Now, size and offsets of
all members of struct rasops_info become same with netbsd-9, -8, and -7,
again. So we can safelly pull up fixes to any release branches!

Scaling dimensions of underline by font height.

Currently,
- offset of underline is fixed to 1-row from bottom of characters, and
- height of underline is fixed to 1.
Both are good for standard 8x16 fonts. However, it is too thin for
larger fonts, especially when used on display of high resolution.
Also, 1-row offset of underline is ugly for small fonts, e.g.,
spleen5x8.
Therefore, adjust offset and height as,
- no changes for standard 16-height fonts.
- scaling by font height for larger fonts.
- set offset to zero for fonts of height smaller than 16.

Merge rasops_putchar_aa.h into rasops_putchar.h.

Support scaling underline dimensions by font height.

Separate general putchar for 1-4bpp from rasops_bitops:
- Support anti-aliasing for 2bpp, which works perfectly!
- Support scaling underline dimensions with font height.

We support anti-aliasing for depth 2.
Use switch appropriately.
- Stop showing struct rasops_info; readers can read the header itself.
- Correct description for optimized font widths.
- Remove strange blank line.

Try to improve formatting and naration.

Make rasops_erase{rows,cols}() public again; hp300/diofb uses them.
Pointed out by martin.

When legacy Apple 4-bpp color palette is used, make green dark so that
kernel messages are printed nicely on white background.

Fix color range overflow; we cannot make bright colors more brighter.

Correctly check whether character is in font in rasops_mapchar().
Also, make sure that in putchar functions for completeness.

Fix bug introduced in rev. 1.69:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/wsfb/genfb.c#rev1.69
is_bgr should be initialized to false. Otherwise, color becomes strange
for depths 24 and 32 unless backend explicitly set "is_bgr" property.

Set 4-bpp devcmap in a similar manner to non-RGB case of 8-bpp.
No functional changes since this is not in use (4-bpp is monochrome).

Misc style clean up's.
- Introduce and use proper macros.
- Use not ambiguous variable names.
- Unify similar functions as possible as I can.
- G/C unused headers.
- Use #include <dev/rasops/foo.h> instead of "foo.h"

No particular functional changes intended.

My work for rasops(9) was finished (hopefully).

I will send pull-up request for netbsd-9, if there are no new failures
reported within few days.

Fix format in order not to confuse changes2html script.
Minor improvements of wording for my entry.

When using stamp, drop attributions other than back and foreground
colors so that stamp is not updated unnecessarily.
 1.40.8.3  03-Apr-2021  thorpej Sync with HEAD.
 1.40.8.2  03-Jan-2021  thorpej Sync w/ HEAD.
 1.40.8.1  14-Dec-2020  thorpej Sync w/ HEAD.
 1.51.6.1  31-May-2021  cjep sync with head
 1.51.4.1  17-Jun-2021  thorpej Sync w/ HEAD.
 1.64.4.1  05-Jul-2023  martin Pull up following revision(s) (requested by abs in ticket #224):

sys/dev/wscons/wsdisplay_vconsvar.h: revision 1.34
sys/dev/wscons/wsdisplay_glyphcachevar.h: revision 1.6
sys/arch/sparc/dev/cgfourteen.c: revision 1.94
sys/arch/sparc/dev/cgfourteen.c: revision 1.95
sys/dev/sbus/mgx.c: revision 1.21
sys/dev/sbus/mgx.c: revision 1.22
sys/dev/sbus/mgx.c: revision 1.23
sys/dev/wscons/wsdisplay_vcons.c: revision 1.65
sys/dev/wscons/wsdisplay_vcons.c: revision 1.66
sys/dev/wscons/wsdisplay_glyphcache.c: revision 1.12
sys/arch/sparc/dev/sxvar.h: revision 1.5
sys/arch/sparc/dev/sx.c: revision 1.6
sys/arch/sparc/dev/sx.c: revision 1.7

make vcons_putchar_buffer() return a flag indicating if anything actually
changed, skip the actual drawing op if nothing did

add flags for drivers to requesr R2L bit/byte-ordered fonts, default to
L2R, chack them in vcons_load_font() instead of just trusting that we'd get
what we need

initialize the diagnostic register with the value suggested by the SunOS
header. This sets a bunch of undocumented bits and yields a 10% speed increase
when rendering antialiased text.

use macros compatible with xf86-video-suncg14 to issue SX instructions
much more readable, alignment weirdness is handled automatically and code is
interchangable

allow drivers to specify horizontal alignment of glyph cache cells
for things like SX which have alignment restrictions

add counter to periodically drain the instruction queue in order to avoid
stalling the MBus during long SX operations

adapted from xf86-video-suncg14
- use sx_wait() to avoid stalling the MBus
- request 32bit alignment for glyphcache cells

wait for the engine to go idle before issuing rectfill commands
we get occasional overlap with blit commands if we just wait for fifo slots
needs further investigation, it is possible that not all writes to drawing
engine registers are pipelined and of course we don't have docs

following a hunch...
- cache DEC and FG registers, only write them if the value actually changes
- wait for the engine to go idle before writing DEC
- wait for FIFO slots on everything else
with this we avoid waiting if possible and still avoid overlapping blit and
fill commands
 1.68.2.1  02-Aug-2025  perseant Sync with HEAD

RSS XML Feed