Linux Serial subsystem development
 help / color / mirror / Atom feed
* [PATCH v2 0/5] fbcon,vgacon,vt: Share helpers for text cursors
@ 2026-09-15 12:29 Thomas Zimmermann
  2026-09-15 12:29 ` [PATCH v2 1/5] vt: Add cursor-size helpers Thomas Zimmermann
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Thomas Zimmermann @ 2026-09-15 12:29 UTC (permalink / raw)
  To: deller, gregkh, jirislaby, simona
  Cc: linux-fbdev, dri-devel, linux-serial, sashiko-reviews,
	Thomas Zimmermann

VT consoles fbcon and vgacon implement various cursor sizes (i.e.,
underline, block, half-block, etc). Share related code and harmonize
the look and behaviour.

In patches 1 to 3, move VT cursor-size calculations to the VT subsystem
and use the new helpers from vgacon. Replace similar code in the console.
The new helpers also take VT's default cursor size into account.

Fbcon implments a custom helper that creates a cursor glyph for the
given cursor size. In patches 4 and 5, move the code into the font
library and update fbcon to use the new helper. The cursor-glyph shape
rendering is tied to the font in use. Hence move them next to each other.
Also update fbcon to use the shared cursor-size helpers.

Tested with fbcon under bochs (qemu) and with vgacon on an old SiS
6202 VGA card. Other consoles (newport_con, sticon) don't support cursor
sizes, so leave them as-is.

v2:
- restore vc_cell_height in vgacon
- avoid interference from concurrent user space
- fix docs

Thomas Zimmermann (5):
  vt: Add cursor-size helpers
  vgacon: Remove trailing whitespaces
  vgacon: Use vt_cursor_{start,end}()
  lib/fonts: Add font_glyph_cursor() helper
  fbcon: Replace fbcon_fill_cursor_mask() with fbcon_cursor_glyph()

 drivers/tty/vt/vt.c                  | 93 ++++++++++++++++++++++++++++
 drivers/video/console/vgacon.c       | 43 +++----------
 drivers/video/fbdev/core/bitblit.c   |  3 +-
 drivers/video/fbdev/core/fbcon.c     | 45 ++++----------
 drivers/video/fbdev/core/fbcon.h     |  2 +-
 drivers/video/fbdev/core/fbcon_ccw.c |  3 +-
 drivers/video/fbdev/core/fbcon_cw.c  |  3 +-
 drivers/video/fbdev/core/fbcon_ud.c  |  3 +-
 include/linux/console_struct.h       |  7 +++
 include/linux/font.h                 |  4 ++
 lib/fonts/Makefile                   |  3 +-
 lib/fonts/font_cursor.c              | 56 +++++++++++++++++
 12 files changed, 188 insertions(+), 77 deletions(-)
 create mode 100644 lib/fonts/font_cursor.c


base-commit: 2535e80aa0dd3d4269a43bf86a1686baddcf08d6
-- 
2.55.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2026-09-23 13:30 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-15 12:29 [PATCH v2 0/5] fbcon,vgacon,vt: Share helpers for text cursors Thomas Zimmermann
2026-09-15 12:29 ` [PATCH v2 1/5] vt: Add cursor-size helpers Thomas Zimmermann
2026-09-15 12:40   ` sashiko-bot
2026-09-23 12:57   ` Greg KH
2026-09-23 13:30     ` Thomas Zimmermann
2026-09-15 12:29 ` [PATCH v2 2/5] vgacon: Remove trailing whitespaces Thomas Zimmermann
2026-09-15 12:35   ` sashiko-bot
2026-09-15 12:29 ` [PATCH v2 3/5] vgacon: Use vt_cursor_{start,end}() Thomas Zimmermann
2026-09-15 12:39   ` sashiko-bot
2026-09-15 12:29 ` [PATCH v2 4/5] lib/fonts: Add font_glyph_cursor() helper Thomas Zimmermann
2026-09-15 12:40   ` sashiko-bot
2026-09-15 12:29 ` [PATCH v2 5/5] fbcon: Replace fbcon_fill_cursor_mask() with fbcon_cursor_glyph() Thomas Zimmermann
2026-09-15 12:41   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox