mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-14 18:24:59 -05:00
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
This commit is contained in:
@@ -398,4 +398,5 @@ void fbcon_rotate_ccw(struct fbcon_par *par)
|
||||
par->clear_margins = ccw_clear_margins;
|
||||
par->cursor = ccw_cursor;
|
||||
par->update_start = ccw_update_start;
|
||||
par->rotate_font = fbcon_rotate_font;
|
||||
}
|
||||
|
||||
@@ -381,4 +381,5 @@ void fbcon_rotate_cw(struct fbcon_par *par)
|
||||
par->clear_margins = cw_clear_margins;
|
||||
par->cursor = cw_cursor;
|
||||
par->update_start = cw_update_start;
|
||||
par->rotate_font = fbcon_rotate_font;
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include "fbcon.h"
|
||||
#include "fbcon_rotate.h"
|
||||
|
||||
static int fbcon_rotate_font(struct fb_info *info, struct vc_data *vc)
|
||||
int fbcon_rotate_font(struct fb_info *info, struct vc_data *vc)
|
||||
{
|
||||
struct fbcon_par *par = info->fbcon_par;
|
||||
int len, err = 0;
|
||||
@@ -95,8 +95,6 @@ static int fbcon_rotate_font(struct fb_info *info, struct vc_data *vc)
|
||||
|
||||
void fbcon_set_rotate(struct fbcon_par *par)
|
||||
{
|
||||
par->rotate_font = fbcon_rotate_font;
|
||||
|
||||
switch (par->rotate) {
|
||||
case FB_ROTATE_CW:
|
||||
fbcon_rotate_cw(par);
|
||||
|
||||
@@ -90,7 +90,10 @@ static inline void rotate_ccw(const char *in, char *out, u32 width, u32 height)
|
||||
}
|
||||
}
|
||||
|
||||
int fbcon_rotate_font(struct fb_info *info, struct vc_data *vc);
|
||||
|
||||
extern void fbcon_rotate_cw(struct fbcon_par *par);
|
||||
extern void fbcon_rotate_ud(struct fbcon_par *par);
|
||||
extern void fbcon_rotate_ccw(struct fbcon_par *par);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -425,4 +425,5 @@ void fbcon_rotate_ud(struct fbcon_par *par)
|
||||
par->clear_margins = ud_clear_margins;
|
||||
par->cursor = ud_cursor;
|
||||
par->update_start = ud_update_start;
|
||||
par->rotate_font = fbcon_rotate_font;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user