From fbca3d64add37da9711200350dad51cb68ae22c4 Mon Sep 17 00:00:00 2001 From: Matt Coster Date: Tue, 3 Oct 2023 14:23:06 +0100 Subject: [PATCH] pvr: Fix reordering of sub-cmds when performing ds subtile alignment The use of list_move_to() meant that the first transfer sub-command wasn't being correctly placed before the target graphics sub-command. Fixes: d1b17a5edcd ("pvr: Implement ZLS subtile alignment") Signed-off-by: Matt Coster Acked-by: Alyssa Rosenzweig Part-of: --- src/imagination/vulkan/pvr_cmd_buffer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/imagination/vulkan/pvr_cmd_buffer.c b/src/imagination/vulkan/pvr_cmd_buffer.c index daa36e95f4d..c9acf4dc5c6 100644 --- a/src/imagination/vulkan/pvr_cmd_buffer.c +++ b/src/imagination/vulkan/pvr_cmd_buffer.c @@ -1251,8 +1251,11 @@ pvr_sub_cmd_gfx_align_ds_subtiles(struct pvr_cmd_buffer *const cmd_buffer, /* Now we have to fiddle with cmd_buffer to place this transfer command * *before* the target gfx subcommand. + * + * Note the doc for list_move_to() is subtly wrong - item is placed + * directly *after* loc in the list, not "in front of". */ - list_move_to(&new_sub_cmd->link, &prev_sub_cmd->link); + list_move_to(&new_sub_cmd->link, prev_sub_cmd->link.prev); cmd_buffer->state.current_sub_cmd = prev_sub_cmd; }