From patchwork Fri Jan 16 17:14:03 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1529 Return-Path: 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=1768583699; bh=OXizIclYu1GHzNAWv0afHCqkoVc2G2rb55ESnpmRdBE=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=UvValsnDMM66AbTJnicTr9TwJ/JQtewb5HYTRnx0bGJOfhQYSIuyoiBXhad+eByQp 7/H6W3n/h+gl9MDLcXta7i97ldfOQpVj6NEAsW7h+u4wxNjWhzgVRM97lUUS7502xF dHi3xedb9DrHRoXgrTrDC0QgRI8d6vn/IQmeO5Cj2Ggq2Xt4kcF+42GwjNp6dPButb I4IBD/GWRVDrGKWmcL2ZAia7XQokvitdV4UNtIVEDnijebJ5iHiFa3d/KWIDUtYsFY mSnp3TfGHlyBN5BlzNVuqSoxTxFG0s/HIqv2QdARhur3zdulOJHO1QNsoZrPKWbTy1 3yqwgcLGnn5cw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 0DE406913F for ; Fri, 16 Jan 2026 10:14:59 -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 AGji_xlRfb1L for ; Fri, 16 Jan 2026 10:14:58 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768583697; bh=OXizIclYu1GHzNAWv0afHCqkoVc2G2rb55ESnpmRdBE=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=GljAbvPlsPT4k4ginjgaU+5k+Va9WEP98wLpYw5yS92aYtvkmqxw83xhfgKVdWf1j 9lFJ5AyimzIxNkRuqHBkQYTquS9K1VTt/FLh8aucQLa8VpwyjVjJY9/vOBMmAnPDxe 2DiqpT0voWm4iRc6t1gDR+ikUzo1BdiP7wW/Ru/nQlyVX0viGZsrq1t/qRN1tkdTz/ WBDu94giwMGUAlpS+LzpLwZw6apCggcgfTztmLpq5pT3dQP9YaLzJ8O5WjHLb8JVWg qxXJeEt1b7uHi4hF1ujEmGvfRf2NCNBBM/5RaSRuxO8kFLeeWZxozmIdKBLg7nCm7L +SSIOOuMDWAOw== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id B8A5B693C0 for ; Fri, 16 Jan 2026 10:14:57 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768583686; bh=2859VhInrNKtrmxCsIbWaodiHrbjL/zc/xltNcmdHjI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WX9+u4K12R+EIGgcuvQ1CsgMxrdgFBLV/lsoIimmPYfM3Tc8Y/Gg5wbQKEEDHsDPS VLtpp9EUzQpahIODV124VCl5FpsKNctTkTklKF9bou9aI37wC9wEmGnGgCId8jmOpm Icz210MGfwE9ymVsclha+Ksc7nVqFFl+WG1jd1nFzpc6u5YVqltQLmRQEhotrdmlMs oFSV8YjijT9+NDHehGm94KZqolqk/oMbrJyQjeDl8Uuv7C9CxOgLEAioS08E0bWN2/ x8nYxoKWix7ot0DF1IGmyMXl/DF5iaY0KRE/SgDwdbSnekm0BO4KBprTH424FELVmW 2LPLmHL+M4NFw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id B2E516932F; Fri, 16 Jan 2026 10:14:46 -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 MIAxlR3m5SEN; Fri, 16 Jan 2026 10:14:46 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768583681; bh=ajjtPnkYkxqlApBvTVvgSV9ayXjifsbLAWDCSKtpG2k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UHwxHKprQCmeWVtL0bCFuquBFV8nIHXXIr7pzI5dpcQtuaIUHJY4+IZHb1hu/BuiL lHjigp/NV36+MkaCjPJ57qs9mkiX9RI+PontEceURrZfHt0fl1LFAHdKYV2aSklwNF GGK2Q9CECAc0D6TMEel40MqYn2BF745UWOcYfTxEOIkvAGszaKYgwL6Lqcw+gRtJ2q 7TSgHZxJJt+wROxDhxxG1KyYrup2FK/PoarLGx6zBBon6IWudHoXR29emEP7cTiDHQ Ps6Q7jZ4fSoh89CaXQiTFv+p7j4oYEYStUXp2XB5k/CKUF10qJ1es826yF5V1s9QlS 18wvoAeuPSv8A== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 1D70E6913F; Fri, 16 Jan 2026 10:14:41 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Fri, 16 Jan 2026 10:14:03 -0700 Message-ID: <20260116171424.398597-2-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260116171424.398597-1-sjg@u-boot.org> References: <20260116171424.398597-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: QD4SD7KTRR3A5NBSYF2YS34PRI4SMCYX X-Message-ID-Hash: QD4SD7KTRR3A5NBSYF2YS34PRI4SMCYX 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 , "Claude Opus 4 . 5" X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 01/14] video: Add empty vidconsole_ctx struct List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass Add a new struct vidconsole_ctx to hold per-client state for video consoles. Add some driver-specific structs as well, so that each driver can build on the common context fields. This is preparation for supporting multiple clients with their own context. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- drivers/video/console_normal.c | 9 +++++++++ drivers/video/console_truetype.c | 9 +++++++++ include/video_console.h | 9 +++++++++ 3 files changed, 27 insertions(+) diff --git a/drivers/video/console_normal.c b/drivers/video/console_normal.c index 8f936191dd8..cfe6196fced 100644 --- a/drivers/video/console_normal.c +++ b/drivers/video/console_normal.c @@ -14,6 +14,15 @@ #include /* Get font data, width and height */ #include "vidconsole_internal.h" +/** + * struct console_ctx - context for the normal console + * + * @com: Common fields from the vidconsole uclass + */ +struct console_ctx { + struct vidconsole_ctx com; +}; + struct console_store { int xpos_frac; int ypos; diff --git a/drivers/video/console_truetype.c b/drivers/video/console_truetype.c index cbc4473207c..c2d165a8b8e 100644 --- a/drivers/video/console_truetype.c +++ b/drivers/video/console_truetype.c @@ -203,6 +203,15 @@ struct console_tt_metrics { double scale; }; +/** + * struct console_tt_ctx - Per-client context for this driver + * + * @com: Common fields from the vidconsole uclass + */ +struct console_tt_ctx { + struct vidconsole_ctx com; +}; + /** * struct console_tt_priv - Private data for this driver * diff --git a/include/video_console.h b/include/video_console.h index ac04aeb3aef..0acc7ab2737 100644 --- a/include/video_console.h +++ b/include/video_console.h @@ -73,6 +73,15 @@ struct vidconsole_cursor { uint index; }; +/** + * struct vidconsole_ctx - per-client context for a video console + * + * This holds per-client state for video consoles. It can be used by clients + * to maintain separate contexts for different text-entry operations. + */ +struct vidconsole_ctx { +}; + /** * struct vidconsole_priv - uclass-private data about a console device *