| Message ID | 20260120231814.2033069-23-sjg@u-boot.org |
|---|---|
| State | New |
| 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=1768951218; bh=6qXxHN1NgzsQD8/3pEQZpiQmyJvVSrtHb0M3eXJVbzI=; 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=cV0162ti5kN5bsfaJ5r43+9nmaFKgYFO3BGczZIhqCnPJgBVmwTyFKD2LevCnBGC8 PPGV31vkxh1vATzbepr9MjQMLbQls7FcYM4f4cf5X28J2TicSkffYt+keXcsHyJH+z 2lEIEfyEzLB4/IPavuWV8CBtUlqopTzzAyWsbiXmlPeXEX8PsF1V5YGJBL3fXljc6m KB7P9hb4dKL20kDDSuDb8XRpAE4Xy85hz5DrqFF8qL1HQlKvJXg+SrT7MKWwX5N3TW alIN+2K1sz2MujQWhRJJqw+4bhqiFf83V2uU/0bgN0lIHkVF2DtCPDCcm8IrNkXXd4 aRYz76YSrMqOw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 036A46913F for <u-boot-concept@u-boot.org>; Tue, 20 Jan 2026 16:20:18 -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 Wh5EBa_iI5K1 for <u-boot-concept@u-boot.org>; Tue, 20 Jan 2026 16:20:17 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768951217; bh=6qXxHN1NgzsQD8/3pEQZpiQmyJvVSrtHb0M3eXJVbzI=; 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=RjyjwvXPT7MIBBAuZ4jjBv4pxdREg0tmf/6oH/hNqUCnCQtZm+mtS9TrRFe+yGO+0 10gGhXki40CIIcEKvgegD2j004KAXvfJT0KCn7x+qnPNq6aJDP72Vp08+o4q6/TasV 0Qqff0pNE28FFEDF3T5V23dI7Jl0U78CVXKEO8jOcWN7Q7Hn0YVEyTNV/yTPHuhqvq uA9g/narZzA/YHayBfVl9Jkbsi0+ogwPs+n+bhro15N5+T21AAGfvoiXUX0HZfwiF/ AUrCsunFfymcJjW/MTtZBPOgtzAVMjPgHLfdCoKiIhNlYlMl0HiAcUt0SSL/Ok8Uz5 BaJG5lxS7OrZA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id E63826957E for <u-boot-concept@u-boot.org>; Tue, 20 Jan 2026 16:20:17 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768951216; bh=o1oRVYIAS9pDKHvNSnNSIpw6eME8DD3xoNn/A1twpGA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NjcjoUMrYbeB+UFPwiewbhnfsXAB6qEcYA6h4pNKWbJ+hxOjhqbuiSwNrkNxK7pCb AnQ3271ibM7D4VK4bfSK+WEftHtDww5ql8A6D5H8gvvL1Fh+SF+iXB112HzODHewqU 8PIeUDqBg8bX1gqtng0F3khjHyNkZStxVDIHBOhkmIE5ChcwFMK9g9MGoKLxIVyAHC V19wVlOyozAY8xkd1Q0ZmhoGoYyUEW3NhTUp8PrqDY86aTTZulefe6kSt0tH+7rEh9 Re+w0mxARKMWLgRTQR6Z/+KJ6TzNZ9ZuXYKXlgGXEUE1F6TsEQtcujqLpdELtRtaQk d35BT2mx3EC6A== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 7B277693E3; Tue, 20 Jan 2026 16:20:16 -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 Frx0KTVws9cA; Tue, 20 Jan 2026 16:20:16 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768951212; bh=1OUOe2zjfTaOgRakAzcaEECFp2Ux4PCYkoYkCPrGXmQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Bp9Gy1sXKIFpHvQ5lKU6VxfBD6Oj6NLuHXe9nAT+PIkcpM405vNGbFqUk0hYLrBJ7 vJlKIiNw3iTXPEhDjHlZagsMzLJyu3mZmqAEMw6ixHUrLY5zWqoieCFg/FCzwcAL/P RSnEBPfG3PUvPmzWtx3s9kBbTO7mc9872HE9Lq+5dKK+3A+leyHtUbGZiMYJqUtsGn +QuwoWL01R18cEzBhgMvzPhj14XnRYayufsJp7zDfaONQkANi2kKVKl0Xik/+/hNm5 pt7xq6PvQgGMzpof9cgc87NmA74wDH4qTwud5g5UqR45df9QSiZmndZC5nuApGSWLS uU93/dFCd8a4g== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 326D36913F; Tue, 20 Jan 2026 16:20:12 -0700 (MST) From: Simon Glass <sjg@u-boot.org> To: U-Boot Concept <concept@u-boot.org> Date: Tue, 20 Jan 2026 16:17:49 -0700 Message-ID: <20260120231814.2033069-23-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260120231814.2033069-1-sjg@u-boot.org> References: <20260120231814.2033069-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: L54V3EQQ3FLRYUPIDYQHJUCODZ3OES7W X-Message-ID-Hash: L54V3EQQ3FLRYUPIDYQHJUCODZ3OES7W 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>, "Claude Opus 4 . 5" <noreply@anthropic.com> X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 22/36] video: Pass context to select_metrics() 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/L54V3EQQ3FLRYUPIDYQHJUCODZ3OES7W/> 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)
|
|
Commit Message
Simon Glass
Jan. 20, 2026, 11:17 p.m. UTC
From: Simon Glass <simon.glass@canonical.com> Update select_metrics() to take a context parameter so it can operate on a specific context rather than always using the default. Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: Simon Glass <simon.glass@canonical.com> --- drivers/video/console_truetype.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/video/console_truetype.c b/drivers/video/console_truetype.c index af880ad5597..4dd382055b2 100644 --- a/drivers/video/console_truetype.c +++ b/drivers/video/console_truetype.c @@ -913,9 +913,9 @@ static void set_bitmap_font(struct udevice *dev, com->tab_width_frac = VID_TO_POS(fontdata->width) * 8 / 2; } -static void select_metrics(struct udevice *dev, struct console_tt_metrics *met) +static void select_metrics(struct udevice *dev, struct console_tt_ctx *ctx, + struct console_tt_metrics *met) { - struct console_tt_ctx *ctx = vidconsole_ctx(dev); struct vidconsole_ctx *com = &ctx->com; struct udevice *vid_dev = dev_get_parent(dev); struct video_priv *vid_priv = dev_get_uclass_priv(vid_dev); @@ -998,7 +998,7 @@ static int truetype_select_font(struct udevice *dev, void *vctx, if (ret) return log_msg_ret("sel", ret); - select_metrics(dev, met); + select_metrics(dev, ctx, met); return 0; } @@ -1297,7 +1297,7 @@ static int console_truetype_probe(struct udevice *dev) return log_msg_ret("add", ret); ctx->cur_met = &priv->metrics[ret]; - select_metrics(dev, &priv->metrics[ret]); + select_metrics(dev, ctx, &priv->metrics[ret]); debug("%s: ready\n", __func__);