[SeaBIOS] [PATCH 0/2] Software cursor for cbvga

Kevin O'Connor kevin at koconnor.net
Sat Oct 18 20:56:23 CEST 2014


These two patches implement a software based cursor for the "coreboot
native vga" seavgabios implementation.  It implements the cursor by
inverting the pixels in the framebuffer at the character cell that
contains the cursor.

This is a bit of a failed experiment - I do not intend to commit it to
the main git repo as is.  The feature works, but it seems to slow down
screen writing significantly.  I'm posting this here in case anyone is
interested in playing with it.

I've also put this up at:
  https://github.com/KevinOConnor/seabios/tree/testing-cbvga

I suspect the reason for the slow down is that the majority of
character writes to the screen end up moving the cursor, and on each
cursor move it's required to remove the inverse in the old position
and then add the inverse in the new position.  The inverse is
implemented as an xor which requires a cell read followed by a cell
write.  Thus, a typical character write used to require writing one
cell's worth of data to the framebuffer, but with this patch takes 5
times more IO (a read/write, a write, a read/write).

If I get time I may play with other approaches.  (One I was thinking
of is hooking the BIOS timer irq and only enabling the cursor from
that irq - which should dramatically reduce the amount of cursor
updates when lots of characters are being rendered in bulk.)

-Kevin


Kevin O'Connor (2):
  vgabios: Add stubs for software cursor enable/disable
  vgabios: Add software cursor capability

 vgasrc/Kconfig   |  5 +++++
 vgasrc/vgabios.c | 40 ++++++++++++++++++++++++++++++++++------
 vgasrc/vgabios.h |  2 ++
 vgasrc/vgafb.c   | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 90 insertions(+), 6 deletions(-)

-- 
1.9.3




More information about the SeaBIOS mailing list