From patchwork Thu Feb 15 15:37:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Gladkov X-Patchwork-Id: 20441 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:b825:b0:106:860b:bbdd with SMTP id da37csp483803dyb; Thu, 15 Feb 2024 07:39:39 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUudEVis4TpNzu3vfN7nvNiAXzNj6n8oI/Me5liuHJ/3tN+klmyIK3csviJ6x46GJGUFjwAOiaCfjGayiTG4JmGXkGazg== X-Google-Smtp-Source: AGHT+IFXiHcO01wWJPFGNb5IXwd7MHrXAT6KHso9b+eZ6fSWTD3pd7mGozjiF6kMwH/WsNvmNiCo X-Received: by 2002:a05:622a:289:b0:42d:c742:3630 with SMTP id z9-20020a05622a028900b0042dc7423630mr2030539qtw.11.1708011578942; Thu, 15 Feb 2024 07:39:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708011578; cv=pass; d=google.com; s=arc-20160816; b=NQu3ZQ3KvysNcRoNwIIhYRbP0wvR0O4nU9dm0wIlnCUqkLeFww6KrjX/LI7xSuIt1V qnVWodPTzitGkKk8wSfb8O76/GnBx7D0YsaRJvzUbbekiBwXKZyHksoh0IjxOyydNw0t XHDMxw8oPKEiE14aoa4lux2UcSEVCOWB0VPVsOawa1wO+34uIFh0puJvrnRay8WV27+B /wPvKLt9OKxvHLJVXmLKZiVwDbov5ZLMiGJl7u4/owAv14RzuQXPb5YINTrAY4iJRKqi JQJbACMa3/SBNnpr4eNSmvftifUBQa79DyVk0+jGT8weGEq59nN7k3ImyW5B27ApcvTO /Zyw== 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:message-id:date:subject:to:from; bh=3Nmi9Km9+zciNA4nmzDrQsaoFeO2ocqD38cGNsLsoe4=; fh=5lLQrGdKCUTEsMQkEJ//E4ZZVMrkT7zt/nAQQco0YdQ=; b=vZZH9t5K7FpUJxjLaXBy/SG/wEyZ1LlPh2CS7q556SaHe3D2PJJo/H7/gRDMtkzPhD jk6rULS5VVUiehSj0QMdWIB+UWpS3DTYFzyPuDp8JUUG4y1uEHsgieuBmDNZU5XBw1aQ msdTMsv3yHLZgyQ2UabPK0+C8BZsatHtChZbFkIyPc4dtfzbECPSTgjUYKcH2kbWS3Ie rOe/RIyMOvpakUufAac6a/9yN1K/HDix2Fa0kVUPRJVv9FfItnSog4lrYkvi04snVyFt rkISgtGHxZXwMwQTFGVqYgRz/Q5zu0B9r6/iV1JTjpDd1OJ4gysDN7H2m0ZD4HcBWmR+ 0RFQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-67211-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67211-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id t15-20020ac8588f000000b0042c7f5297fasi1718199qta.215.2024.02.15.07.39.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 07:39:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67211-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-67211-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67211-ouuuleilei=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 B499D1C2155C for ; Thu, 15 Feb 2024 15:39:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D2B68134CEA; Thu, 15 Feb 2024 15:37:55 +0000 (UTC) Received: from us-smtp-delivery-44.mimecast.com (us-smtp-delivery-44.mimecast.com [205.139.111.44]) (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 E345D1339B5 for ; Thu, 15 Feb 2024 15:37:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.139.111.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708011474; cv=none; b=YN97+rzzRtrlcaofmOvu6nQVyPpSyOnM8N9A6g93aBo9qmOo4kEIRQzVjCsbcx4a9NtzJOqoNULUUB3BtlG37SaDQry3BXozsGQeHY6mB/EWklckQ7qFv+zdzU8hbC8M9/s2quFD5gEmyzcxNRI+dNrN/qwqOUMQuguyzHARZa0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708011474; c=relaxed/simple; bh=O6k3+Kt9EY9aVhxjMtSqDSmcS8ddewY4b29TogNStAw=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=Vty7/+ib5PUw/cZpl+vNtgPIzcvrlTbgGKKQ/gzep6SHzDNDMFzCtIntunDbziRIK8JfXAxeWmOdUWe1IsjGkmxziK7fKhHgYzWmHfzBBjB8tSE4QDLsLsN9N5aVNg8pnh1nCZc2pSs7K+ndnYJ80bENfuLeojj7s7XGYXBGjqc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=fail smtp.mailfrom=kernel.org; arc=none smtp.client-ip=205.139.111.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=kernel.org Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-262-qSfwzd3LNeivXFSIUlv9Ag-1; Thu, 15 Feb 2024 10:37:42 -0500 X-MC-Unique: qSfwzd3LNeivXFSIUlv9Ag-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4E22983101A; Thu, 15 Feb 2024 15:37:42 +0000 (UTC) Received: from gentoo.redhat.com (unknown [10.45.226.49]) by smtp.corp.redhat.com (Postfix) with ESMTP id A56AB112132A; Thu, 15 Feb 2024 15:37:41 +0000 (UTC) From: Alexey Gladkov To: LKML , Greg Kroah-Hartman , Jiri Slaby Subject: [RFC PATCH v1 0/5] VT: Add ability to get font requirements Date: Thu, 15 Feb 2024 15:37:19 +0000 Message-ID: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790979949709621688 X-GMAIL-MSGID: 1790979949709621688 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. How about adding another operator to get the supported font size so that userspace can handle this situation correctly? I mean something like this proof-of-concept. --- Alexey Gladkov (5): VT: Add KD_FONT_OP_GET_INFO operation newport_con: Allow to get max font width and height sticon: Allow to get max font width and height vgacon: Allow to get max font width and height fbcon: Allow to get max font width and height drivers/tty/vt/vt.c | 27 +++++++++++++++++++++++++++ drivers/tty/vt/vt_ioctl.c | 2 +- drivers/video/console/newport_con.c | 21 +++++++++++++++++---- drivers/video/console/sticon.c | 21 +++++++++++++++++++-- drivers/video/console/vgacon.c | 17 ++++++++++++++++- drivers/video/fbdev/core/fbcon.c | 18 +++++++++++++++++- include/linux/console.h | 1 + include/uapi/linux/kd.h | 1 + 8 files changed, 99 insertions(+), 9 deletions(-)