| Message ID | 20260116171424.398597-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=1768583696; bh=WtSZEDTpkXdsnS1lwflSNbG8r9fSLNhiTMyllqa5aNQ=; h=From:To:Date:CC:Subject:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=UwD4cgXFkT6L6uBoIVPBBCW6jaXIVNgCJqJ/gbUzcxZY8GbddabMynW40Rij/zEsr RR1AVWr8QPIL6JxceJkamF7i3+Vr0dTmKgQTb2bGqBx+hZJ0cBqfRR1VCIcYUHOfZ3 focjzuH+jtLZJddjypa4Dtpu2dy++XumglGTKuiE/a6n9GaWvYizDkyfKNrxZcm3Dp UyBkhK7W6p0ArR/Xt05hxtUzIgVWTskUP8lX+07XPXBLYcWkTA73p9iVD6eaSYejl8 Z65MC9uSsiGr0txfULBONuwTN6F5fExwbQOPuFarzZfWhjuf3MKv40CbBnyHm+ro2w cIj1qyKj+cddQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 02310693B0 for <u-boot-concept@u-boot.org>; Fri, 16 Jan 2026 10:14:56 -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 yrW-9Oz8iR32 for <u-boot-concept@u-boot.org>; Fri, 16 Jan 2026 10:14:55 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768583695; bh=WtSZEDTpkXdsnS1lwflSNbG8r9fSLNhiTMyllqa5aNQ=; h=From:To:Date:CC:Subject:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=CeHUBT7XDjm+CaNsv/y4qLg0+8CxiPan7N7fRJujNfjwXMWDpQzbopkJpWCClES+b 2DJZ8Lwj2OgMCrBNfbw08R4ifk+C3Pftz8BQK4HJffxcFf21dHwmto0hMu8o1/CFvU KxhsgDeDu4JuC0OGGjZwy1QbMleMytGEwKpsCylHa8XcxChk/dGnnnArg/paa1tRfz /XlWSjr6tB8WUloKxLhYoUKH5YRsUWi4wK1+KPKpj++jK3qU/v4k2gsAIPYzlqgKC5 oylSOTdnb+e4OIdKp256QEhE8x1p/FaRx4sb7bt4+BTxAHLet8d9kViMpApakSQuaO 0BKIwoY2Vc7bw== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id D2F386932F for <u-boot-concept@u-boot.org>; Fri, 16 Jan 2026 10:14:55 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768583679; bh=DjLN3cGR3DtMIwRemgkjXYWyfr9GJIrLV6FV+1h8K7o=; h=From:To:Cc:Subject:Date:From; b=AXiJAHW4tWf/Im4m1+11QlOtjW2xZI8bHzsIoOo5tX2b5pyM75Lg0saXQOIQUG5vx e0ozkFDmrwKCWLRG5CipW457WYr6RN5e1sgFs+UVn73cBWI44uQeeUD/+XlNvkbT4F RUVz29GLNHho78H7pn5diN5Oq5hmf0/nffcrpxYMe9xrusupOFqZvFkZbzrX8HAxCF ykfz3+dgEaKGy2EFzArDXruw5tBoeuWmar3OLeVrUuLydrinr9BP+Sc9GKSqOsoz3p ncdhx6MjbydaXyvD0VIJzGa2UTN9p1KprmhGRYX9doo1zhgYiHn7MkuGZwtTimPxyZ yUq//bn52QPMQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id CDEDA6932F; Fri, 16 Jan 2026 10:14:39 -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 kdFTfdMkMrOx; Fri, 16 Jan 2026 10:14:39 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768583675; bh=kPV8IjNIkqgqvAu3SzsgqZ/k3SIVydnCJ8LbVADryAc=; h=From:To:Cc:Subject:Date:From; b=Wiu7XNrK2AuNJyLEECkpEXbVKSVRBhBhvSPVEDrW+0BvyXCN8+5To30CB+TayHt6i O4FfIrZLPAcrSwE+6w+0GK22RvhQlXBZwaDOEM8hLWebmqIAK+EvyxwEtoKE0q9fI+ cvBVYu7FLdR6cdZ790D9I/Qn097TYqBzO9TWYzAXEdBWAYTnYJfT5uJAkr+cPL4BnY 3Szem6VjheAO7rXwUN1/7qpyIe9gFCxZD3BcIAJOLllzGoDTpdHFkogVDXiobJ9F6Z Ad5gfYe5SEb66xW0XTyUw8A4fBlqL89Vv4ryvb74ka/FClNxsksVNPlmpTTdejYXgQ v/mdqnPZvOPFw== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id D51AF6913F; Fri, 16 Jan 2026 10:14:34 -0700 (MST) From: Simon Glass <sjg@u-boot.org> To: U-Boot Concept <concept@u-boot.org> Date: Fri, 16 Jan 2026 10:14:02 -0700 Message-ID: <20260116171424.398597-1-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Message-ID-Hash: 3KHO2NKCVRBB7SBSF6RWQVL7W5MIT5BU X-Message-ID-Hash: 3KHO2NKCVRBB7SBSF6RWQVL7W5MIT5BU 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/14] video: Add per-client context to vidconsole 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/3KHO2NKCVRBB7SBSF6RWQVL7W5MIT5BU/> 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 per-client context to vidconsole
|
|
Message
Simon Glass
Jan. 16, 2026, 5:14 p.m. UTC
From: Simon Glass <simon.glass@canonical.com>
This series refactors the vidconsole interface to support multiple
clients with their own context. This will enables features like expo to
maintain separate text-entry state without interfering with each other.
The approach is to create a new struct vidconsole_ctx that holds
per-client state, initially embedded in vidconsole_priv for the default
context. Helper functions vidconsole_ctx() and vidconsole_ctx_from_priv()
provide access to the context.
Fields moved into vidconsole_ctx:
- rows, cols, x_charsize, y_charsize (display metrics)
- xcur_frac, ycur (cursor position)
- last_ch (for kerning)
- cli_index, xmark_frac, ymark (CLI entry state)
- ansi, utf8_buf (parsing state)
The series also adds ctx_new() and ctx_dispose() operations for drivers
to allocate and free per-client context, with implementations for both
the normal and truetype console drivers.
Simon Glass (14):
video: Add empty vidconsole_ctx struct
video: Add vidconsole context creation and disposal
video: truetype: Restore pos_start in entry_restore()
video: truetype: Move per-client context into ctx struct
video: Add a helper to obtain the vidconsole context
video: Move rows and cols into vidconsole_ctx
video: Move x_charsize and y_charsize into vidconsole_ctx
video: Create struct vidconsole_ansi for ANSI state
video: Move xcur_frac into vidconsole_ctx
video: Move ycur into vidconsole_ctx
video: Move last_ch into vidconsole_ctx
video: Move cli_index into vidconsole_ctx
video: Move xmark_frac and ymark into vidconsole_ctx
video: Move ansi and utf8_buf into vidconsole_ctx
board/atmel/common/video_display.c | 3 +-
boot/expo_test.c | 10 +-
common/console.c | 6 +-
drivers/video/console_core.c | 3 +-
drivers/video/console_normal.c | 66 +++++++--
drivers/video/console_rotate.c | 9 +-
drivers/video/console_truetype.c | 186 +++++++++++++++----------
drivers/video/vidconsole-uclass.c | 214 ++++++++++++++++++-----------
drivers/video/video-uclass.c | 4 +-
include/video_console.h | 167 ++++++++++++++++------
lib/efi_loader/efi_console.c | 10 +-
test/dm/video.c | 22 +++
12 files changed, 473 insertions(+), 227 deletions(-)