Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp1041943lqd; Thu, 25 Apr 2024 04:36:04 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX/cttUVJfdI7yJJRA193dLfILw3pJkudemqETLslkvNM4AmBg+GUm/84V71eJrWzca8z20B0od/yJdlcmC78YimbyItF8kRvPNEIfvSQ== X-Google-Smtp-Source: AGHT+IEbr/H3hxw2hzEY0fvF1fpDMZyU/OuLfuGb9JYiqgnJO/HSH8VsjGUIq3HCo71jEAgDBIo0 X-Received: by 2002:a05:6a20:5507:b0:1a8:4254:5cdf with SMTP id ko7-20020a056a20550700b001a842545cdfmr4991594pzb.22.1714044964260; Thu, 25 Apr 2024 04:36:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714044964; cv=pass; d=google.com; s=arc-20160816; b=JsajDMHpknYq6xdY83DaouDBdIx5YZZ2Zyw0gBawkYRl+UiDKWhu6G+nElYJeFR3sB oozUMMwnpu0IJuUzlh+eS0uh4+rDvMekkm2m5KkabfaFo2CUiaWF2Tk7dmPtnjaMqa1A y+PDRUanQylwyHOshUcxFOqBWIoy3rgUiJrduhzGgF/jyfTgu6PRUTG3rP0A8vWNz05s kLE0excA6uNPM/0kjj9YygejaIEBfp1UkQFm5RW+BRdq1N/IFdBFzGp9rg01M1N0ELUl oRvLuLwMtubuMNwovtupOdqUCZYP+uUeZo3CNq3eSREwL08PNcwlyt+3W0xnEZq4FmHK julg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:content-transfer-encoding:in-reply-to:autocrypt :from:content-language:references:cc:to:subject:user-agent :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :date:message-id:dkim-signature; bh=Wd75oAOWRnH4MgUUY1TJVV9iqximUQMOF5SkISYOC+Q=; fh=vJ2G8EHUCjKFAJrLjZOoajlHxopVmSx96b5Wp9+B2H8=; b=Fyl5Xz/wa85MgFOJ+L8fFuovFBDizgtXiGHXqe587XiXZv1FpGbVYmaSRG6cyhB9Dw /wUuuGVohrHr1EHTyg59AfDNppvfqpjjV5fo61rEg93JJuVD9guE6zROQKfJ3eibhWaj q5tIcIHF3jO8El8L87J/Jdl3QnW0eyKcdA+DSH+pvWmKulCxvdss1KP5hTIis26jPGKf 8ZntcCX6wWuE+6ii63Jc4QREYbVZ0hf5+gCXgv/2sf+u3KK7ccY3rJLY+TgBBGnfjNzW HM4MD3UHWmfBiL7GlOQooxO+F83/eLH5PYWI3dWWeZ9SOXtoBp1ED1reQ5pDjDnODWqP ywwg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b="YVR/bz//"; arc=pass (i=1 spf=pass spfdomain=gmx.de dkim=pass dkdomain=gmx.de dmarc=pass fromdomain=gmx.de); spf=pass (google.com: domain of linux-kernel+bounces-158452-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158452-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=gmx.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id lr49-20020a056a0073b100b006e698118106si10762327pfb.286.2024.04.25.04.36.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 04:36:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-158452-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.de header.s=s31663417 header.b="YVR/bz//"; arc=pass (i=1 spf=pass spfdomain=gmx.de dkim=pass dkdomain=gmx.de dmarc=pass fromdomain=gmx.de); spf=pass (google.com: domain of linux-kernel+bounces-158452-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158452-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=gmx.de 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id DFB83282826 for ; Thu, 25 Apr 2024 11:36:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 110CB12AADE; Thu, 25 Apr 2024 11:35:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmx.de header.i=deller@gmx.de header.b="YVR/bz//" Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (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 8DBBF84DEE; Thu, 25 Apr 2024 11:35:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.17.22 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714044954; cv=none; b=qK9Cej8KpRIwOhtnSZNP8W5DHWNoKK9YqokTJ5E9pN5wXFFdxmAgyl2OzDzD1JzPoYcYFj9/28VaAIq0q3FURv7Kq9/xxCdeBu5DaLo14LUazZONyJzy0EPBycurJX6jRK6bbEgj5W7Xv4dB01FpSGBOPplEekCsOgX9fM2Uy3Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714044954; c=relaxed/simple; bh=62rGSpnWaxxUaRbRg+LNUd0Vy12ZjbRKCfLvcC0SDdo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Zc3E3jQ3XNKtIvewlnO0Dm2a7JrOiv+LYGLflAqpKhNdg1gKLlKBeN71rQSKw56tCnL07jpqXULMqB4q6Ywu6y7GtyWDeRwJCTuatNJ9hZFdMBM8UioMmCm40/HX4Q2+AomyffwXpYOv2vQGSr2cwlPN1YE6IheJRwLCMdUJHMg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de; spf=pass smtp.mailfrom=gmx.de; dkim=pass (2048-bit key) header.d=gmx.de header.i=deller@gmx.de header.b=YVR/bz//; arc=none smtp.client-ip=212.227.17.22 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.de; s=s31663417; t=1714044942; x=1714649742; i=deller@gmx.de; bh=Wd75oAOWRnH4MgUUY1TJVV9iqximUQMOF5SkISYOC+Q=; h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To:Cc: References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=YVR/bz//9KPFntYUdJremhvXdpR2DQpePQxqpKNQkbE9MZAxUKkcGbwymChfBT19 zNGSnDVtgaLThv4rgSXNc+07q/IFoD3JnCYb4IFoex7EJLsZLJRBhxTFklSP4U+RS +XYERZOOa5whhyS3YBMBVETJGVboy7m+R+Lqjt4PAJVAbOE19Jb7Aki2OyZP4Ssyu RAwqvxhnqsng6X3/zf9Nhv+TBtpKr8Zi5SuByv+FuQwQUuposD6oB97z491uX17Yj GqmXmtwVSRr8IrksRPS3AFCsprRXxvaSuN9IPLEPFIGejid9j2KaPcJ1jBTEKyasg wFtHsrI59/yNXxsVYQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [10.8.0.6] ([78.94.87.245]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MdebB-1sZZK32rFR-00ZfO1; Thu, 25 Apr 2024 13:35:42 +0200 Message-ID: Date: Thu, 25 Apr 2024 13:35:41 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 2/3] VT: Add KDFONTINFO ioctl To: Alexey Gladkov 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 References: <9019dc74-35ad-43d7-8763-cea3da93e9c1@gmx.de> <9993ad2d-48a8-43be-ae41-4b8d710c1ea7@gmx.de> Content-Language: en-US From: Helge Deller Autocrypt: addr=deller@gmx.de; keydata= xsFNBF3Ia3MBEAD3nmWzMgQByYAWnb9cNqspnkb2GLVKzhoH2QD4eRpyDLA/3smlClbeKkWT HLnjgkbPFDmcmCz5V0Wv1mKYRClAHPCIBIJgyICqqUZo2qGmKstUx3pFAiztlXBANpRECgwJ r+8w6mkccOM9GhoPU0vMaD/UVJcJQzvrxVHO8EHS36aUkjKd6cOpdVbCt3qx8cEhCmaFEO6u CL+k5AZQoABbFQEBocZE1/lSYzaHkcHrjn4cQjc3CffXnUVYwlo8EYOtAHgMDC39s9a7S90L 69l6G73lYBD/Br5lnDPlG6dKfGFZZpQ1h8/x+Qz366Ojfq9MuuRJg7ZQpe6foiOtqwKym/zV dVvSdOOc5sHSpfwu5+BVAAyBd6hw4NddlAQUjHSRs3zJ9OfrEx2d3mIfXZ7+pMhZ7qX0Axlq Lq+B5cfLpzkPAgKn11tfXFxP+hcPHIts0bnDz4EEp+HraW+oRCH2m57Y9zhcJTOJaLw4YpTY GRUlF076vZ2Hz/xMEvIJddRGId7UXZgH9a32NDf+BUjWEZvFt1wFSW1r7zb7oGCwZMy2LI/G aHQv/N0NeFMd28z+deyxd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PKqvDZ02j1wp7vthQcOEg08z1+XHXb8ZZKST7yTVa5P89JymGE8CBGdQaAXnqYK3/yWf FwRDcGV6nxanxZGKEkSHHOm8jHwvQWvPP73pvuPBEPtKGLzbgd7OOcGZWtq2hNC6cRtsRdDx 4TAGMCz4j238m+2mdbdhRh3iBnWT5yPFfnv/2IjFAk+sdix1Mrr+LIDF++kiekeq0yUpDdc4 ExBy2xf6dd+tuFFBp3/VDN4U0UfG4QJ2fg19zE5Z8dS4jGIbLg== In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:qG0SgbS54dSqSDLb/4RqUArtcDUwbeC5rZ406sdxMI1Hr3XO42/ BzusuIvXIZbIKT/Jzz3vWxcAwDZIA//T1d2C6bCGDkqkkKv3nMd2yQWy6K+zE+Q/ifyGnPK rka5hfHK0W/Bz2FjGF9yAARKlrxm/oUiEBddRR0XEc1M5o9tXvqKzoDoW+J+ExFm7T5ynS0 N2EmJEv880IYvkgdN1pvg== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:HY9J8ff6syI=;IqxmUssLChGH6UiPde+YNC40L99 cN2erDiCmy11HUyqa9cEOfWtlGVwCfxPFnokA72A+tNP4it8uJX71/vdNwypLpjm7GS6etrVp sv69ExfSvkOw4q/xSyor9G2V1m+iRnlm0EF1HaOXIYdZzajW57caJClasjNDvFWpgtBe98kYO rAyEwLins6ep4Pi4RuR0FHIsaI/R3UhSUYw2vyk6342S2c+0ecO1JCxZVEvUiqlf/OuQSNZbg 3aVVOdyc4T5uF0GHwkd1Huq+2AacHbFlGvEocop4ZaVee6iBfEdGUDw/pxK3l0kvdyNF9oF5B fdm46+RWXQ3OllePSnLxu1IU3DZS/OmP1AYggsGXitcSnqVFQzzuqb/nHJwoz++kGCmJx2WVV i574CQD1zzaJHjl3I9mn/jQFjo1gFIpuy8//lBUPZzWVyB7rYGUIvCElrzZxVHWmOqN8wWmnx tzl3zeknR9V13KaB5O9py+R1MFWXNcmNkdqpDQeH4dWZuwdZpgmJemIm8zDD0UjPWEVWVMPYx pyGKDauVnRwRGl4fO9qM/FMLrqvtf54nZqLqXPiJxB/O0CHXEM6CviEm7AHAzLgbIpcpujPLw uYH/NccNV9Hb9iS6g8LotqIj2F+otXLTyL5hesPD4OC2AyWrJDRUosrpLfi2m8TJn4UGJ78Ky lMOk0p7viFXRQnKf/sg0sswCCgowkeumPBYYyq4uN+UmrDAMgeq5RPnAb42BwhkgzGpvcWy1f +Adj1UVaFc4JCK9IX4OuTWOQu+rpqtTdY3QO3TtobJItrXXlJ6+3uDeTqlME7TqLtPHQUur7e YqJNpicFrLid1PXb6qjteO0PkXybFRYNiHY+/SgafAIZ0= On 4/25/24 13:06, Alexey Gladkov wrote: > 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 char= cell 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 !=3D 32) >>> || (op->charcount !=3D 256 && op->charcount !=3D 512)) >>> >>> [ to be honest, I don=E2=80=99t know why this driver doesn=E2=80=99t a= ccept 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. Yes, I think that's ok. Helge