summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev/core
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2025-09-09 14:44:43 +0200
committerThomas Zimmermann <tzimmermann@suse.de>2025-09-19 10:04:04 +0200
commit9cfd09402eb45f1b14b60668fd7c628445efdd8d (patch)
treea34cd6ef3a135e8437bdf5c7dda3c0e370f8de92 /drivers/video/fbdev/core
parenta6adbbc4c32a016146e117b1e9e5242724a75e10 (diff)
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
Diffstat (limited to 'drivers/video/fbdev/core')
-rw-r--r--drivers/video/fbdev/core/fbcon_ccw.c1
-rw-r--r--drivers/video/fbdev/core/fbcon_cw.c1
-rw-r--r--drivers/video/fbdev/core/fbcon_rotate.c4
-rw-r--r--drivers/video/fbdev/core/fbcon_rotate.h3
-rw-r--r--drivers/video/fbdev/core/fbcon_ud.c1
5 files changed, 7 insertions, 3 deletions
diff --git a/drivers/video/fbdev/core/fbcon_ccw.c b/drivers/video/fbdev/core/fbcon_ccw.c
index 2ba8ec4c3e2b..ba744b67a4fd 100644
--- a/drivers/video/fbdev/core/fbcon_ccw.c
+++ b/drivers/video/fbdev/core/fbcon_ccw.c
@@ -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;
}
diff --git a/drivers/video/fbdev/core/fbcon_cw.c b/drivers/video/fbdev/core/fbcon_cw.c
index 4bd22d5ee5f4..974bd9d9b770 100644
--- a/drivers/video/fbdev/core/fbcon_cw.c
+++ b/drivers/video/fbdev/core/fbcon_cw.c
@@ -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;
}
diff --git a/drivers/video/fbdev/core/fbcon_rotate.c b/drivers/video/fbdev/core/fbcon_rotate.c
index 380b2746451a..0c7cac71a9c2 100644
--- a/drivers/video/fbdev/core/fbcon_rotate.c
+++ b/drivers/video/fbdev/core/fbcon_rotate.c
@@ -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 @@ finished:
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);
diff --git a/drivers/video/fbdev/core/fbcon_rotate.h b/drivers/video/fbdev/core/fbcon_rotate.h
index 48305e1a0763..784f3231a958 100644
--- a/drivers/video/fbdev/core/fbcon_rotate.h
+++ b/drivers/video/fbdev/core/fbcon_rotate.h
@@ -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
diff --git a/drivers/video/fbdev/core/fbcon_ud.c b/drivers/video/fbdev/core/fbcon_ud.c
index 14b40e2bf323..1a214a4d538f 100644
--- a/drivers/video/fbdev/core/fbcon_ud.c
+++ b/drivers/video/fbdev/core/fbcon_ud.c
@@ -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;
}