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

Configure Feed

Select the types of activity you want to include in your feed.

fbcon: Remove fb_debug_enter/_leave from struct fb_ops

There are no implementations of fb_debug_enter and fb_debug_leave.
Remove the callbacks from struct fb_ops and clean up the caller.

The field save_graphics in fbcon_par is also no longer required.
Remove it as well.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Simona Vetter <simona.vetter@ffwll.ch>
Acked-by: Daniel Thompson (RISCstar) <danielt@kernel.org>
Link: https://patch.msgid.link/20251125130634.1080966-6-tzimmermann@suse.de

-57
-28
Documentation/process/debugging/kgdb.rst
··· 889 889 debugger calls kgdboc_post_exp_handler() which in turn calls 890 890 con_debug_leave(). 891 891 892 - Any video driver that wants to be compatible with the kernel debugger 893 - and the atomic kms callbacks must implement the ``mode_set_base_atomic``, 894 - ``fb_debug_enter`` and ``fb_debug_leave operations``. For the 895 - ``fb_debug_enter`` and ``fb_debug_leave`` the option exists to use the 896 - generic drm fb helper functions or implement something custom for the 897 - hardware. The following example shows the initialization of the 898 - .mode_set_base_atomic operation in 899 - drivers/gpu/drm/i915/intel_display.c:: 900 - 901 - 902 - static const struct drm_crtc_helper_funcs intel_helper_funcs = { 903 - [...] 904 - .mode_set_base_atomic = intel_pipe_set_base_atomic, 905 - [...] 906 - }; 907 - 908 - 909 - Here is an example of how the i915 driver initializes the 910 - fb_debug_enter and fb_debug_leave functions to use the generic drm 911 - helpers in ``drivers/gpu/drm/i915/intel_fb.c``:: 912 - 913 - 914 - static struct fb_ops intelfb_ops = { 915 - [...] 916 - .fb_debug_enter = drm_fb_helper_debug_enter, 917 - .fb_debug_leave = drm_fb_helper_debug_leave, 918 - [...] 919 - }; 920 892 921 893 922 894 Credits
-24
drivers/video/fbdev/core/fbcon.c
··· 2287 2287 return false; 2288 2288 } 2289 2289 2290 - static void fbcon_debug_enter(struct vc_data *vc) 2291 - { 2292 - struct fb_info *info = fbcon_info_from_console(vc->vc_num); 2293 - struct fbcon_par *par = info->fbcon_par; 2294 - 2295 - par->save_graphics = par->graphics; 2296 - par->graphics = 0; 2297 - if (info->fbops->fb_debug_enter) 2298 - info->fbops->fb_debug_enter(info); 2299 - fbcon_set_palette(vc, color_table); 2300 - } 2301 - 2302 - static void fbcon_debug_leave(struct vc_data *vc) 2303 - { 2304 - struct fb_info *info = fbcon_info_from_console(vc->vc_num); 2305 - struct fbcon_par *par = info->fbcon_par; 2306 - 2307 - par->graphics = par->save_graphics; 2308 - if (info->fbops->fb_debug_leave) 2309 - info->fbops->fb_debug_leave(info); 2310 - } 2311 - 2312 2290 static int fbcon_get_font(struct vc_data *vc, struct console_font *font, unsigned int vpitch) 2313 2291 { 2314 2292 u8 *fontdata = vc->vc_font.data; ··· 3164 3186 .con_set_palette = fbcon_set_palette, 3165 3187 .con_invert_region = fbcon_invert_region, 3166 3188 .con_resize = fbcon_resize, 3167 - .con_debug_enter = fbcon_debug_enter, 3168 - .con_debug_leave = fbcon_debug_leave, 3169 3189 }; 3170 3190 3171 3191 static ssize_t rotate_store(struct device *device,
-1
drivers/video/fbdev/core/fbcon.h
··· 79 79 int cursor_reset; 80 80 int blank_state; 81 81 int graphics; 82 - int save_graphics; /* for debug enter/leave */ 83 82 bool initialized; 84 83 int rotate; 85 84 int cur_rotate;
-4
include/linux/fb.h
··· 304 304 305 305 /* teardown any resources to do with this framebuffer */ 306 306 void (*fb_destroy)(struct fb_info *info); 307 - 308 - /* called at KDB enter and leave time to prepare the console */ 309 - int (*fb_debug_enter)(struct fb_info *info); 310 - int (*fb_debug_leave)(struct fb_info *info); 311 307 }; 312 308 313 309 #ifdef CONFIG_FB_TILEBLITTING