| Message ID | 20260120231814.2033069-1-sjg@u-boot.org |
|---|---|
| Headers |
Return-Path: <concept-bounces+u-boot-concept=u-boot.org@u-boot.org> X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768951114; bh=n+UwrMxtGD25hJVmskuaoNXk+nDXoRatK1dHosf/4wk=; h=From:To:Date:CC:Subject:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=pqyrYSq7SXrHnKLSkFom4rGsvydt8XemNwe7HLT6S22o1QV8AyN1jSgj8LgL2CSQx cSZjJwV/ajIBOoF/jgyzHJn+38v6U0mqdKey1ERcd7L8ABcynJjVapjQmGuU/8uqih 78ifkfkdeSvEvv+kbm8B2lPqIl1vF4BhAYKtI6un3P6eIsg2miz0j5cjyrWuqYwF7K hgI38yXT3ytGNfrgsCdcHmC23CWE9icpjFw31BLRiNej7Y4aqEqFWH1MGwjtCrjwSm ZjJ5pAQ2rMY76/6/lG1ZnJ8VRsjc1nCK+mBho6nh2ZJWeImR8JNuEyrhlKU9+tLESz DCVWOGpg67cvQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id C603969585 for <u-boot-concept@u-boot.org>; Tue, 20 Jan 2026 16:18:34 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 9Z1c-jV7JWgI for <u-boot-concept@u-boot.org>; Tue, 20 Jan 2026 16:18:34 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768951114; bh=n+UwrMxtGD25hJVmskuaoNXk+nDXoRatK1dHosf/4wk=; h=From:To:Date:CC:Subject:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=pqyrYSq7SXrHnKLSkFom4rGsvydt8XemNwe7HLT6S22o1QV8AyN1jSgj8LgL2CSQx cSZjJwV/ajIBOoF/jgyzHJn+38v6U0mqdKey1ERcd7L8ABcynJjVapjQmGuU/8uqih 78ifkfkdeSvEvv+kbm8B2lPqIl1vF4BhAYKtI6un3P6eIsg2miz0j5cjyrWuqYwF7K hgI38yXT3ytGNfrgsCdcHmC23CWE9icpjFw31BLRiNej7Y4aqEqFWH1MGwjtCrjwSm ZjJ5pAQ2rMY76/6/lG1ZnJ8VRsjc1nCK+mBho6nh2ZJWeImR8JNuEyrhlKU9+tLESz DCVWOGpg67cvQ== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id B2DE269581 for <u-boot-concept@u-boot.org>; Tue, 20 Jan 2026 16:18:34 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768951109; bh=7MdekI0tw8iyZhfkozd6ttoLL2DwYPlSgvAyuOAGvbg=; h=From:To:Cc:Subject:Date:From; b=JGSUWGvHwUfcvondNUixye99MQa5EwJnsnGqze7ShkdvXZw8GNes04TYAGIpqP0dA 6zaaAe2Ib3GildlwEv2mb49Be1NQ6TQmOKrb5G85IQkG23vxGpo3MB/1OWqUJYTlDy v9gaPgXW5CjDeyI8HKVW42P7gsScxT7VYlnt9fFzdGWfgUmtQX6CFx572lwevNFjgP 0eCvFFZp1VUmGY6PsboGqwIv2KPXpjruHSuW4QrlPdEXXi4HsdWeTRvbM72Xq/4OL1 7g3O99vGmfdZ3qwHyjleTgDHvhtVosVKIzTEGZ+W0WpOik+lsS0+/2AwpFWxOYLjkN vC2Kkn2YbJoVw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id E1FA269572; Tue, 20 Jan 2026 16:18:29 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id 1iGmgm-0beKa; Tue, 20 Jan 2026 16:18:29 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768951105; bh=jXC1iAqTu6jVT8WZIaulYe57pZ+PjqfoDJNMj4Hyhig=; h=From:To:Cc:Subject:Date:From; b=kHMeIM3X16EJ3qKDn7ajeZo8bjlbaO+v3hHsaeUzzVORphiG/Cq6YhfrU3VMh7t2i MiYaLhl0EYW0XK3YKO27/bcJpk8GzJx4H0uYzKqcRlBT6lIkB5WNSXZ7f3yHNbZmFl 0BYal4Td9lVp4JEjxK1WyFrxy13mpj/MKM18IAwgMGfPjZqRMzs5Pm498jUlLQLQPV shFIjsxQZsbBELp3Ac74cTPH1yAIQALBUyf70jhRyEA8b2eZGheGJV2lMuWIdBCccO E2oV+eM/LkiTbpZ4m5cvHlVkg/wwIp2/c4drSO1qOSFBRNLd1O2A8ivJi1AAXxCUhY T/4mOvoNZ7lxw== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 4F0DD6913F; Tue, 20 Jan 2026 16:18:25 -0700 (MST) From: Simon Glass <sjg@u-boot.org> To: U-Boot Concept <concept@u-boot.org> Date: Tue, 20 Jan 2026 16:17:27 -0700 Message-ID: <20260120231814.2033069-1-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Message-ID-Hash: UJVO4PVIF2XO5EUYAGZTWHYAFG6XXBJW X-Message-ID-Hash: UJVO4PVIF2XO5EUYAGZTWHYAFG6XXBJW X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass <simon.glass@canonical.com> X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 00/36] video: Add multiple-context support to vidconsole (part F) List-Id: Discussion and patches related to U-Boot Concept <concept.u-boot.org> Archived-At: <https://lists.u-boot.org/archives/list/concept@u-boot.org/message/UJVO4PVIF2XO5EUYAGZTWHYAFG6XXBJW/> List-Archive: <https://lists.u-boot.org/archives/list/concept@u-boot.org/> List-Help: <mailto:concept-request@u-boot.org?subject=help> List-Owner: <mailto:concept-owner@u-boot.org> List-Post: <mailto:concept@u-boot.org> List-Subscribe: <mailto:concept-join@u-boot.org> List-Unsubscribe: <mailto:concept-leave@u-boot.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit |
| Series |
video: Add multiple-context support to vidconsole (part F)
|
|
Message
Simon Glass
Jan. 20, 2026, 11:17 p.m. UTC
From: Simon Glass <simon.glass@canonical.com>
At present expo textline objects are handled in a rather ad-hoc manner.
When a textline is 'opened', the text is written out using vidconsole and
the state is saved in the scene. When the user types a character, the
state is restored, the character is written to the vidconsole, then the
state is saved again. It is basically using the command-editor code.
If the user press Ctrl-A, a suitable number of backspaces are written to
move the cursor to the start. If the user then inserts a character, the
entire string is written out (which is probably undesirable) and then
backspaces are written again. Typing into a lineedit shows the same
characters on the text console.
This approach was designed for the text console and extended into the
vidconsole. It was further extended into expo as it is fairly simple and
saves code space.
However it is not really suitable for a textedit, which may have many
lines of text and needs to support moving up and down through these
lines. Ideally we would separate expo a little from the CLI editor.
As a start towards resolving these problems, this series adds support
for multiple, independent vidconsole contexts. This enables expo
text-input objects to each have their own cursor position, font settings
and CLI line state, allowing multiple text fields to operate
independently on the same display.
This series:
- Adds a context parameter to vidconsole functions throughout the stack
- Moves CLI line state into text-input objects for expo
- Maintains a list of contexts in the vidconsole uclass
- Centralises context allocation and freeing in the uclass
This is preparation for supporting multiple text-input fields in the
expo menu system, where each field needs independent cursor tracking.
Size growth is approximately 300 bytes on Thumb2, for boards which
enable command-line editing and expo.
This series also includes a fix for LUKS in CI.
Simon Glass (36):
test: Fix LUKS device-name collision in CI environments
video: Pass context to vidconsole_set_cursor_pos()
video: Pass context to vidconsole_entry_start()
cli: Split initial-text output from cli_cread_init()
video: Add per-device vidconsole_readline_start/end()
video: Pass context to vidconsole_readline_start/end()
expo: Move and generalise scene_textline_send_key()
expo: Add CLI line state to text-input objects
expo: Use text-input CLI line state instead of scene's
video: Pass context to backspace() method
video: Pass context to vidconsole_newline/back()
video: Pass context to console_fixed_putc_xy()
video: Pass context to vidconsole_putc_xy()
video: Pass context to vidconsole_output_glyph()
video: Pass context to vidconsole_escape_char()
video: Pass context to get_cursor_info() method
video: Pass context to vidconsole_show/hide_cursor()
video: Pass context to vidconsole_put_char()
video: Pass context to vidconsole_put_string() et al
video: Pass context to mark_start() method
video: Pass context to select_font() method
video: Pass context to select_metrics()
video: Pass context to console_alloc_cursor()
video: Pass context to vidconsole_set_bitmap_font()
video: Pass context to set_bitmap_font()
video: Pass context to console_set_font()
video: Pass context to get_font_size()
expo: Pass context to draw_string()
expo: Pass context to scene_txt_render()
expo: Pass context to scene_obj_render()
expo: Pass context to scene_render_obj()
video: Maintain a list of contexts in vidconsole
video: Allocate the cursor in the uclass
video: Pass a cursor pointer to console_alloc_cursor()
video: Move context freeing to uclass
video: Move context allocation from drivers to uclass
board/atmel/common/video_display.c | 2 +-
board/kosagi/novena/novena.c | 2 +-
boot/expo_test.c | 22 +--
boot/scene.c | 83 +++++----
boot/scene_internal.h | 13 +-
boot/scene_textline.c | 47 -----
boot/scene_txtin.c | 80 ++++++--
cmd/font.c | 6 +-
cmd/video.c | 6 +-
common/cli_readline.c | 16 +-
common/splash.c | 2 +-
drivers/video/console_core.c | 46 +++--
drivers/video/console_normal.c | 47 +----
drivers/video/console_rotate.c | 24 +--
drivers/video/console_truetype.c | 80 ++++----
drivers/video/vidconsole-uclass.c | 276 ++++++++++++++++++----------
drivers/video/vidconsole_internal.h | 49 ++++-
include/cli.h | 12 ++
include/expo.h | 2 +
include/video_console.h | 120 ++++++++----
test/boot/expo.c | 12 +-
test/cmd/font.c | 6 +-
test/dm/video.c | 114 ++++++------
test/py/tests/fs_helper.py | 7 +-
24 files changed, 621 insertions(+), 453 deletions(-)