Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp1026948lqd; Thu, 25 Apr 2024 04:06:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX5OFWo5kZb/NvojlDGuWIYCj7F/86w2mfpJEOSwAfNiBpYAD8zkUXCNfn9g62TkBP2VPM1kXOGLoMoWZjdK/gDZ5wADmgOV8PxN2bs2w== X-Google-Smtp-Source: AGHT+IFI1mN4ld6YZSh95cclyVAVmaO5R6NYSymAwF8tldjvqDHZDipKJM2qtv0BSs61xnpf0eC6 X-Received: by 2002:a05:620a:2714:b0:78d:7802:16fc with SMTP id b20-20020a05620a271400b0078d780216fcmr6281233qkp.49.1714043188929; Thu, 25 Apr 2024 04:06:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714043188; cv=pass; d=google.com; s=arc-20160816; b=SJssG0+n7QvOkf3sFvKMXpfMP5nw7N5lUCE2T2Z5HcsmgdumlREE03aP7zcQPL9IPX kLDIIK+srI8pGI+NhLWNPFgQ7Qckde3uaxM21nZeqGrneakXvFLy6h3wIFpdkGyYuyTI OVq+SIoDqFq6jke/ZOXtj3wGjCtgdDwWuCd9Is+67JyTtBR5rdYTsebI0vg3FijDvJEU WBCcDJh+v44UXsJ5GsNT/UPHedBet5UkxXHmKJxS8p8i3TCDHeQAIH8kMNY51HydK/qs Gfw/zGUQhifYDaP+oRY7LV489dvflKVJuwIxUPM3rGsoGV4dyrJZ0axU/cddkA1k8Uav BqVw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=rJAFkxe/6gzMU46jU2/3r6VLa/FQ23bgOvbV/epU40Q=; fh=go3zc32cOa9ivCgv1orHwLn+VlYQYphnEbCNMLM1eyo=; b=A40sm2WItkvkNl9YETc2J4xssbWI9ak2C/IvWknPunL14m+oFi6Y1L5p6oPd6t2clG 3KWuxZVCsjY2Xrbs+ANofpf6FMcWWRsBNWjZ4FizghepiJ9eWYeh19T5vgjbnCbgwxa1 M0LCmTRxAl9XSk9wtqJA0Jk7R3d56AaSLUoETv17DmXFnlRsakVMACdbir3th1CSdXya XBggQdJpEgKc3P7j49sJT2X+8wxXw6yQzlBjHPpPvX1csgylvllflj75fqErbDsDad/S xIMas8LGzhmtg+9FoYd3l5RtKjbtgdFUWcHSXySRsrTI0I7QUhZgVcnzRHKLPsLKYzDz fCIw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QA0+PpbW; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-158425-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158425-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id bj13-20020a05620a190d00b0078d50be5d37si19259780qkb.87.2024.04.25.04.06.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 04:06:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-158425-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QA0+PpbW; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-158425-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158425-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id A7B851C21609 for ; Thu, 25 Apr 2024 11:06:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 84F9B85261; Thu, 25 Apr 2024 11:06:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="QA0+PpbW" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 972BD84DEE; Thu, 25 Apr 2024 11:06:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714043179; cv=none; b=mH6FhVzdlojaxNKy1ZJW2uIq9A/T8lJaHBhRJy97T20/5kzgEAl96ytdVOcWkf4TGnZAEZpAA8DRArNc9X79PxnPgfh1UehtzGnE6qjPt5o+NrxF49ePF8ZmUR3nCPhcMrKol9WXaGQW8Cny9vu4e3bhGJODCn+dmFk/ekN7c7c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714043179; c=relaxed/simple; bh=7MlyFh3idC/2fg0ESo5n3eeC4q0V5+E+zLSKJ2s9SHQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=XI5c5Xp6Vv1nDaPnIHrxHQjw4dW47ScwbesD8499ZQTJv5d87P2BS61jVAxT6PvaOjcAQNzKamGkSKhxLCPSzpier6h1Tm2Vme4xDYqaj2fxZr2l9WqrydQSaBH4LpOXU77XoZH0cJlB7QjYIt5G+pRDd88a7kvfUY0a8IDMYb8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=QA0+PpbW; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 47578C113CC; Thu, 25 Apr 2024 11:06:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714043179; bh=7MlyFh3idC/2fg0ESo5n3eeC4q0V5+E+zLSKJ2s9SHQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QA0+PpbW+unPO/3OhxSkHI6SXnfE21R3j24oMVNz3bAvF54ZzOebzEUS3vW2THGU6 yqKI5qjU4V2gSKMbbC4qhAafnLYFVc5rp4GIKXauX7uNOXh3c67RS37Z6hIWUGAxft jv8K4JKR22rGCexGrlU4QVcSEha90mZLn2/wX1PoSp7qwPN74pSgGg+RVAhJ29ahAL 7yrinZjLs8Q6EYVXYVYvY4wIMNUieIPlJuzakSSur8IuzJqBo+8BJVOujTxVKTVVdy NHK/f4KxFKiXuX8gHbgFrvtr3eHmoeRF05v7kOJP3/Rv95aljDMalLRJSjUs5vYVJD z3T0koqHw3r6g== Date: Thu, 25 Apr 2024 13:06:13 +0200 From: Alexey Gladkov To: Helge Deller Cc: Greg Kroah-Hartman , Jiri Slaby , LKML , kbd@lists.linux.dev, linux-api@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-serial@vger.kernel.org Subject: Re: [PATCH v5 2/3] VT: Add KDFONTINFO ioctl Message-ID: References: <9019dc74-35ad-43d7-8763-cea3da93e9c1@gmx.de> <9993ad2d-48a8-43be-ae41-4b8d710c1ea7@gmx.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <9993ad2d-48a8-43be-ae41-4b8d710c1ea7@gmx.de> On Thu, Apr 25, 2024 at 12:33:28PM +0200, Helge Deller wrote: > >>> diff --git a/include/uapi/linux/kd.h b/include/uapi/linux/kd.h > >>> index 8ddb2219a84b..68b715ad4d5c 100644 > >>> --- a/include/uapi/linux/kd.h > >>> +++ b/include/uapi/linux/kd.h > >>> @@ -185,6 +185,20 @@ struct console_font { > >>> > >>> #define KD_FONT_FLAG_DONT_RECALC 1 /* Don't recalculate hw charcell size [compat] */ > >>> > >>> +/* font information */ > >>> + > >>> +#define KD_FONT_INFO_FLAG_LOW_SIZE _BITUL(0) /* 256 */ > >>> +#define KD_FONT_INFO_FLAG_HIGH_SIZE _BITUL(1) /* 512 */ > >> > >> Do we really need those bits? > >> You set a default min/max font size in con_font_info() above, > >> and all drivers can override those values. > >> So, there are always min/max sizes available. > > > > These bits are not about the minimum and maximum glyph size, but about the > > number of glyphs in the font. > > > > Maybe this is an overkill, but sticon has this check: > > > > if ((w < 6) || (h < 6) || (w > 32) || (h > 32) || (vpitch != 32) > > || (op->charcount != 256 && op->charcount != 512)) > > > > [ to be honest, I don’t know why this driver doesn’t accept a glyph of > > width 4 ] > > I think there was no technical limitation when I added that. > It's just that the font would be so small... If so, then I can remove min_height/min_width from the ioctl structure. And most likely the flags can also be left empty since at the moment all drivers support 512. > > I thought it would be worth fixing the maximum number of requirements in > > the drivers since I started adding a new ioctl. > > Ok. > > Helge > -- Rgrds, legion