summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLu Yao <yaolu@kylinos.cn>2026-04-30 14:01:37 +0800
committerHelge Deller <deller@gmx.de>2026-06-09 16:00:10 +0200
commit70d9d5f5fcd940f627bd403aaa6f65de724eef6b (patch)
treeb0153119eb7bc5fb19a3086b60ad772b46820f41 /drivers
parent92a91dc8bd6aa31a0a59144de6bee6221cd20833 (diff)
downloadlwn-70d9d5f5fcd940f627bd403aaa6f65de724eef6b.tar.gz
lwn-70d9d5f5fcd940f627bd403aaa6f65de724eef6b.zip
fbcon: don't suspend/resume when vc is graphics mode
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. With some modifications by Helge Deller. Signed-off-by: Lu Yao <yaolu@kylinos.cn> Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/fbdev/core/fbcon.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
index 641687a734d5..86d014a27397 100644
--- a/drivers/video/fbdev/core/fbcon.c
+++ b/drivers/video/fbdev/core/fbcon.c
@@ -2601,8 +2601,9 @@ void fbcon_suspended(struct fb_info *info)
return;
vc = vc_cons[par->currcon].d;
- /* Clear cursor, restore saved data */
- fbcon_cursor(vc, false);
+ /* Clear cursor, restore saved data when in text mode */
+ if ((vc->vc_mode == KD_TEXT) && con_is_visible(vc))
+ fbcon_cursor(vc, false);
}
void fbcon_resumed(struct fb_info *info)
@@ -2614,7 +2615,9 @@ void fbcon_resumed(struct fb_info *info)
return;
vc = vc_cons[par->currcon].d;
- update_screen(vc);
+ /* Update screen when in text mode only */
+ if ((vc->vc_mode == KD_TEXT) && con_is_visible(vc))
+ update_screen(vc);
}
static void fbcon_modechanged(struct fb_info *info)