Moving from one scene to another should not result in the scene being re-arranged. Drop this, so that tests can have more control of when scenes are arranged.
Also drop the scene_arrange() call when applying a theme, for the same reason. Add the now-required scene_arrange() to cedit and bootmenu Signed-off-by: Simon Glass <s...@chromium.org> --- boot/cedit.c | 3 +++ boot/expo.c | 4 ---- boot/scene.c | 5 ----- cmd/bootflow.c | 3 +++ 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/boot/cedit.c b/boot/cedit.c index 56dc7c6af15..b7c2d37e3a2 100644 --- a/boot/cedit.c +++ b/boot/cedit.c @@ -98,6 +98,9 @@ int cedit_arange(struct expo *exp, struct video_priv *vpriv, uint scene_id) break; } } + ret = scene_arrange(scn); + if (ret) + return log_msg_ret("cac", ret); return 0; } diff --git a/boot/expo.c b/boot/expo.c index 3e79cbca04b..d09cc1861da 100644 --- a/boot/expo.c +++ b/boot/expo.c @@ -185,14 +185,10 @@ struct scene *expo_lookup_scene_id(struct expo *exp, uint scene_id) int expo_set_scene_id(struct expo *exp, uint scene_id) { struct scene *scn; - int ret; scn = expo_lookup_scene_id(exp, scene_id); if (!scn) return log_msg_ret("id", -ENOENT); - ret = scene_arrange(scn); - if (ret) - return log_msg_ret("arr", ret); exp->scene_id = scene_id; diff --git a/boot/scene.c b/boot/scene.c index fa8f540bfb0..2ca82236300 100644 --- a/boot/scene.c +++ b/boot/scene.c @@ -1062,7 +1062,6 @@ int scene_calc_dims(struct scene *scn, bool do_menus) int scene_apply_theme(struct scene *scn, struct expo_theme *theme) { struct scene_obj *obj; - int ret; /* Avoid error-checking optional items */ scene_txt_set_font(scn, scn->title_id, NULL, theme->font_size); @@ -1086,10 +1085,6 @@ int scene_apply_theme(struct scene *scn, struct expo_theme *theme) } } - ret = scene_arrange(scn); - if (ret) - return log_msg_ret("arr", ret); - return 0; } diff --git a/cmd/bootflow.c b/cmd/bootflow.c index 6ffb1bd33e1..9d449f430c9 100644 --- a/cmd/bootflow.c +++ b/cmd/bootflow.c @@ -118,6 +118,9 @@ __maybe_unused static int bootflow_handle_menu(struct bootstd_priv *std, ret = -ERESTART; do { if (ret == -ERESTART) { + ret = expo_arrange(exp); + if (ret) + return log_msg_ret("bha", ret); ret = expo_render(exp); if (ret) return log_msg_ret("bhr", ret); -- 2.43.0