Thread (4 messages) 4 messages, 2 authors, 8d ago

Re: [PATCH] fbcon: don't suspend/resume when vc is graphics mode

From: <hidden>
Date: 2026-05-20 02:55:54
Also in: dri-devel, lkml

On 2026/5/19 16:10, Helge Deller wrote:
Hello Helge,
Hello Lu,

On 4/30/26 08:01, yaolu@kylinos.cn wrote:
quoted
From: Lu Yao <redacted>

Don't need to do suspend/resume for fbcon in graphic mode. 
Do you still have the possibility to test this issue?
Yes, I  still can test this issue.Do you have any other items to test?
 
quoted
Signed-off-by: Lu Yao <redacted>
---
  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);
It seems more reasonable. I'll submit a new patch soon.
Helge 
Lu Yao
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help