From patchwork Tue Oct 14 11:12:43 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 590 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org Authentication-Results: mail.u-boot.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=UQuYwfed; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id D5DE468147 for ; Tue, 14 Oct 2025 05:13:44 -0600 (MDT) 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 nkn2glRSQ23G for ; Tue, 14 Oct 2025 05:13:44 -0600 (MDT) Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 8B14F68112 for ; Tue, 14 Oct 2025 05:13:44 -0600 (MDT) Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 5DB1368148 for ; Tue, 14 Oct 2025 05:13:38 -0600 (MDT) 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 K_h-RdagufrI for ; Tue, 14 Oct 2025 05:13:38 -0600 (MDT) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.166.174; helo=mail-il1-f174.google.com; envelope-from=sjg@chromium.org; receiver=u-boot.org Received: from mail-il1-f174.google.com (mail-il1-f174.google.com [209.85.166.174]) by mail.u-boot.org (Postfix) with ESMTPS id 65B8B6811C for ; Tue, 14 Oct 2025 05:13:34 -0600 (MDT) Received: by mail-il1-f174.google.com with SMTP id e9e14a558f8ab-42d8b15548eso25676905ab.2 for ; Tue, 14 Oct 2025 04:13:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1760440413; x=1761045213; darn=u-boot.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=aaUZ5zxh/Bf6pZH1lU0INbX0Plr5AEjyUC3/d1G0q2Y=; b=UQuYwfedZ6Q0Zfs5MZUC4KVmWPryAB2Ad5xRSfo8yyRDYjCRXqUQQvni0a1/qp5Pw1 TzsKiDQunYemRg/7gsqSfb67ExuwRq9c1wBouQCBRTII4c+8M6XmFoDRjx2EpHESdaHZ djtUdAjK4CTKpKCh7APmAUvt8eWQ4Wy3qo9Fw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760440413; x=1761045213; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aaUZ5zxh/Bf6pZH1lU0INbX0Plr5AEjyUC3/d1G0q2Y=; b=e9mVDZqmERN5gD8LNvbvStmjIIabb5ndQuOxMM/SbABmITwT6g6fDHIVj+//zh5YJa kzMBineusHXR6PtfVDq6ja7c6++PwE0ZKLWRt1jCceeMffzGinyrSGGjUrKBrDd6Oa01 Xh9Fi0vz+fnIE3JZvJjcwwjTJQkuZjBqCu45URC2F8N4dF2JQuHai0sxwE4LEk9rG3hi EXeJvFQS4eAIArh+6xcCl9k+Ngdu/Mvm5YUW2Vfz8rHcKLoOgCoDXFg17hoEz7USp74+ HQBNytV/W3NlNU52bOgKL/rSSa48T5ioWldLPNSkweCtOWMxaMRf3dGuAX8LY8BFwN2/ vyQw== X-Gm-Message-State: AOJu0YyWfRAMPR4V04x4Z9Va4VG5G3J/E88aSStoBdf9NcVJ0MZxWlYE DpMDdxK2UJF25rU2822NvpB4zlwKEWOERWz8tx7Mfpb0xa+j3YkJBA8ZOkPUAiS5MLI/4aJAx+3 rbko2Tk1jh/g= X-Gm-Gg: ASbGnctUUrMYHLGY7qhkmywBBKLq4JoxJvrPWG53htF5Tvl6JKuAe7xa6+CNy84Mvla WSeNMlAO8k1Zk9atSbjl001VcQ5R262feI9QXA6K/kS7crflT6GZu84yGaUgKQyVgbH0NV6TggV cz8NV6AYGZKdOselLxcNuZzKidHB7xpe4keiBDoOsDVpMXCIr4GqFtPHihc4MaH1V72DwFlmC1Q XoFODTmk58wYeWSJZM7FraogrjC8FhMgIrn07sW4Ez9HCH7or/L6GTB3GMtOD+jamfCtHBvXNV9 cVU/3zM4derajB27IfTadX6wnKSrGIh5p5MiBLer4wjI141c7+OLrmbDymu5B5esZwcD0SKAceg hOl96hRpizz/3vtoDF1U3Eq+mdxr11yQa42tGOPCq7eR9kg== X-Google-Smtp-Source: AGHT+IH65IP6TRKBfJlokpEaHs5yd4wwbxsGRr8jw/MnHbVXGhUq88lUJUVkZkjya9PhuGxuV1qKqg== X-Received: by 2002:a05:6e02:1a48:b0:42f:9dd5:3ebc with SMTP id e9e14a558f8ab-42f9dd540fbmr158478275ab.23.1760440413232; Tue, 14 Oct 2025 04:13:33 -0700 (PDT) Received: from chromium.org ([73.34.74.121]) by smtp.gmail.com with ESMTPSA id e9e14a558f8ab-430a3869174sm4608785ab.15.2025.10.14.04.13.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Oct 2025 04:13:31 -0700 (PDT) From: Simon Glass To: U-Boot Concept Date: Tue, 14 Oct 2025 05:12:43 -0600 Message-ID: <20251014111301.1059317-7-sjg@chromium.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251014111301.1059317-1-sjg@chromium.org> References: <20251014111301.1059317-1-sjg@chromium.org> MIME-Version: 1.0 Message-ID-Hash: AFHZER3UYJKHNINMGK5UEA72U6WKWOOB X-Message-ID-Hash: AFHZER3UYJKHNINMGK5UEA72U6WKWOOB X-MailFrom: sjg@chromium.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 X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 06/16] expo: Allow applying the theme to just the display List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: In some cases it is useful to apply the display-related theme elements without touching the objects. Add an argument to expo_apply_theme() to support this. Signed-off-by: Simon Glass --- boot/expo.c | 16 +++++++++------- include/expo.h | 3 ++- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/boot/expo.c b/boot/expo.c index 432e81d3552..30f3cbeb9ef 100644 --- a/boot/expo.c +++ b/boot/expo.c @@ -432,7 +432,7 @@ int expo_action_get(struct expo *exp, struct expo_action *act) return act->type == EXPOACT_NONE ? -EAGAIN : 0; } -int expo_apply_theme(struct expo *exp) +int expo_apply_theme(struct expo *exp, bool do_objs) { struct expo_theme *theme = &exp->theme; struct scene *scn; @@ -440,12 +440,14 @@ int expo_apply_theme(struct expo *exp) if (exp->display) video_set_white_on_black(exp->display, theme->white_on_black); - list_for_each_entry(scn, &exp->scene_head, sibling) { - int ret; + if (do_objs) { + list_for_each_entry(scn, &exp->scene_head, sibling) { + int ret; - ret = scene_apply_theme(scn, theme); - if (ret) - return log_msg_ret("asn", ret); + ret = scene_apply_theme(scn, theme); + if (ret) + return log_msg_ret("asn", ret); + } } return 0; @@ -468,7 +470,7 @@ int expo_setup_theme(struct expo *exp, ofnode node) &theme->textline_label_margin_x); theme->white_on_black = ofnode_read_bool(node, "white-on-black"); - ret = expo_apply_theme(exp); + ret = expo_apply_theme(exp, true); if (ret) return log_msg_ret("asn", ret); diff --git a/include/expo.h b/include/expo.h index 7307c3aef98..454889d5db9 100644 --- a/include/expo.h +++ b/include/expo.h @@ -1163,9 +1163,10 @@ int expo_setup_theme(struct expo *exp, ofnode node); * The theme to be applied must be set up exp->theme * * @exp: Expo to update + * @do_objs: Apply theme to objects as well (normally this should be true) * Returns: 0 if OK, -ve on error */ -int expo_apply_theme(struct expo *exp); +int expo_apply_theme(struct expo *exp, bool do_objs); /** * expo_build() - Build an expo from an FDT description