From patchwork Tue Apr 2 18:09:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Schwab X-Patchwork-Id: 10882143 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D5C83922 for ; Tue, 2 Apr 2019 18:09:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BF2B928462 for ; Tue, 2 Apr 2019 18:09:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B2FCE28475; Tue, 2 Apr 2019 18:09:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5394728462 for ; Tue, 2 Apr 2019 18:09:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 35CC36E48C; Tue, 2 Apr 2019 18:09:36 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5B3B96E48C for ; Tue, 2 Apr 2019 18:09:34 +0000 (UTC) Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 44Ycfx2DP8z1rZ0m; Tue, 2 Apr 2019 20:09:29 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 44Ycfx0vJZz1r3sq; Tue, 2 Apr 2019 20:09:29 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id O5Rdp4AZ8c0p; Tue, 2 Apr 2019 20:09:28 +0200 (CEST) X-Auth-Info: BVvyNSVyu2Vu2iWg87jE/Xee0e+b8WycSSjCRaIttfSYcouTUVtTuqQZZHvPPK3b Received: from igel.home (ppp-46-244-169-227.dynamic.mnet-online.de [46.244.169.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Tue, 2 Apr 2019 20:09:28 +0200 (CEST) Received: by igel.home (Postfix, from userid 1000) id 7A4162C128E; Tue, 2 Apr 2019 20:09:27 +0200 (CEST) From: Andreas Schwab To: Prarit Bhargava Subject: [PATCH] fbcon: Don't reset logo_shown when logo is currently shown References: <20190129134350.24049-1-prarit@redhat.com> <20190129134350.24049-3-prarit@redhat.com> <87ftr1ed4h.fsf@igel.home> <8590ff59-a4fb-5a02-fda4-086476efcbe6@redhat.com> X-Yow: I always liked FLAG DAY!! Date: Tue, 02 Apr 2019 20:09:27 +0200 In-Reply-To: <8590ff59-a4fb-5a02-fda4-086476efcbe6@redhat.com> (Prarit Bhargava's message of "Tue, 2 Apr 2019 07:31:49 -0400") Message-ID: <87imvwp9d4.fsf_-_@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marko Myllynen , linux-fbdev@vger.kernel.org, Kees Cook , Bartlomiej Zolnierkiewicz , Daniel Vetter , Steven Rostedt , Yisheng Xie , Hans de Goede , dri-devel@lists.freedesktop.org, Thierry Reding Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP When the logo is currently drawn on a virtual console, and the console loglevel is reduced to quiet, logo_shown must be left alone, so that it the scrolling region on that virtual console is properly reset. Fixes: 10993504d647 ("fbcon: Silence fbcon logo on 'quiet' boots") Signed-off-by: Andreas Schwab --- On Apr 02 2019, Prarit Bhargava wrote: > On 4/1/19 3:31 PM, Andreas Schwab wrote: >> On Jan 29 2019, Prarit Bhargava wrote: >> >>> @@ -1066,6 +1069,9 @@ static void fbcon_init(struct vc_data *vc, int init) >>> >>> cap = info->flags; >>> >>> + if (console_loglevel <= CONSOLE_LOGLEVEL_QUIET) >>> + logo_shown = FBCON_LOGO_DONTSHOW; >>> + >>> if (vc != svc || logo_shown == FBCON_LOGO_DONTSHOW || >>> (info->fix.type == FB_TYPE_TEXT)) >>> logo = 0; >> >> This causes the scroll region to no longer be reset when the logo is >> removed. >> > > Andreas, my apologies but I'm not sure what you mean. Could you elaborate on > the broken and expected behaviour? [ 3.204286] fbcon_init: logo_shown = -1, console_loglevel = 7 [ 11.840899] fbcon_init: logo_shown = 0, console_loglevel = 1 [ 35.344877] fbcon_init: logo_shown = -3, console_loglevel = 1 [ 35.345274] fbcon_init: logo_shown = -3, console_loglevel = 1 [ 35.345622] fbcon_init: logo_shown = -3, console_loglevel = 1 [ 35.345974] fbcon_init: logo_shown = -3, console_loglevel = 1 [ 35.346375] fbcon_init: logo_shown = -3, console_loglevel = 1 logo_shown must not be reset when non-negative. Andreas. --- drivers/video/fbdev/core/fbcon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c index cd059a801662..786f9aab55df 100644 --- a/drivers/video/fbdev/core/fbcon.c +++ b/drivers/video/fbdev/core/fbcon.c @@ -1069,7 +1069,7 @@ static void fbcon_init(struct vc_data *vc, int init) cap = info->flags; - if (console_loglevel <= CONSOLE_LOGLEVEL_QUIET) + if (logo_shown < 0 && console_loglevel <= CONSOLE_LOGLEVEL_QUIET) logo_shown = FBCON_LOGO_DONTSHOW; if (vc != svc || logo_shown == FBCON_LOGO_DONTSHOW ||