Re: [PATCH 1/4] fbdev: Wrap user-invoked calls to fb_set_var() in helper
From: Thomas Zimmermann <tzimmermann@suse.de>
Date: 2026-05-22 12:15:02
Also in:
dri-devel, linuxppc-dev
Hi Am 20.05.26 um 20:51 schrieb Helge Deller:
On 5/20/26 18:00, Thomas Zimmermann wrote:quoted
Handle fbcon during display updates in fb_set_var_from_user(). Check with fbcon if the mode change is possible, update hardware state and finally update fbcon. Update all callers. Only the FBIOPUT_VSCREENINFO ioctl currently does all steps. Other mode-changes callers in sysfs and driver code are missing fbcon-related steps. With the new helper, ps3fb and sh_mobile_lcdcfb no longer maintain fbcon state themselves. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> --- drivers/video/fbdev/core/fb_chrdev.c | 6 +----- drivers/video/fbdev/core/fbcon.c | 2 -- drivers/video/fbdev/core/fbmem.c | 13 +++++++++++++ drivers/video/fbdev/core/fbsysfs.c | 4 +--- drivers/video/fbdev/ps3fb.c | 5 +---- drivers/video/fbdev/sh_mobile_lcdcfb.c | 5 +---- include/linux/fb.h | 2 ++ 7 files changed, 19 insertions(+), 18 deletions(-) ...diff --git a/include/linux/fb.h b/include/linux/fb.h index 5178a33c752c..88680a7cabd5 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h@@ -533,6 +533,8 @@ extern int fb_set_var(struct fb_info *info,struct fb_var_screeninfo *var); extern int fb_pan_display(struct fb_info *info, struct fb_var_screeninfo *var); extern int fb_blank(struct fb_info *info, int blank); +int fb_set_var_from_user(struct fb_info *info, struct fb_var_screeninfo *var); +"extern" int fb_set_var_from_user(...) ?
As Christophe ointed out, not having extern is correct. I think, if anything, we should remove the existing externs from the headers.
Other than that the series is a nice cleanup!
Thanks. I'll send you an updated series with the #ifdef fix for patch 3. Sending just fixup patches can confuse the tracker bots and services (say patchwork), so I'd avoid that. Best regards Thomas
Thanks! Helge
-- -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)