From: Helge Deller <deller@gmx.de>
To: yaolu@kylinos.cn, tzimmermann@suse.de, simona@ffwll.ch
Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fbcon: don't suspend/resume when vc is graphics mode
Date: Tue, 19 May 2026 10:10:23 +0200 [thread overview]
Message-ID: <67a1f756-996c-404b-8eff-f705ff151ed3@gmx.de> (raw)
In-Reply-To: <20260430060137.131107-1-yaolu@kylinos.cn>
Hello Lu,
On 4/30/26 08:01, yaolu@kylinos.cn wrote:
> From: Lu Yao <yaolu@kylinos.cn>
>
> Don't need to do suspend/resume for fbcon in graphic mode.
>
> Doing this may cause error, eg:
> At the beginning, starting the Xorg with single screen and then an
> external screen was plugged in. After logging out in Xorg, fbdev
> info may using screen which is connected later on for info always
> using first connected connector in list in func 'drm_setup_crtcs_fb'.
> Then, S3 executed, fbcon found that the information did not match
> and do atomic to switch fb. However, Xorg will not re-bind the crtc
> fb but continues doing ioctl. At this time, the fb is incorrect.
Do you still have the possibility to test this issue?
> Signed-off-by: Lu Yao <yaolu@kylinos.cn>
> ---
> drivers/video/fbdev/core/fbcon.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
> index b0e3e765360d..450e690d0bd2 100644
> --- a/drivers/video/fbdev/core/fbcon.c
> +++ b/drivers/video/fbdev/core/fbcon.c
> @@ -2602,8 +2602,9 @@ void fbcon_suspended(struct fb_info *info)
> return;
> vc = vc_cons[par->currcon].d;
>
> - /* Clear cursor, restore saved data */
> - fbcon_cursor(vc, false);
> + /* Don't need to clear cursor and restore saved data in graphic mode */
> + if (vc->vc_mode != KD_GRAPHICS)
> + fbcon_cursor(vc, false);
I think checking for "== KD_TEXT" is probably better.
And, maybe using con_is_visible(vc).
So:
+ if (con_is_visible(vc) && (vc->vc_mode == KD_TEXT))
+ fbcon_cursor(vc, false);
> void fbcon_resumed(struct fb_info *info)
> @@ -2615,7 +2616,9 @@ void fbcon_resumed(struct fb_info *info)
> return;
> vc = vc_cons[par->currcon].d;
>
> - update_screen(vc);
> + /* Graphics mode is managed by userspace */
> + if (vc->vc_mode != KD_GRAPHICS)
here the same check as above... ?
Helge
next prev parent reply other threads:[~2026-05-19 8:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-30 6:01 [PATCH] fbcon: don't suspend/resume when vc is graphics mode yaolu
2026-05-05 0:55 ` Claude review: " Claude Code Review Bot
2026-05-05 0:55 ` Claude Code Review Bot
2026-05-19 8:10 ` Helge Deller [this message]
2026-05-20 2:55 ` [PATCH] " yaolu
2026-06-01 7:54 ` [PATCH v2] fbcon: do suspend/resume only when vc is text mode and visible yaolu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=67a1f756-996c-404b-8eff-f705ff151ed3@gmx.de \
--to=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
--cc=yaolu@kylinos.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox