* [PATCH] drm/fbdev-client: Don't restore while fbcon isn't bound
@ 2026-11-25 12:38 ` Kylie C via B4 Relay
0 siblings, 0 replies; 3+ messages in thread
From: Kylie C @ 2026-11-25 12:38 UTC (permalink / raw)
To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter
Cc: dri-devel, linux-kernel, Kylie C
With deferred console takeover, fbcon hasn't bound to
that framebuffer yet, so there is no console to bring back. Restoring
it only replaces what the last DRM client left on screen, with an empty
framebuffer breaking flicker-free boot.
Only restore on lastclose once fbcon has bound to the framebuffer.
Signed-off-by: Kylie C <kyliepc@proton.me>
---
drivers/gpu/drm/clients/drm_fbdev_client.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/clients/drm_fbdev_client.c b/drivers/gpu/drm/clients/drm_fbdev_client.c
index eec463d19943..7981d613e652 100644
--- a/drivers/gpu/drm/clients/drm_fbdev_client.c
+++ b/drivers/gpu/drm/clients/drm_fbdev_client.c
@@ -50,6 +50,9 @@ static int drm_fbdev_client_restore(struct drm_client_dev *client, bool force)
if (!fb_helper->info || !fb_helper->fb)
return 0;
+ if (!force && !fb_helper->info->fbcon_par)
+ return 0;
+
drm_fb_helper_restore_fbdev_mode_unlocked(fb_helper, force);
return 0;
---
base-commit: a2853fd7f6217573dfb780809663683d5b9c5835
change-id: 20261125-fbdev-no-early-restore-d714545eeb96
Best regards,
--
Kylie C <kyliepc@proton.me>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] drm/fbdev-client: Don't restore while fbcon isn't bound
@ 2026-11-25 12:38 ` Kylie C via B4 Relay
0 siblings, 0 replies; 3+ messages in thread
From: Kylie C via B4 Relay @ 2026-11-25 12:38 UTC (permalink / raw)
To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter
Cc: dri-devel, linux-kernel, Kylie C
From: Kylie C <kyliepc@proton.me>
With deferred console takeover, fbcon hasn't bound to
that framebuffer yet, so there is no console to bring back. Restoring
it only replaces what the last DRM client left on screen, with an empty
framebuffer breaking flicker-free boot.
Only restore on lastclose once fbcon has bound to the framebuffer.
Signed-off-by: Kylie C <kyliepc@proton.me>
---
drivers/gpu/drm/clients/drm_fbdev_client.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/clients/drm_fbdev_client.c b/drivers/gpu/drm/clients/drm_fbdev_client.c
index eec463d19943..7981d613e652 100644
--- a/drivers/gpu/drm/clients/drm_fbdev_client.c
+++ b/drivers/gpu/drm/clients/drm_fbdev_client.c
@@ -50,6 +50,9 @@ static int drm_fbdev_client_restore(struct drm_client_dev *client, bool force)
if (!fb_helper->info || !fb_helper->fb)
return 0;
+ if (!force && !fb_helper->info->fbcon_par)
+ return 0;
+
drm_fb_helper_restore_fbdev_mode_unlocked(fb_helper, force);
return 0;
---
base-commit: a2853fd7f6217573dfb780809663683d5b9c5835
change-id: 20261125-fbdev-no-early-restore-d714545eeb96
Best regards,
--
Kylie C <kyliepc@proton.me>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/fbdev-client: Don't restore while fbcon isn't bound
2026-11-25 12:38 ` Kylie C via B4 Relay
(?)
@ 2026-11-25 12:54 ` sashiko-bot
-1 siblings, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-11-25 12:54 UTC (permalink / raw)
To: Kylie C; +Cc: dri-devel
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] drm/fbdev-client: drm_fbdev_client_restore() breaks non-fbcon
fbdev restore
--
commit 54a83d65f9ba427c2f43d8c3969eff6a330480ba
Author: Kylie C <kyliepc@proton.me>
drm/fbdev-client: Don't restore while fbcon isn't bound
This commit skips non-forced fbdev mode restoration in
drm_fbdev_client_restore() when fb_helper->info->fbcon_par is NULL so
that deferred console takeover does not restore an unbound fbcon
framebuffer on lastclose.
> diff --git a/drivers/gpu/drm/clients/drm_fbdev_client.c b/drivers/gpu/drm/clients/drm_fbdev_client.c
> index eec463d199433..7981d613e652e 100644
> --- a/drivers/gpu/drm/clients/drm_fbdev_client.c
> +++ b/drivers/gpu/drm/clients/drm_fbdev_client.c
> @@ -50,6 +50,9 @@ static int drm_fbdev_client_restore(struct drm_client_dev *client, bool force)
> if (!fb_helper->info || !fb_helper->fb)
> return 0;
>
> + if (!force && !fb_helper->info->fbcon_par)
> + return 0;
> +
> drm_fb_helper_restore_fbdev_mode_unlocked(fb_helper, force);
>
> return 0;
[Severity: Medium]
Does checking fb_helper->info->fbcon_par break fbdev restoration when
userspace drives /dev/fb* without fbcon?
DRM_FBDEV_EMULATION does not depend on CONFIG_FRAMEBUFFER_CONSOLE, and
userspace can also unbind fbcon at runtime to use /dev/fb0 directly.
Because info->fbcon_par is only set in fbcon_open(), it remains NULL in
those setups, so drm_lastclose() -> drm_client_dev_restore(dev, false)
will permanently skip drm_fb_helper_restore_fbdev_mode_unlocked() and
any pending delayed_hotplug handling when the last DRM client exits.
In addition, struct fb_info documents fbcon_par as an fbcon-only private
field ("/* fbcon use-only private area */" in include/linux/fb.h).
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261125-fbdev-no-early-restore-v1-1-f81dc7acf3ad@proton.me?part=1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-25 12:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-25 12:38 [PATCH] drm/fbdev-client: Don't restore while fbcon isn't bound Kylie C
2026-11-25 12:38 ` Kylie C via B4 Relay
2026-11-25 12:54 ` sashiko-bot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.