Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp33905imm; Tue, 17 Jul 2018 20:06:15 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdV3vCqtzZc1vGk9sLiEUjh3ffRsghyyBJD+zTD5SpZWhehfmGavlgSn6bxeNHuY9iUVCPS X-Received: by 2002:a17:902:bd07:: with SMTP id p7-v6mr4190802pls.32.1531883175796; Tue, 17 Jul 2018 20:06:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531883175; cv=none; d=google.com; s=arc-20160816; b=p3ORQZ9XxfEGeLi1+W3ofhT1zCNwXMcwe50DVJeYqlruouoGhIZoge+Hr93xXkTrV1 pEN9tuNpIeFpSim6pjGrB616bzZ6OhX0PqxgAMRxnyugHPn2vVjKOFg16A+rOsIOPK2b BMNfMAJ9NWXdnkFlTeEQTWABmYiIEFha5LksIkaBXQP8cKchFkfQcLvs5EB7RnbWFqwi p6xerl8hgOKsrAmo5YpqA5TL01TN1zjTxeHQdj1krQv44HF8cB/UetggSkeLCxIVI+qh tCTtbCiRVfUM2H03iZAGxQ+xYhDpwH5cPEN00Kzzo/sY1zH/nsdXN8ICwSSwzAXm61OT K27g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:references:in-reply-to:message-id :date:cc:to:from:arc-authentication-results; bh=FQn/GZUxIKtMPOuai3BpQAwpfn7X8QltEEBYNyAbNrk=; b=Y2E+uF3Gu8+auziuBEzCEGthJfxqoFTv6sWwTaxgpEEavoTAd/7eQAS59VrCDzern9 nZYyYMS05c8JubH6LkKh8MFnIF8Qz7O1vGirBMQBAbBkKEj54Hij2tjc7gbxcYhLvA3r yFRKXcmgwwD9US+ne/5pgDjjopKGQj9QSoRuxEBVV4EholJB8tnNNYlXTtsWAZBAGWBF dJoTL/eyZ1xDELcoaDo5a/7Zsa8S9EYF7Yc52HcO73VDqmPgdC0MPpHdn6VoMaBp9ktu hm3gtNbsy41l1wI2GbAuT/N+yUOmetyMt68jmADKvJ2U9HasSC7LoyGpYWz9wRPHqwWw R+Yg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u10-v6si2215650plu.506.2018.07.17.20.06.00; Tue, 17 Jul 2018 20:06:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731733AbeGRDjq (ORCPT + 99 others); Tue, 17 Jul 2018 23:39:46 -0400 Received: from tartarus.angband.pl ([89.206.35.136]:37772 "EHLO tartarus.angband.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731178AbeGRDjY (ORCPT ); Tue, 17 Jul 2018 23:39:24 -0400 Received: from 89-71-158-145.dynamic.chello.pl ([89.71.158.145] helo=umbar.angband.pl) by tartarus.angband.pl with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ffckX-0007zH-GG; Wed, 18 Jul 2018 05:03:36 +0200 Received: from kilobyte by umbar.angband.pl with local (Exim 4.91) (envelope-from ) id 1ffckX-0000AK-4l; Wed, 18 Jul 2018 05:03:33 +0200 From: Adam Borowski To: Greg Kroah-Hartman , Jiri Slaby , linux-console@vger.kernel.org, Bartlomiej Zolnierkiewicz , linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Adam Borowski Date: Wed, 18 Jul 2018 05:03:23 +0200 Message-Id: <20180718030327.579-2-kilobyte@angband.pl> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180718030327.579-1-kilobyte@angband.pl> References: <20180718030152.kdq53mwpdfusvwl5@angband.pl> <20180718030327.579-1-kilobyte@angband.pl> X-SA-Exim-Connect-IP: 89.71.158.145 X-SA-Exim-Mail-From: kilobyte@angband.pl X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tartarus X-Spam-Level: X-Spam-Status: No, score=-2.9 required=8.0 tests=ALL_TRUSTED=-1,BAYES_00=-1.9, TVD_RCVD_IP=0.001 autolearn=ham autolearn_force=no languages=en Subject: [PATCH 2/6] vt: add console flag "unblinking" X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on tartarus.angband.pl) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Marks consoles that interpret the blink bit by showing bright background instead. Doesn't matter if the console can't do either. For now, turn it on for fbcon when in color mode. Vgacon can also do so but requires setting appropriate VGA register (bit 3 of AMCR). I don't know other consoles: newport looks like it shows bright bg, sti can't do either, mda appears to blink, etc -- but confirmation would be needed. Signed-off-by: Adam Borowski --- drivers/tty/vt/vt.c | 1 + drivers/video/fbdev/core/fbcon.c | 1 + include/linux/console_struct.h | 1 + 3 files changed, 3 insertions(+) diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c index 846dfedb657d..45057bbf6f74 100644 --- a/drivers/tty/vt/vt.c +++ b/drivers/tty/vt/vt.c @@ -998,6 +998,7 @@ static void visual_init(struct vc_data *vc, int num, int init) vc->vc_hi_font_mask = 0; vc->vc_complement_mask = 0; vc->vc_can_do_color = 0; + vc->vc_unblinking = 0; vc->vc_panic_force_write = false; vc->vc_cur_blink_ms = DEFAULT_CURSOR_BLINK_MS; vc->vc_sw->con_init(vc, init); diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c index c910e74d46ff..4c67254f1ec4 100644 --- a/drivers/video/fbdev/core/fbcon.c +++ b/drivers/video/fbdev/core/fbcon.c @@ -1092,6 +1092,7 @@ static void fbcon_init(struct vc_data *vc, int init) vc->vc_panic_force_write = !!(info->flags & FBINFO_CAN_FORCE_OUTPUT); vc->vc_can_do_color = (fb_get_color_depth(&info->var, &info->fix)!=1); + vc->vc_unblinking = vc->vc_can_do_color; vc->vc_complement_mask = vc->vc_can_do_color ? 0x7700 : 0x0800; if (charcnt == 256) { vc->vc_hi_font_mask = 0; diff --git a/include/linux/console_struct.h b/include/linux/console_struct.h index fea64f2692a0..f94b28a6bd2d 100644 --- a/include/linux/console_struct.h +++ b/include/linux/console_struct.h @@ -122,6 +122,7 @@ struct vc_data { unsigned int vc_ques : 1; unsigned int vc_need_wrap : 1; unsigned int vc_can_do_color : 1; + unsigned int vc_unblinking : 1; /* shows bright bg for blink */ unsigned int vc_report_mouse : 2; unsigned char vc_utf : 1; /* Unicode UTF-8 encoding */ unsigned char vc_utf_count; -- 2.18.0