Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp788328lqb; Wed, 17 Apr 2024 10:38:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU1YuiuZD63jPEOmea4OupPDB1JpRLfdzmZa0EfCBgVwyro419O99LmCBVZTZIcUFkJqE3712isPGcqkxFWE7G2dDTJUOjvi2aXGEhEzg== X-Google-Smtp-Source: AGHT+IFzVOk3CTcfQJ4hP9Tj+7NfMtoSIxHREV7XTh/fCuTBLjVE8CmnnTe2qB3UOXR1yvQyG6hM X-Received: by 2002:a17:903:1ca:b0:1e3:d242:418a with SMTP id e10-20020a17090301ca00b001e3d242418amr133565plh.9.1713375527548; Wed, 17 Apr 2024 10:38:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713375527; cv=pass; d=google.com; s=arc-20160816; b=gHAs84NgM9e7WhZmw/7vlype7IZmcrBiycqAMBJZrXx5Ib2DWyVuGHhk3KZdO9rnkv 0H1n4y1JRtBEUBVu1VdPszBOtwM55Q/2bX6RrnpEDAypD39J+ci3lrVpC2bKDS5D3Bx9 GxV5Xbhac3j/tqk3AqYgtBeFllBWmnCyRvbB9o9n2nlLPjY0fawBoCctQ9NfZBPdAkyX Sw83RAZGmzWuvJp7A/bVeiZ/vyFJwJIRzls12RbvhWrhwtmITht9lYwER1OKxtTn3s6M dxznnzC6qP7XHu6lewi1m1KDw75Z8Ae82M0qwfLloM3wiYHLgxMiiaBTZ0DQZw5OT16j obig== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=UhauzcVLgeGjdunnkBjtXge8p5xrNHtbP39Y53ECS5A=; fh=rAq2CjR46VSIAUbJnoKIDGXdHsZcE/kTLnlAtwBToa8=; b=H6+lLyA1M1zY540HkTNueqpVNY1Q72YgdTMk4P6bTHJW20wnx3blj1tw4dhi63eQB9 CdYnV9YxwJgILT/5nrOK783+M8iUCFvzqPjg381LhwYI/27czAf2PD26qkVslXcMsPSz Cl74UK8fZXmM5pfL/DVHoKY2WuAzMwliXZHJI09TqWiSj+nMM6HUGed7KcV8MxIPbBoZ HX5YxrvXvy3/el6AbNO07zcoAxnISmuO7oRgFc3uk3o9i6Amsp6803Q60E4FwPgv1qre dKCAtKkg2DpGE6M2620phNoHNAPBhqvYlGrCxbTPxT4TVYw7ImKTN//sxHoQae2GNn99 +S1A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uLgKguZ1; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-149002-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-149002-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id s9-20020a170902c64900b001e7a2eded17si4352141pls.31.2024.04.17.10.38.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Apr 2024 10:38:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-149002-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=@kernel.org header.s=k20201202 header.b=uLgKguZ1; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-149002-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-149002-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 23FDA281D46 for ; Wed, 17 Apr 2024 17:38:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0817E172BC9; Wed, 17 Apr 2024 17:38:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="uLgKguZ1" 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 186ED3AC01; Wed, 17 Apr 2024 17:38:38 +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=1713375519; cv=none; b=bQGud8V2EWccGd7xLy2Zqut9Ia4w9Ne3/KLlUX5f15hz+bNhYV4pBSep+VF3Of9avPy8bnGSy2SMAJPsrg6ZUrOA5NTFJNNx62f0Tg+dhQ+z3UbsTKdjQSqXitkAcp7A9tCERD01s6eSgaIqWQ7kPxU8R21xccUOoVHcEbkJeME= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713375519; c=relaxed/simple; bh=SmhAnxg6YLplDFHBEYB/c369CXI3faSrG7oPNm5pMUA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FuhefWobdIw/Hgqz0ioIBMp+DHDLTRR8GfyP7G+UzMuYm8wdpP0BqMXAehuJFaai3po7IAFM7A94F62lFyV4DfTTeHJp1p5dI12Yq9n1CFTdzm+3/u+jpDtwuFor5ByMe1Yc3RYpKgQi2OVInjisg6diTrpnlpu/Dpnt9GeDCVM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=uLgKguZ1; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id EFC50C072AA; Wed, 17 Apr 2024 17:38:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713375518; bh=SmhAnxg6YLplDFHBEYB/c369CXI3faSrG7oPNm5pMUA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uLgKguZ1lyP10YWtLiTwvvlzsBQYjclez+r5UogT9wGijmDUVnUKshsT3q1WTpQue divLUth1If41UIe8Zus3pDxeGRRpkv43/ZXZiH8FAJh9QrFtgWAX/SoKffMRD87z4F mMDRNF6pFccc7bwAQY2Y4kk6GLZ+TusrLCSkQHsOPfZDOMVAp0vhnrfG+ICKHuk9ot kt0nDv5aCGRbaxNV7fmvjpmq+JcB012bSfPLLepz/Th2LtlV+eYF5U72f+ievmXts9 JbyIWjNkvVAaNZ6ILifmNwtBGvgGxe//cFxw9npBSI/BxYoQyxgiTCP04gWHwa2r3V h0BfioPXwothA== From: Alexey Gladkov To: Greg Kroah-Hartman , Jiri Slaby Cc: LKML , kbd@lists.linux.dev, linux-api@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-serial@vger.kernel.org Subject: [PATCH v5 0/3] VT: Add ability to get font requirements Date: Wed, 17 Apr 2024 19:37:34 +0200 Message-ID: X-Mailer: git-send-email 2.44.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit We now have KD_FONT_OP_SET_TALL, but in fact such large fonts cannot be loaded. No console driver supports tall fonts. Unfortunately, userspace cannot distinguish the lack of support in the driver from errors in the font itself. In all cases, EINVAL will be returned. This patchset adds a separate ioctl to obtain the font parameters supported by the console driver. v5: * Use data types that are compatible with the uapi structure. * Use _IOR to define a new ioctl as required for new ioctls. v4: * Rebased on v6.9-rc1 and conflicts have been fixed. * Do not copy KDFONTINFO data from the userspace. * Header include/uapi/linux/kd.h uses _IOC macros to define ioctls. v3: * Added the use of the in_range macro. * Squashed the commits that add ioctl to console divers. v2: * Instead of the KDFONTOP extension, a new ioctl has been added to obtain font information. Alexey Gladkov (3): VT: Use macros to define ioctls VT: Add KDFONTINFO ioctl VT: Allow to get max font width and height drivers/tty/vt/vt.c | 24 ++++++ drivers/tty/vt/vt_ioctl.c | 13 ++++ drivers/video/console/newport_con.c | 21 +++++- drivers/video/console/sticon.c | 25 ++++++- drivers/video/console/vgacon.c | 21 +++++- drivers/video/fbdev/core/fbcon.c | 16 ++++ include/linux/console.h | 3 + include/linux/vt_kern.h | 1 + include/uapi/linux/kd.h | 110 ++++++++++++++++------------ 9 files changed, 180 insertions(+), 54 deletions(-) -- 2.44.0