Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1375439rbb; Mon, 26 Feb 2024 07:25:27 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV+c6swDnkskBXrCDHWndvGi7plQZ+Tceb0YjXX60uiHRFwYtZJ1FTZm3nYjpzC2nixAiR8CuLAyZ86I9k46HNDL0m3SObOp0MWX2LiBw== X-Google-Smtp-Source: AGHT+IEa7LFgf05yZefqMGpefANXCQ0rFcMZDOzQdAiT2D0Issq54Yq4y8PerR4p1Pw91jPoAEtG X-Received: by 2002:a17:906:f2cb:b0:a43:883:61e1 with SMTP id gz11-20020a170906f2cb00b00a43088361e1mr3207373ejb.5.1708961127461; Mon, 26 Feb 2024 07:25:27 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708961127; cv=pass; d=google.com; s=arc-20160816; b=jeok6J1Z9jpXlrDYDPWEV2yHa8Zl85wweXpYGnAgsFMsjIi1CteM1dHk+P2kl3FOBB UutENHA7XR/8htpfRuVcG7DALjZnaoGmSsEHK8dETunxnUEFnrjjzLEtqD73zjq2YDT+ 5MLYnxtzcLDQDhno2PHdL1Mf/wJSzAkBK8Rcl3Q7YW8PXl/og1xLB49nyDGyNLtIMz0Q 2EKzUd7PIbQz2nrXujTITlfNJR12Qj9MvS+eccL9hrcHYC+utQEZ7NouuPsQ+nFZMxms 6MgMFNfLS00XFT5cZSuhQD3wYz8+mQLtm1ZL5a9a33d7YzDy16VohXVeCNSp7aCpQ1DU 9/mA== 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; bh=upfGJ5oCBP0WEe6PMZKYlx18glir/z7f/Eoi+BKv8zc=; fh=+sjJkTnuceKV/39ogbp2WrGgLtnGuaoEzUs1VQcMbqE=; b=KqKs/IuLgD2zXy0GIyUgzrOuzKVNWwsxJm4gt88XC30zdcyg/7H0Vm5mD+Y4HHJwu2 c6Oj0gpl6f4DtA/C1x+mhjby6jyyU4Sci/qdBl/QJ6O+KRBmUEYJQ0XrruHIE618eckh F1WbVfD/9rzV1KjiO3ywId5JipVzurcae0gUT2FotZOKVIy1MoK+0fjWiRcDCrAImBjM zez4f0lICCmGrSiSBhuurPZuhwfF3Awh1c9Rlc1GA7ZnHonNKCobyU7t0CNhqYEKlWzo QghAVrGFLOBMjtv9lGBqQDfV6LB7Wzc7w/BWhfJ+7rQr8kmfAyJeX5I18C9/kMFYOVlh szqg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-81784-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81784-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id x25-20020a1709064bd900b00a3e55f66d44si2128696ejv.606.2024.02.26.07.25.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 07:25:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-81784-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-81784-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81784-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 644B61F2E942 for ; Mon, 26 Feb 2024 15:23:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 75AC312AAC8; Mon, 26 Feb 2024 15:21:34 +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 4E3FD128368 for ; Mon, 26 Feb 2024 15:21:30 +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=1708960894; cv=none; b=stYAm6TFRotRpEX2smBB6h8A4jyTBOtbSSPSBIj8aiN68CofMSxHzYfG60Sti72WEVaOT2ZXduQZn4S8rrDB/RhUvpkXPNHgYPPKGvfS94SidVBxM/LoUfM5bTMFOBlui9pZbC8/G79ISdHN5eO/njc3Pge9xRQ0GtB5ojJQcUs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708960894; c=relaxed/simple; bh=qtJdJKQ0dYNLQicmz2IhIWYeRf4DPy/Z8Un/D7cH+6c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nTbSDgb3JIeca+H2550eDH9SY2gzGld6wpe2QxwXXK7U/KEzHcZvwgz7cYwMOSy6LNWAYQdH+uF/ynVP0HdNA9JM/+GNw9Z65x0Q3omDU8/Kc3mQVsoeu2BMmeuyWuaKmns1wGSW+XuvG0KJPWkq9EGt59qyJF8OBJQueXlr2Mw= 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-688-CGkQoEueMhK85phMJc9dTg-1; Mon, 26 Feb 2024 10:21:22 -0500 X-MC-Unique: CGkQoEueMhK85phMJc9dTg-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (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 DE92085A58B; Mon, 26 Feb 2024 15:21:21 +0000 (UTC) Received: from gentoo.redhat.com (unknown [10.45.224.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 23B80492BD7; Mon, 26 Feb 2024 15:21:21 +0000 (UTC) From: Alexey Gladkov To: LKML , Greg Kroah-Hartman , Jiri Slaby Cc: linux-api@vger.kernel.org Subject: [RFC PATCH v2 0/5] VT: Add ability to get font requirements Date: Mon, 26 Feb 2024 16:21:09 +0100 Message-ID: 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 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.10 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. In order not to hack the KDFONTOP interface, I suggest adding a new ioctl to obtain information about the capabilities of the console driver. This is the second version of the patch with the fixes pointed out by Jiri Slaby. Previous version: https://lore.kernel.org/all/cover.1708011391.git.legion@kernel.org/ --- 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 | 24 ++++++++++++++++++++++++ drivers/tty/vt/vt_ioctl.c | 12 ++++++++++++ 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, 132 insertions(+), 9 deletions(-) -- 2.44.0