Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fbcon: Set rotate_font callback with related callbacks

The field struct fbcon_par.rotate_font points to fbcon_rotate_font() if
the console is rotated. Set the callback in the same place as the other
callbacks. Prepares for declaring all fbcon callbacks in a dedicated
struct type.

If not rotated, fbcon_set_bitops() still clears the callback to NULL.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://lore.kernel.org/r/20250909124616.143365-4-tzimmermann@suse.de

+7 -3
+1
drivers/video/fbdev/core/fbcon_ccw.c
··· 398 398 par->clear_margins = ccw_clear_margins; 399 399 par->cursor = ccw_cursor; 400 400 par->update_start = ccw_update_start; 401 + par->rotate_font = fbcon_rotate_font; 401 402 }
+1
drivers/video/fbdev/core/fbcon_cw.c
··· 381 381 par->clear_margins = cw_clear_margins; 382 382 par->cursor = cw_cursor; 383 383 par->update_start = cw_update_start; 384 + par->rotate_font = fbcon_rotate_font; 384 385 }
+1 -3
drivers/video/fbdev/core/fbcon_rotate.c
··· 18 18 #include "fbcon.h" 19 19 #include "fbcon_rotate.h" 20 20 21 - static int fbcon_rotate_font(struct fb_info *info, struct vc_data *vc) 21 + int fbcon_rotate_font(struct fb_info *info, struct vc_data *vc) 22 22 { 23 23 struct fbcon_par *par = info->fbcon_par; 24 24 int len, err = 0; ··· 95 95 96 96 void fbcon_set_rotate(struct fbcon_par *par) 97 97 { 98 - par->rotate_font = fbcon_rotate_font; 99 - 100 98 switch (par->rotate) { 101 99 case FB_ROTATE_CW: 102 100 fbcon_rotate_cw(par);
+3
drivers/video/fbdev/core/fbcon_rotate.h
··· 90 90 } 91 91 } 92 92 93 + int fbcon_rotate_font(struct fb_info *info, struct vc_data *vc); 94 + 93 95 extern void fbcon_rotate_cw(struct fbcon_par *par); 94 96 extern void fbcon_rotate_ud(struct fbcon_par *par); 95 97 extern void fbcon_rotate_ccw(struct fbcon_par *par); 98 + 96 99 #endif
+1
drivers/video/fbdev/core/fbcon_ud.c
··· 425 425 par->clear_margins = ud_clear_margins; 426 426 par->cursor = ud_cursor; 427 427 par->update_start = ud_update_start; 428 + par->rotate_font = fbcon_rotate_font; 428 429 }