Skip to content

fbcon: Clean up glyph handling on redraws

Thomas Zimmermann dri-devel linux-fbdev sashiko-reviews 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest6 patches 1 replyIn review
  2. v26 patches 2 repliesSuperseded
  3. v16 patches 1 replySuperseded

Changes in v3 from the cover letter

- replace remaining instances of kfree() with font_data_put()
- upcast vc_font.data to font_data_t for glyph lookup
- fix fallback in ccw_cursor()

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6fbcon: Use unsigned char for glyph datadrivers/video/fbdev/core/bitblit.c drivers/video/fbdev/core/fbcon.h drivers/video/fbdev/core/fbcon_ccw.c +2 more+55 -461 reply
2/6lib/fonts: Provide internal helpers for allocating font_data_tlib/fonts/font.h lib/fonts/fonts.c+52 -230 replies
3/6lib/fonts, fbcon: Use font_data_t for rotated fontsdrivers/video/fbdev/core/fbcon.c drivers/video/fbdev/core/fbcon.h drivers/video/fbdev/core/fbcon_rotate.c +2 more+36 -420 replies
4/6fbcon: Refactor size calculation for cursor buffersdrivers/video/fbdev/core/bitblit.c drivers/video/fbdev/core/fbcon_ccw.c drivers/video/fbdev/core/fbcon_cw.c +1 more+24 -150 replies
5/6fbcon: Look up glyphs using the font interfacedrivers/video/fbdev/core/bitblit.c drivers/video/fbdev/core/fbcon_ccw.c drivers/video/fbdev/core/fbcon_cw.c +1 more+45 -300 replies
6/6fbcon: Handle characters with no glyph defined in a consistent waydrivers/video/fbdev/core/bitblit.c drivers/video/fbdev/core/fbcon_ccw.c drivers/video/fbdev/core/fbcon_cw.c +1 more+56 -140 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 0/6] fbcon: Clean up glyph handling on redraws

Fbcon's drawing functions open-code much of the glyph handling. Use font helpers instead. Makes fbcon more consistent and easier to understand.

Patch 1 updates fbcon to use unsigned char for glyph buffers. This is consistent with the font code and font_data_t.

Patches 2 and 3 update font rotation to return rotated glyphs as font_data_t. A rotated font can now use the same interfaces as the unrotated source font. Fbcon uses this to ref count the rotated font's buffer.

Patches 4 to 6 update various parts of fbcon to use font helpers instead of open-coding access to font_data_t. Having the rotated font as font_data_t makes this convenient.

Tested with fbcon on DRM's bochs driver (qemu).

v3:
- replace remaining instances of kfree() with font_data_put()
- upcast vc_font.data to font_data_t for glyph lookup
- fix fallback in ccw_cursor()
v2:
- resolve merge conflicts in fbcon
- fix typos in commit descriptions

Thomas Zimmermann (6):
fbcon: Use unsigned char for glyph data
lib/fonts: Provide internal helpers for allocating font_data_t lib/fonts, fbcon: Use font_data_t for rotated fonts
fbcon: Refactor size calculation for cursor buffers
fbcon: Look up glyphs using the font interface
fbcon: Handle characters with no glyph defined in a consistent way

 drivers/video/fbdev/core/bitblit.c      | 83 +++++++++++++++----------
 drivers/video/fbdev/core/fbcon.c        | 12 ++--
 drivers/video/fbdev/core/fbcon.h        |  5 +-
 drivers/video/fbdev/core/fbcon_ccw.c    | 56 +++++++++++------
 drivers/video/fbdev/core/fbcon_cw.c     | 57 ++++++++++-------
 drivers/video/fbdev/core/fbcon_rotate.c | 19 +++---
 drivers/video/fbdev/core/fbcon_ud.c     | 77 +++++++++++++++--------
 include/linux/font.h                    |  5 +-
 lib/fonts/font.h                        | 12 ++++
 lib/fonts/font_rotate.c                 | 39 +++++-------
 lib/fonts/fonts.c                       | 63 ++++++++++++-------
 11 files changed, 263 insertions(+), 165 deletions(-)

base-commit: 579369fbe7227f6b00acc883ac90606a5266932a
prerequisite-patch-id: c67e5d886a47b7d0266d81100837557fda34cb24
prerequisite-patch-id: a5a973e527c88a5b47053d7a72aefe0b550197cb
prerequisite-patch-id: b9adc9622920a3e70168e672c2c92795b3e3a106
prerequisite-patch-id: 5030de433a01c2e99056cadb676a8e2ba35f055a

Signature · 1 line
2.56.1