]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
fbcon: Remove fb_debug_enter/_leave from struct fb_ops
authorThomas Zimmermann <tzimmermann@suse.de>
Tue, 25 Nov 2025 12:52:17 +0000 (13:52 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Tue, 2 Dec 2025 08:20:44 +0000 (09:20 +0100)
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
Documentation/process/debugging/kgdb.rst
drivers/video/fbdev/core/fbcon.c
drivers/video/fbdev/core/fbcon.h
include/linux/fb.h

index b29b0aac2717d159c3ebf2ebf31c1c765d6afa46..773b19aa13828f9c2a492f4f5c629ff47e2416ba 100644 (file)
@@ -889,34 +889,6 @@ in the virtual console layer. On resuming kernel execution, the kernel
 debugger calls kgdboc_post_exp_handler() which in turn calls
 con_debug_leave().
 
-Any video driver that wants to be compatible with the kernel debugger
-and the atomic kms callbacks must implement the ``mode_set_base_atomic``,
-``fb_debug_enter`` and ``fb_debug_leave operations``. For the
-``fb_debug_enter`` and ``fb_debug_leave`` the option exists to use the
-generic drm fb helper functions or implement something custom for the
-hardware. The following example shows the initialization of the
-.mode_set_base_atomic operation in
-drivers/gpu/drm/i915/intel_display.c::
-
-
-    static const struct drm_crtc_helper_funcs intel_helper_funcs = {
-    [...]
-            .mode_set_base_atomic = intel_pipe_set_base_atomic,
-    [...]
-    };
-
-
-Here is an example of how the i915 driver initializes the
-fb_debug_enter and fb_debug_leave functions to use the generic drm
-helpers in ``drivers/gpu/drm/i915/intel_fb.c``::
-
-
-    static struct fb_ops intelfb_ops = {
-    [...]
-           .fb_debug_enter = drm_fb_helper_debug_enter,
-           .fb_debug_leave = drm_fb_helper_debug_leave,
-    [...]
-    };
 
 
 Credits
index 7f35ad66b462ecaacb0aee12ca5fb882c86695d9..e2e69aab668063aee26d456c81b26f3a45fbd3a6 100644 (file)
@@ -2287,28 +2287,6 @@ static bool fbcon_blank(struct vc_data *vc, enum vesa_blank_mode blank,
        return false;
 }
 
-static void fbcon_debug_enter(struct vc_data *vc)
-{
-       struct fb_info *info = fbcon_info_from_console(vc->vc_num);
-       struct fbcon_par *par = info->fbcon_par;
-
-       par->save_graphics = par->graphics;
-       par->graphics = 0;
-       if (info->fbops->fb_debug_enter)
-               info->fbops->fb_debug_enter(info);
-       fbcon_set_palette(vc, color_table);
-}
-
-static void fbcon_debug_leave(struct vc_data *vc)
-{
-       struct fb_info *info = fbcon_info_from_console(vc->vc_num);
-       struct fbcon_par *par = info->fbcon_par;
-
-       par->graphics = par->save_graphics;
-       if (info->fbops->fb_debug_leave)
-               info->fbops->fb_debug_leave(info);
-}
-
 static int fbcon_get_font(struct vc_data *vc, struct console_font *font, unsigned int vpitch)
 {
        u8 *fontdata = vc->vc_font.data;
@@ -3186,8 +3164,6 @@ static const struct consw fb_con = {
        .con_set_palette        = fbcon_set_palette,
        .con_invert_region      = fbcon_invert_region,
        .con_resize             = fbcon_resize,
-       .con_debug_enter        = fbcon_debug_enter,
-       .con_debug_leave        = fbcon_debug_leave,
 };
 
 static ssize_t rotate_store(struct device *device,
index 44ea4ae4bba0d17034fce3ff52e567144fddf9cf..1cd10a7faab0f3e8241539ea6aa9dbcb25bab34b 100644 (file)
@@ -79,7 +79,6 @@ struct fbcon_par {
        int    cursor_reset;
        int    blank_state;
        int    graphics;
-       int    save_graphics; /* for debug enter/leave */
        bool   initialized;
        int    rotate;
        int    cur_rotate;
index 05cc251035da9837c87c3c6ae7de602b5718338e..65fb703826758a460451471ebddd2e51cc6001fd 100644 (file)
@@ -304,10 +304,6 @@ struct fb_ops {
 
        /* teardown any resources to do with this framebuffer */
        void (*fb_destroy)(struct fb_info *info);
-
-       /* called at KDB enter and leave time to prepare the console */
-       int (*fb_debug_enter)(struct fb_info *info);
-       int (*fb_debug_leave)(struct fb_info *info);
 };
 
 #ifdef CONFIG_FB_TILEBLITTING