From: Simon Glass <sjg@chromium.org> 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 <sjg@chromium.org> --- 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; -- 2.43.0