Received: by 2002:a05:7208:3003:b0:81:def:69cd with SMTP id f3csp4232841rba; Tue, 2 Apr 2024 10:52:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXDeatkZHvoz6TZJese+x2tN3kLj0OLpm1MaBi4maNECekxH9Vx9T6VT9vG47kZO8r6qH8jMhvJddF1vHJ102Q7gkSZxVCVueF4a25kZw== X-Google-Smtp-Source: AGHT+IHIK0RknQ4ilh/cp7qWcXkCdQU5i6QLn1Hsa0JGQw3sSs71Z0+xaFKZUqjcvyh3Ynz6BbTi X-Received: by 2002:a17:90a:df15:b0:2a0:97f0:955e with SMTP id gp21-20020a17090adf1500b002a097f0955emr10745578pjb.37.1712080336321; Tue, 02 Apr 2024 10:52:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712080336; cv=pass; d=google.com; s=arc-20160816; b=RIlFELKNJpDQLbSL0gUZPvPst1iOAZ4W6oQuGmehvUrVqZ23q0KSyQlQHp7x+TtLvO yVoY3eUqHZqwaY4ql3w4m60wsE80Il4Vslhleg6vodMTQbVb/2xWbiWjvZiNA5pN1HF+ HWyZ1uvOyAI+v71PjxYVzXXLUZrrKyUUuQrtg+0Xt1XdjACLIpzyQRgzh4NTV5jwY2Dg pKTdxUIT1bOOncBrcGrVcVehzZmviz2JWT5pbdHhnbUlU2xV1+SN7QFjNyb7OmuUF6qb yj5vXjCEdCy6/amiTw/etvC18GLE2iHtWHQpe4C7ymTn2rOHa2anuexNsNwIiFgASlX9 MDDA== 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=7fKDTbeYZ6CmrrClD6GqjZdSAcwI+3ifh3qKFUerMtQ=; fh=rAq2CjR46VSIAUbJnoKIDGXdHsZcE/kTLnlAtwBToa8=; b=bRMKrBqMVAQBfGM06BVx2+0sNxL4NkDRWjFPpo1GtUQkug2xpLt1VRQOGIX+Gejaf7 x9FWjFyDcm7iCpmBNCh9nZYNvZki8gWfQJkThodCkOJ5gV6mBMkkFeJW9TzHOCwOEf50 vVVsk2DeL0D/nVRV+p02LaVUqDkDxpJv1McxhCkrT3nm6BD5l3Bm+/RYduWZ8TRnmSJe gUlVlpoRl9ffZ2Dg584Lns1nF1MqLEOqA+awp1Dlr9BPay1hHaYnyv9RXfnv8pOlwFsc qdRN15XBEMxYodmshjjbOcDI9+Reu4n+4DPOCccTftxQMK4KON+2lKtlvRrAfPNNGde/ BJJQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=i4lAQWCO; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-128460-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-128460-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 x9-20020a17090a164900b002a08101bc61si11683942pje.188.2024.04.02.10.52.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Apr 2024 10:52:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-128460-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=i4lAQWCO; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-128460-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-128460-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 D25CA285FF7 for ; Tue, 2 Apr 2024 17:51:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7E55115AD8B; Tue, 2 Apr 2024 17:51:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="i4lAQWCO" 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 8638D175A1; Tue, 2 Apr 2024 17:51:20 +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=1712080281; cv=none; b=BB9Eo8mNrMThiEsCp+iwn2sWgrY7HMkcd2ZhWd0LRWGloA0pnX8XriPc9uoImoAo0/v2QF577RKh6Ik5Gq020QJZ8rk+zjaGpBgp7A0/RC76seFq7yeNbGomnjoTdxeloEt2/UN+zqJm4y2ROB/Cgx19cTMYmE+8YGFcKx34bJQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712080281; c=relaxed/simple; bh=pbmjb20B1InrpmiwIan89p4AaKAD2iHVwkaPjFQm56M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TCqWYqy6uLGci/6JTZZZDvYBqUlBRZgxARqA+RihY2ROOlSGU1ZbKCPHygOrVz8oXz5iH5ZbHdXXBmfL5m8Kd70Foc1kETfsRJ8TSDIv7vZQN5e3XMHK6EmIGPuSNkjEUN9TEzY6+8vNUiErtjVawpTFhuVSenrYpqYub1w75jo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=i4lAQWCO; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6627CC43399; Tue, 2 Apr 2024 17:51:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712080280; bh=pbmjb20B1InrpmiwIan89p4AaKAD2iHVwkaPjFQm56M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=i4lAQWCOpgw/0kB5CqskoMyMrSicQqcqLmj7z1KISVBlyIoEsH68NdanqtndCHE9F /n3diSDDmwW76s0NROrTwRk70a0EM3JZ3Di6Y+KDVoa4bwv8QSne9V7KWkwO4zZeVt QI6rCRDH+yl2ADHt9hx4tsLS9tXWwuPwhIjpR6QTwul0FmsfULkSVru+f8+sDFCTD8 J4iScOzBf0j33z6h7BOqeaQobfxzHdRaxSFw6YYNj2kKXToemm54WfTbjWTaLYthvD HUDHxvOcgn+Z5x+Uje5nhFtCsOGCFLrssqmcSyKkH5KTd8s9SmhgTtNbN7iV3OJ1Um 0tU+Ok1B7kqgg== 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 v4 0/3] VT: Add ability to get font requirements Date: Tue, 2 Apr 2024 19:50:43 +0200 Message-ID: X-Mailer: git-send-email 2.44.0 In-Reply-To: <74ca50e0-61b1-4d4c-85dd-a5d920548c04@kernel.org> References: <74ca50e0-61b1-4d4c-85dd-a5d920548c04@kernel.org> 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. 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 | 11 +++ 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 | 109 ++++++++++++++++------------ 9 files changed, 176 insertions(+), 55 deletions(-) -- 2.44.0