From patchwork Sat Oct 18 08:40:59 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 614 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=1760776940; bh=sCQR6NaPI5y5tJlosQ8jSAHstxGYbjK8cqm0QmQMReM=; 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=foTIdkxmJtObrLDZi7dY+ud+AR7ofdez/oRse5A8ivuMk1zBYrfSGoQZM3VovB+MZ TDXbXAXI+MszZ4cWuKJyaMpE4T8fLcLszfrR9RJ+qNA1QpqHPbDJN3SVW5oAfiJTt0 YyX3FCIz3sZ5OjwFm6OJbB16ek65bGLxRsDcXfpv4RCPyhEbr2x+4J00yLUbX4lfUT g/9lajdQbo9qty2KQdG8IHX9ymunKxc2sONJxYKOp1YFNFSFI/9oOwxtVJtZ1Y5B2a ufVnxpIqk6tkH9sUNhQ15+dcXkKJq6w10uw581KSVBdxuGJio3pPzHFIzqcW6B9D7G SshCrqfocpUFQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 5E6876814E for ; Sat, 18 Oct 2025 02:42:20 -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 vMzK63H1sjeL for ; Sat, 18 Oct 2025 02:42:20 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1760776939; bh=sCQR6NaPI5y5tJlosQ8jSAHstxGYbjK8cqm0QmQMReM=; 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=mNp41Kx08jkZCzZUdNxG79zCdWTY7rZRR95uS3AVM3Ek47J4A2x6Fmk5JtNK+igdj 0EaX0BvIhOS6Luu8WkicZpJaoclr3EIHxykv4AlrumVMOTkElUIHgjyOH5mO97+ABZ jM0+ltQuRp2FpWp1C/K8jbI5xtw8wEtgULtHXwwO4QYDkZyG9EBvWi3oEJAaQ14WOG NcuPMw1HvIbG16EY83AyugYnhENwGQW4xDfibAvNL9If7t7XdSjgG+YPTIiNYaeFxH AeANEjRd7PihJEomqe95OinZ+YTdDwoW9xifAF8WYflxYCElx33PvXc8yCexBBYApH u/gcQbf80HL/g== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 50229681BB for ; Sat, 18 Oct 2025 02:42:19 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1760776936; bh=EtOydRtZuwdqRTvuDy9gVZIVkrgtnwPBPPvZwbvrq58=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OHmiJZxBuCXTnteiHM/k+Zo45aMZqwXf1lQb0k9ynY1hwK3bgG6RStJ8ulQ1a9Diy 0jxEbe8kjptDWs5doHnP9kcoCMTa4deG1CkNLdynBkYpfOZXzrIf2N+Oj/aIKVEcqi vhhsfo5ktSNM4L3bMl04gYAj+J14srWMGha7zOktORQ1EwtVrYKMkQ9hvAjUNUcYIE DsU1pOjykub+GYCpuvwklxootHFaunHGJ8IDqQ3OdMWwZzjl9Mj4006UMD9eOwNbB/ oFMiXUGY/TGfuCz5CavGh3D2YpW6w7ZYsgOHix9IoTP5wi1eAY7R4nH9UdIwaC3nbM UH8/Bz/p63tqA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id B57C968109; Sat, 18 Oct 2025 02:42:16 -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 10026) with ESMTP id gwk9a0j-BoAj; Sat, 18 Oct 2025 02:42:16 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1760776935; bh=EWnMjjRwv+BMFUGsiRfGDxZZVGPVczTjcHDDjLP6cnQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JPmFFp2uQhrPhUVFcpoB+0XIWveqFQjnPKtvdx2y1sWQopllC6i61L/IaQUQbo3nn DpgSBYMy+hifQ1r5exZiI8kjP9uyxLGeU2YIwHu2UAKbfUZP18AYvPo+TrTXnKeZ2R 60lFJqcX4Hml2QHoDRiTNZoZaJaw03lPIX2PGVw3l7vfRwlTmfzI26zFIcEichHeA1 liAzf7nZVv8bnMKbVV8XoHlRhmlhtCmsBiSBE9Yed9VO6rL/2iBizpUAPK40sai7bU 4AvGz43Z6kKDmeZ5rDUY3FdDHRfpEzgGr4ldwl6uHgj11Uhup6JR/8KUl594fP6EjU cXoqZ/HrbVESQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id A62E96814E; Sat, 18 Oct 2025 02:42:15 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Sat, 18 Oct 2025 02:40:59 -0600 Message-ID: <20251018084117.1798704-15-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251018084117.1798704-1-sjg@u-boot.org> References: <20251018084117.1798704-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: YRDMWO6KJEYXSUFWE6MC76LPNCPLYCBR X-Message-ID-Hash: YRDMWO6KJEYXSUFWE6MC76LPNCPLYCBR 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 X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 14/24] bootctl: Provide an option to slow the display refresh 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 When a mouse pointer is not used, there is typically no need to refresh the display unless something changes. Add an option to allow slow refresh. Signed-off-by: Simon Glass --- boot/bootctl/logic.c | 3 ++- include/bootctl/logic.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/boot/bootctl/logic.c b/boot/bootctl/logic.c index c0b7b8ae3d5..e2ec2c679ec 100644 --- a/boot/bootctl/logic.c +++ b/boot/bootctl/logic.c @@ -219,7 +219,7 @@ static int logic_poll(struct udevice *dev) priv->refresh = true; } - if (priv->refresh) { + if (!priv->opt_slow_refresh || priv->refresh) { ret = bc_ui_render(priv->ui); if (ret) return log_msg_ret("bdr", ret); @@ -286,6 +286,7 @@ static int logic_of_to_plat(struct udevice *dev) priv->opt_labels = ofnode_read_string(node, "labels"); priv->opt_autoboot = ofnode_read_bool(node, "autoboot"); priv->opt_measure = ofnode_read_bool(node, "measure"); + priv->opt_slow_refresh = ofnode_read_bool(node, "slow-refresh"); return 0; } diff --git a/include/bootctl/logic.h b/include/bootctl/logic.h index a0c2ab9f496..1aefac29128 100644 --- a/include/bootctl/logic.h +++ b/include/bootctl/logic.h @@ -26,6 +26,7 @@ struct udevice; * be used to boot * @opt_autoboot: true to autoboot the default OS after a timeout * @opt_measure: true to measure loaded images, etc. + * @opt_slow_refresh: refresh the UI only when needed * * @state_loaded: true if the state information has been loaded * @scanning: true if scanning for new OSes @@ -55,6 +56,7 @@ struct logic_priv { const char *opt_labels; bool opt_autoboot; bool opt_measure; + bool opt_slow_refresh; bool state_loaded; bool state_saved;