Re: [PATCH v2 05/10] lib/fonts: Implement glyph rotation
From: Helge Deller
Date: Tue Apr 07 2026 - 11:59:11 EST
Hi Thomas,
On 4/7/26 11:23, Thomas Zimmermann wrote:
Move the glyph rotation helpers from fbcon to the font library. Wrap them
behind clean interfaces. Also clear the output memory to zero. Previously,
the implementation relied on the caller to do that.
Go through the fbcon code and callers of the glyph-rotation helpers. In
addition to the font rotation, there's also the cursor code, which uses
the rotation helpers.
The font-rotation relied on a single memset to zero for the whole font.
This is now multiple memsets on each glyph. This will be sorted out when
the font library also implements font rotation.
Building glyph rotation in the font library still depends on
CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y. If we get more users of the code,
we can still add a dedicated Kconfig symbol to the font library.
No changes have been made to the actual implementation of the rotate_*()
and pattern_*() functions. These will be refactored as separate changes.
v2:
- fix typos
Signed-off-by: Thomas Zimmermann <tzimmermann@xxxxxxx>
---
drivers/video/fbdev/core/fbcon_ccw.c | 4 +-
drivers/video/fbdev/core/fbcon_cw.c | 4 +-
drivers/video/fbdev/core/fbcon_rotate.c | 12 +-
drivers/video/fbdev/core/fbcon_rotate.h | 71 -----------
include/linux/font.h | 8 ++
lib/fonts/Makefile | 1 +
lib/fonts/font_rotate.c | 150 ++++++++++++++++++++++++
Patch is Ok.
But since you move/add the file lib/fonts/font_rotate.c,
it should be reflected in MAINTAINERS file.
Do you mind sending a follow-up patch which adds /lib/fonts/* to the
FRAMEBUFFER LAYER and FRAMEBUFFER CORE entries in the MAINTAINERS file?
Other than that, I've now added this series to the fbdev git tree.
Thanks!
Helge