From patchwork Tue Jan 20 23:17:58 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1704 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=1768951259; bh=Ms/3xzN8PISHow7+CVA5ovzzCPU05+P7uJzQET0zCOg=; 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=k6WsAbI6XN+lviC914g6bNyeEUYCXgdiqqeDT8drE95UKlDmIL/t41HPazLVKYyKM 0Fxk1zQ7sRa4KN9h8XyhpNb4IXFnrzZapryJs7tvxxqsM0wpVZ4UJ/WryQEWXY6mCI zD0+1ET3qk72yIzPQKLfLPj1EASPASuEdv5ByZQkkXK74tBDlM86XIV37pFMsNE05M E3tY/fnR//DPxp4vktzY0LNiHoH+170wCeX0q7DfqszG/KzSYM5g6YivIqQTI5JFdG MmpnQENKpuKeF+aCMrDy3A2ENQOOdvI7Fn/OAq4gElucFDUdvv1iXcxiST7C4VNGs1 7Y59Jx8qWIn/A== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 92F52695A0 for ; Tue, 20 Jan 2026 16:20: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 m5a_jRCU9fnA for ; Tue, 20 Jan 2026 16:20:59 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768951259; bh=Ms/3xzN8PISHow7+CVA5ovzzCPU05+P7uJzQET0zCOg=; 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=k6WsAbI6XN+lviC914g6bNyeEUYCXgdiqqeDT8drE95UKlDmIL/t41HPazLVKYyKM 0Fxk1zQ7sRa4KN9h8XyhpNb4IXFnrzZapryJs7tvxxqsM0wpVZ4UJ/WryQEWXY6mCI zD0+1ET3qk72yIzPQKLfLPj1EASPASuEdv5ByZQkkXK74tBDlM86XIV37pFMsNE05M E3tY/fnR//DPxp4vktzY0LNiHoH+170wCeX0q7DfqszG/KzSYM5g6YivIqQTI5JFdG MmpnQENKpuKeF+aCMrDy3A2ENQOOdvI7Fn/OAq4gElucFDUdvv1iXcxiST7C4VNGs1 7Y59Jx8qWIn/A== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 82A016959D for ; Tue, 20 Jan 2026 16:20:59 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768951256; bh=yhug/X0/PY4gZqct3RAxtoQsyUkqwRTj14PgNX7DPbI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=q/r1N8E9ZFiok7ZA3JwTY39r+X9Ryz5U8Bd72/TbkDI40NA0jQ1TK7YQk9yDtwNxg tusrlTgemL4UDOgPBabx+DHTpn5gq8HoQYfoOTMwEN8oTY9AE63MePqbk9SqfVK63o CayB0Xt63b7TbHaiLPsl+fH0TFxpvHb424u0RxtYbK5Xurk0nIwlney8aIGc/fDoU/ 3IdUUWG6kjMsQAg/EkEankB164qN0j8jjr3Xpusis3MghBZEVNCEYBeN7Yw9VMxYI+ 3QAVZOz+jDT7f3/qipe0xy2OFHVuhJsXecqh8x4qWtnXvBYRckdLolmLG9B8GH8pRs y7RAbh4sbBpcQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 825A869597; Tue, 20 Jan 2026 16:20: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 10026) with ESMTP id 77JsgAgPFBpJ; Tue, 20 Jan 2026 16:20:56 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768951251; bh=E4Gpt8BpQI+821kfm/K8i3U9aaoIzgkf1j4Ew2pVTZs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IFFXIAr/b/PCpYXHftXqVHEHsVgvNode+ndahaSVDUcvR6UW4ZEkFw09ctLzX3wfn z3d22eQNnp2xj71xlUDJQqmPF+FB6VGrZMWKWKcjLZKYYVl9mB7is9T90AHb2jBznx Y/H7RVPJ4LavO5+NOrrstQG8ZbEFELMvYaeH+lFJ3onYln49iT5mNI1PdKe40BlVTV roXcLz9Ja2PrkE7ouQaQwsA5LdFnME3l1KpM2gq+Lzh+l2IwaAjGnvE45sWdPgUTSq KCj2dWtzwl+zeK3NJ4PiPaiBmLBE8M0s9CXJ3fETs9mgz9y3pObAyF86LDR5zGPGYE Z9DGK5fLbiXaA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 84C6A6959F; Tue, 20 Jan 2026 16:20:51 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Tue, 20 Jan 2026 16:17:58 -0700 Message-ID: <20260120231814.2033069-32-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: C6N2TTZCEJ44HYQN2ZVZ4NLYRSNVEYIP X-Message-ID-Hash: C6N2TTZCEJ44HYQN2ZVZ4NLYRSNVEYIP 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 31/36] expo: Pass context to scene_render_obj() 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 ctx parameter to scene_render_obj() to allow passing in a specific vidconsole context. If NULL, the default context is used. Update the caller accordingly. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- boot/scene.c | 4 ++-- boot/scene_internal.h | 3 ++- boot/scene_txtin.c | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/boot/scene.c b/boot/scene.c index 45550326d07..7cef20dbb1b 100644 --- a/boot/scene.c +++ b/boot/scene.c @@ -969,7 +969,7 @@ int scene_arrange(struct scene *scn) return 0; } -int scene_render_obj(struct scene *scn, uint id) +int scene_render_obj(struct scene *scn, uint id, void *ctx) { struct scene_obj *obj; int ret; @@ -979,7 +979,7 @@ int scene_render_obj(struct scene *scn, uint id) return log_msg_ret("obj", -ENOENT); if (!(obj->flags & SCENEOF_HIDE)) { - ret = scene_obj_render(obj, NULL, false); + ret = scene_obj_render(obj, ctx, false); if (ret && ret != -ENOTSUPP) return log_msg_ret("ren", ret); } diff --git a/boot/scene_internal.h b/boot/scene_internal.h index 733f0c0f6ca..d9ca1fef90e 100644 --- a/boot/scene_internal.h +++ b/boot/scene_internal.h @@ -348,9 +348,10 @@ int scene_send_click(struct scene *scn, int x, int y, struct expo_action *event) * * @scn: Scene containing the object * @id: Object ID to render + * @ctx: Vidconsole context, or NULL to use default * Returns: 0 if OK, -ENOENT if object not found, -ve on other error */ -int scene_render_obj(struct scene *scn, uint id); +int scene_render_obj(struct scene *scn, uint id, void *ctx); /** * scene_render_deps() - Render an object and its dependencies diff --git a/boot/scene_txtin.c b/boot/scene_txtin.c index da42f364f39..9b8edcc6439 100644 --- a/boot/scene_txtin.c +++ b/boot/scene_txtin.c @@ -75,7 +75,7 @@ int scene_txtin_render_deps(struct scene *scn, struct scene_obj *obj, ret = vidconsole_entry_restore(cons, &scn->entry_save); if (ret) return log_msg_ret("sav", ret); - scene_render_obj(scn, tin->edit_id); + scene_render_obj(scn, tin->edit_id, NULL); /* move cursor back to the correct position */ for (i = cls->num; i < cls->eol_num; i++)