diff options
| author | Thomas Zimmermann <tzimmermann@suse.de> | 2026-04-28 10:28:43 +0200 |
|---|---|---|
| committer | Helge Deller <deller@gmx.de> | 2026-04-28 14:18:51 +0200 |
| commit | d237f719b2726c0e6d62bfa1543f53b624471929 (patch) | |
| tree | 2e6376649a9dd134414eb5dcbb5420eefd398ccc /include/linux/stackprotector.h | |
| parent | 0b996ae54d876b41c52dd7cfc512eb008a47d781 (diff) | |
lib/fonts: Fix bit position when rotating by 180 degrees
Fix the horizontal bit position when rotating a glyph by 180°. The
original code in rotate_ud() rounded the value in width up to a
multiple of 8, aka the bit pitch, and calculated the rotated pixel
from that value. The new code stores the glyph's pitch in bit_pitch,
but fails to update the rotated pixel's output accordingly. Simply
replacing the variable does this.
The bug can be reproduced by setting a font with an unaligned width,
such as sun12x22, like this:
setfont sun12x22
echo 2 > /sys/class/graphics/fbcon/rotate
Without the fix, the font looks distorted.
Fixes: a30e9e6b018f ("lib/fonts: Refactor glyph-rotation helpers")
Closes: https://lore.gitlab.freedesktop.org/drm-ai-reviews/review-patch7-20260407092555.58816-8-tzimmermann@suse.de/
Cc: dri-devel@lists.freedesktop.org
Cc: linux-fbdev@vger.kernel.org
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'include/linux/stackprotector.h')
0 files changed, 0 insertions, 0 deletions
