From patchwork Tue Apr 2 10:32:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Gladkov X-Patchwork-Id: 13613680 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 F2D8640876; Tue, 2 Apr 2024 10:33:57 +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=1712054038; cv=none; b=M3++QXcxqVacBZ/Wk6/q7EzQ/h/ERILiY0HAPJH60Q7U21Q63TIIBbRxDflieGS4co5NDyytfjELUcpFiVyWKdKFx7qadySOzCipmDn98dX4cG13yJFo2JsTgMvH2nccZZiuuM7KEhrgT216gU3wtW1Ed/8KS0szweyYoT33FKc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712054038; c=relaxed/simple; bh=yQyyvLBf6qblD2zMLzpTiUQ5VLhVLtMWd/58b3xOqH8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dnMsOcgK79h4Iu8zNdboNoL6YLAFYQ3yEfXNvw+LCaiLIU7nn7O/lPDSe7udE7/7OMtXu6SG1PSrqtB7d1fbQ9j5lAxXn3Ibmn4KjH5ajEVgjVJF7R4LJ10oVwZhdhM1rYrKD6AQ8v5imaSf/IXgGcwNVBMFq3hAZyCdF9ECTV8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=sqqrE//5; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="sqqrE//5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D805AC433F1; Tue, 2 Apr 2024 10:33:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712054037; bh=yQyyvLBf6qblD2zMLzpTiUQ5VLhVLtMWd/58b3xOqH8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sqqrE//5SJDwMvCp7dcysivY9PxZ3BLYjLA0F7XvCFrOolIJn+W5qpGVdVeLCm5BD 0dkdtB/G7edTOEdRoG595l19Q1F6CAt/oysQowWnyoApE0RalMaglp4GEhd6pKPeHX Pcb0hOpU07Hn8Od0a8Uv6CFnS8p67uwJ0yusCVlgVzCyocrxxoW+P9QDJecLeXkJSf GzzZTfHhMfZfwgOd86LXptC4U3zM3qEQbSSYyUCN9b56CBpnz7adFvYwzqykDzuXC1 c3VopP4P4Dzw/5W95ot/HH2Zxf7TKmbVuhNplVbr8Nr5SLEDYBEewa6d7hdVL37ReE sMysE3HSW3/Ew== 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: [RESEND PATCH v3 0/2] VT: Add ability to get font requirements Date: Tue, 2 Apr 2024 12:32:55 +0200 Message-ID: X-Mailer: git-send-email 2.44.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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. 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 (2): 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 | 22 +++++++++++++++++++++- include/linux/console.h | 2 ++ include/linux/vt_kern.h | 1 + include/uapi/linux/kd.h | 13 ++++++++++++- 9 files changed, 133 insertions(+), 9 deletions(-)