Re: [PATCH v4 1/2] fbcon: Silence fbcon logo on 'quiet' boots

From
Petr Mladek <pmladek@suse.com>
Date
2019-01-15 15:09:42
Also in
dri-devel
Reply to
Sergey Senozhatsky, 2019-01-11
On Fri 2019-01-11 15:04:32, Sergey Senozhatsky wrote:
On (01/10/19 14:03), Prarit Bhargava wrote:
quoted
+++ b/drivers/video/fbdev/core/fbcon.c
@@ -649,11 +649,14 @@ static void fbcon_prepare_logo(struct vc_data *vc, struct fb_info *info,
 		kfree(save);
 	}
 
+	if (logo_shown = FBCON_LOGO_DONTSHOW)
+		return;
+	if (console_loglevel <= CONSOLE_LOGLEVEL_QUIET)
+		return;

Would this two-liner do the trick?
But then the other functions, like fbcon_scroll() or fbcon_switch(),
would think that the logo was shown because logo_shown !FBCON_LOGO_DONTSHOW.

It might be possible to do logo_shown = FBCON_LOGO_DONTSHOW.
But I am not sure if it is safe, see below.
	-ss
quoted
+
 	if (logo_lines > vc->vc_bottom) {
 		logo_shown = FBCON_LOGO_CANSHOW;
 		printk(KERN_INFO
 		       "fbcon_init: disable boot-logo (boot-logo bigger than screen).\n");
-	} else if (logo_shown != FBCON_LOGO_DONTSHOW) {
+	} else {
 		logo_shown = FBCON_LOGO_DRAW;
 		vc->vc_top = logo_lines;
 	}
@@ -1059,9 +1062,11 @@ static void fbcon_init(struct vc_data *vc, int init)
 
 	cap = info->flags;
 
-	if (vc != svc || logo_shown = FBCON_LOGO_DONTSHOW ||
-	    (info->fix.type = FB_TYPE_TEXT))
+	if (vc != svc || console_loglevel <= CONSOLE_LOGLEVEL_QUIET ||
+	    (info->fix.type = FB_TYPE_TEXT)) {
 		logo = 0;
+		logo_shown = FBCON_LOGO_DONTSHOW;
This has still the problem mentioned in the v3 feedback. It modifies
the global variable logo_shown even when vc != svc. You still need
check and explain why it is safe. It is not clear to me.

Best Regards,
Petr
quoted
+	}
 
 	if (var_to_display(p, &info->var, info))
 		return;
-- 
2.17.2
Thread (15 messages) 15 messages, 6 authors, last reply 2019-01-15
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help