From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F1D75C352A1 for ; Tue, 6 Dec 2022 20:48:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229462AbiLFUr5 (ORCPT ); Tue, 6 Dec 2022 15:47:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229617AbiLFUrw (ORCPT ); Tue, 6 Dec 2022 15:47:52 -0500 Received: from sonata.ens-lyon.org (domu-toccata.ens-lyon.fr [140.77.166.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADB2417E3F for ; Tue, 6 Dec 2022 12:47:50 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 7F6A320107; Tue, 6 Dec 2022 21:47:49 +0100 (CET) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WX83d12NAk93; Tue, 6 Dec 2022 21:47:49 +0100 (CET) Received: from begin (unknown [46.231.241.247]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id 5B44120101; Tue, 6 Dec 2022 21:47:49 +0100 (CET) Received: from samy by begin with local (Exim 4.96) (envelope-from ) id 1p2eqy-009HsG-1g; Tue, 06 Dec 2022 21:47:48 +0100 Date: Tue, 6 Dec 2022 21:47:48 +0100 From: Samuel Thibault To: Jiri Slaby Cc: Greg Kroah-Hartman , kbd@lists.altlinux.org, linux-kernel@vger.kernel.org Subject: Re: [patch 3/3] VT: Bump font size limitation to 64x128 pixels Message-ID: <20221206204748.jvwr4jgtukkutrmb@begin> Mail-Followup-To: Samuel Thibault , Jiri Slaby , Greg Kroah-Hartman , kbd@lists.altlinux.org, linux-kernel@vger.kernel.org References: <20221205000739.583233140@ens-lyon.org> <20221205000807.896278194@ens-lyon.org> <45c09e48-9e69-2371-70d2-8a0b1e9f4899@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <45c09e48-9e69-2371-70d2-8a0b1e9f4899@kernel.org> Organization: I am not organized User-Agent: NeoMutt/20170609 (1.8.3) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Jiri Slaby, le mar. 06 déc. 2022 07:48:37 +0100, a ecrit: > On 05. 12. 22, 1:07, Samuel Thibault wrote: > > This moves 32x32 font size limitation checking down to drivers, so that > > fbcon can allow large fonts. > > > > We still keep a limitation to 64x128 pixels so as to have a simple bounded > > allocation for con_font_get and in the userland kbd tool. That glyph size > > will however be enough to have 128x36 characters on a "16/9 8K display". > > > > Signed-off-by: Samuel Thibault > > > > Index: linux-6.0/drivers/tty/vt/vt.c > > =================================================================== > > --- linux-6.0.orig/drivers/tty/vt/vt.c > > +++ linux-6.0/drivers/tty/vt/vt.c > > @@ -4575,17 +4575,20 @@ void reset_palette(struct vc_data *vc) > ... > > -#define max_font_size 65536 > > +#define max_font_width 64 > > +#define max_font_height 128 > > +#define max_font_glyphs 512 > > +#define max_font_size (max_font_glyphs*max_font_width*max_font_height) > > So this is 64K -> 4M switch. We should likely convert to kvmalloc() too. Oh, indeed, I'll fix that as well. Thanks, Samuel