From nobody Tue Dec 2 00:26:29 2025 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C47D4324709 for ; Tue, 25 Nov 2025 13:06:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764076018; cv=none; b=kwt5SKwfQvvyLg17TyqwWSVVVgI67rmTZ7DAOjs1ll8zsYTgwSE446WtG6pC0oCVIrD9T1Fhc3LJs9a9MDEGpukG0OSz87VKrv/6wiHH4Jx4m3SuR/CEQ7tIIpbbov/L5ATFZj2OY/u+voo4qzJFcYlsf44Jl/eFiKtLlBh7tS8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764076018; c=relaxed/simple; bh=4zSfbctcQ5ur6VKoGH92xMgDFjVBhISdb6kx0iH9rKI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=e0KLNOykkrZdqE2k9+F5rNtjcrcHzxqb+BM7aXV85psaWDaazPHY7CblDT9oEqGR/xtM1OFpWtn+/6Rz3VRwTvndgbIPOTNoijuBFNU2Rs7gdNtOjZpbLdSexxgrzPnXS9zU/lOi9VDlzr+T2QXEXXSNPzc+5wwP5JILllMuPtY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=qNzN4Noz; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=B9H8Zq0m; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=qNzN4Noz; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=B9H8Zq0m; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="qNzN4Noz"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="B9H8Zq0m"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="qNzN4Noz"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="B9H8Zq0m" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id BBBEB5BD82; Tue, 25 Nov 2025 13:06:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1764076003; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZgLD8DsaagC7UeXGC8JVSdO0+73pCjrNj616EWect5k=; b=qNzN4NozQ48J/X/RGWafXBsH3FZCXYhtd9Wcqzt1u5FWKN52GDI1EoR3pxSuCW094TeXtY g99guH1xVpriDikcpR+TBOe2s9JXIhLAh6le/NpF8dRx2LYrogZ7eNNkZOWaxKUw/vguOY mNXcfN7S7In/Ucj5mu8A1xUMiwN6aNM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1764076003; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZgLD8DsaagC7UeXGC8JVSdO0+73pCjrNj616EWect5k=; b=B9H8Zq0miuo0RFANZ6NN+/eePEWVWH7dy+haPXL3Aaic+KZMpzf9JXje/yjo52BuoMWXs/ S2jFzif/dstS69DA== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=qNzN4Noz; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=B9H8Zq0m DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1764076003; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZgLD8DsaagC7UeXGC8JVSdO0+73pCjrNj616EWect5k=; b=qNzN4NozQ48J/X/RGWafXBsH3FZCXYhtd9Wcqzt1u5FWKN52GDI1EoR3pxSuCW094TeXtY g99guH1xVpriDikcpR+TBOe2s9JXIhLAh6le/NpF8dRx2LYrogZ7eNNkZOWaxKUw/vguOY mNXcfN7S7In/Ucj5mu8A1xUMiwN6aNM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1764076003; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZgLD8DsaagC7UeXGC8JVSdO0+73pCjrNj616EWect5k=; b=B9H8Zq0miuo0RFANZ6NN+/eePEWVWH7dy+haPXL3Aaic+KZMpzf9JXje/yjo52BuoMWXs/ S2jFzif/dstS69DA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 3044F3EA65; Tue, 25 Nov 2025 13:06:43 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id MOiWCuOpJWkDFAAAD6G6ig (envelope-from ); Tue, 25 Nov 2025 13:06:43 +0000 From: Thomas Zimmermann To: simona@ffwll.ch, airlied@gmail.com, alexander.deucher@amd.com, christian.koenig@amd.com, lyude@redhat.com, dakr@kernel.org, deller@gmx.de, mripard@kernel.org, maarten.lankhorst@linux.intel.com, jason.wessel@windriver.com, danielt@kernel.org, dianders@chromium.org Cc: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, nouveau@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 5/5] fbcon: Remove fb_debug_enter/_leave from struct fb_ops Date: Tue, 25 Nov 2025 13:52:17 +0100 Message-ID: <20251125130634.1080966-6-tzimmermann@suse.de> X-Mailer: git-send-email 2.51.1 In-Reply-To: <20251125130634.1080966-1-tzimmermann@suse.de> References: <20251125130634.1080966-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: BBBEB5BD82 X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_TRACE(0.00)[0:+]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCPT_COUNT_TWELVE(0.00)[19]; FREEMAIL_TO(0.00)[ffwll.ch,gmail.com,amd.com,redhat.com,kernel.org,gmx.de,linux.intel.com,windriver.com,chromium.org]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; FUZZY_RATELIMITED(0.00)[rspamd.com]; ARC_NA(0.00)[]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; DNSWL_BLOCKED(0.00)[2a07:de40:b281:104:10:150:64:97:from]; R_RATELIMIT(0.00)[to_ip_from(RLgosu6qu4h11rje89ht7rjgg5)]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de] X-Rspamd-Action: no action X-Spam-Flag: NO X-Spam-Score: -3.01 X-Spam-Level: Content-Type: text/plain; charset="utf-8" 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 --- Documentation/process/debugging/kgdb.rst | 28 ------------------------ drivers/video/fbdev/core/fbcon.c | 24 -------------------- drivers/video/fbdev/core/fbcon.h | 1 - include/linux/fb.h | 4 ---- 4 files changed, 57 deletions(-) diff --git a/Documentation/process/debugging/kgdb.rst b/Documentation/proce= ss/debugging/kgdb.rst index b29b0aac2717..773b19aa1382 100644 --- a/Documentation/process/debugging/kgdb.rst +++ b/Documentation/process/debugging/kgdb.rst @@ -889,34 +889,6 @@ in the virtual console layer. On resuming kernel execu= tion, the kernel debugger calls kgdboc_post_exp_handler() which in turn calls con_debug_leave(). =20 -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 =3D { - [...] - .mode_set_base_atomic =3D 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 =3D { - [...] - .fb_debug_enter =3D drm_fb_helper_debug_enter, - .fb_debug_leave =3D drm_fb_helper_debug_leave, - [...] - }; =20 =20 Credits diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fb= con.c index 7be9e865325d..34ea14412ace 100644 --- a/drivers/video/fbdev/core/fbcon.c +++ b/drivers/video/fbdev/core/fbcon.c @@ -2289,28 +2289,6 @@ static bool fbcon_blank(struct vc_data *vc, enum ves= a_blank_mode blank, return false; } =20 -static void fbcon_debug_enter(struct vc_data *vc) -{ - struct fb_info *info =3D fbcon_info_from_console(vc->vc_num); - struct fbcon_par *par =3D info->fbcon_par; - - par->save_graphics =3D par->graphics; - par->graphics =3D 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 =3D fbcon_info_from_console(vc->vc_num); - struct fbcon_par *par =3D info->fbcon_par; - - par->graphics =3D 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, u= nsigned int vpitch) { u8 *fontdata =3D vc->vc_font.data; @@ -3214,8 +3192,6 @@ static const struct consw fb_con =3D { .con_set_palette =3D fbcon_set_palette, .con_invert_region =3D fbcon_invert_region, .con_resize =3D fbcon_resize, - .con_debug_enter =3D fbcon_debug_enter, - .con_debug_leave =3D fbcon_debug_leave, }; =20 static ssize_t rotate_store(struct device *device, diff --git a/drivers/video/fbdev/core/fbcon.h b/drivers/video/fbdev/core/fb= con.h index 44ea4ae4bba0..1cd10a7faab0 100644 --- a/drivers/video/fbdev/core/fbcon.h +++ b/drivers/video/fbdev/core/fbcon.h @@ -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; diff --git a/include/linux/fb.h b/include/linux/fb.h index 05cc251035da..65fb70382675 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -304,10 +304,6 @@ struct fb_ops { =20 /* 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); }; =20 #ifdef CONFIG_FB_TILEBLITTING --=20 2.51.1