diff options
author | Simon Glass <sjg@chromium.org> | 2023-06-01 10:22:35 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-07-14 12:54:51 -0400 |
commit | 14a86a510792cb8a69ded6ea3b6c34a150bae3ab (patch) | |
tree | f41cc38aa41eeec472e9baa7a1f8da094f7974d9 /boot/expo.c | |
parent | 42b18494bdaf677c4726ef47a839b16a1a3daba2 (diff) |
expo: Avoid automatically arranging the scene
This should ideally be done once after all scene changes have been made.
Require an explicit call when everything is ready.
Always arrange after a key it sent, just for convenience.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'boot/expo.c')
-rw-r--r-- | boot/expo.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/boot/expo.c b/boot/expo.c index cd1b1a3de5..bfdda9570c 100644 --- a/boot/expo.c +++ b/boot/expo.c @@ -116,8 +116,16 @@ struct scene *expo_lookup_scene_id(struct expo *exp, uint scene_id) int expo_set_scene_id(struct expo *exp, uint scene_id) { - if (!expo_lookup_scene_id(exp, 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; return 0; @@ -165,6 +173,11 @@ int expo_send_key(struct expo *exp, int key) ret = scene_send_key(scn, key, &exp->action); if (ret) return log_msg_ret("key", ret); + + /* arrange it to get any changes */ + ret = scene_arrange(scn); + if (ret) + return log_msg_ret("arr", ret); } return scn ? 0 : -ECHILD; |