dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: deller@gmx.de, gregkh@linuxfoundation.org, jirislaby@kernel.org,
	simona@ffwll.ch
Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linux-serial@vger.kernel.org, sashiko-reviews@lists.linux.dev,
	Thomas Zimmermann <tzimmermann@suse.de>
Subject: [PATCH v3 0/5] fbcon,vgacon,vt: Share helpers for text cursors
Date: Mon, 28 Sep 2026 10:55:23 +0200	[thread overview]
Message-ID: <20260928085724.41660-1-tzimmermann@suse.de> (raw)

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 implements 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.

v3:
- mention user interfaces to control cursor size in commit message (GregKH)
- elaborate defaults (GregKH)
- move retry logic into helper
- handle CUR_DEF
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                  | 104 +++++++++++++++++++++++++++
 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, 199 insertions(+), 77 deletions(-)
 create mode 100644 lib/fonts/font_cursor.c


base-commit: ff831af91674990f9f1814340860e96943d5df1a
prerequisite-patch-id: c67e5d886a47b7d0266d81100837557fda34cb24
prerequisite-patch-id: a5a973e527c88a5b47053d7a72aefe0b550197cb
prerequisite-patch-id: b9adc9622920a3e70168e672c2c92795b3e3a106
prerequisite-patch-id: 5030de433a01c2e99056cadb676a8e2ba35f055a
-- 
2.55.0


             reply	other threads:[~2026-09-28  8:57 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-28  8:55 Thomas Zimmermann [this message]
2026-09-28  8:55 ` [PATCH v3 1/5] vt: Add cursor-size helpers Thomas Zimmermann
2026-09-28  9:07   ` Jani Nikula
2026-09-28 11:45     ` Thomas Zimmermann
2026-09-28  9:09   ` sashiko-bot
2026-09-28 11:14     ` Thomas Zimmermann
2026-09-28 11:41       ` Greg KH
2026-10-01  8:59   ` Greg KH
2026-09-28  8:55 ` [PATCH v3 2/5] vgacon: Remove trailing whitespaces Thomas Zimmermann
2026-09-28  8:59   ` sashiko-bot
2026-09-28  8:55 ` [PATCH v3 3/5] vgacon: Use vt_cursor_{start,end}() Thomas Zimmermann
2026-09-28  9:09   ` sashiko-bot
2026-09-28  8:55 ` [PATCH v3 4/5] lib/fonts: Add font_glyph_cursor() helper Thomas Zimmermann
2026-09-28  9:16   ` sashiko-bot
2026-09-28  8:55 ` [PATCH v3 5/5] fbcon: Replace fbcon_fill_cursor_mask() with fbcon_cursor_glyph() Thomas Zimmermann
2026-09-28  9:21   ` sashiko-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260928085724.41660-1-tzimmermann@suse.de \
    --to=tzimmermann@suse.de \
    --cc=deller@gmx.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=simona@ffwll.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox