amd/vpelib: Fix backend bug for multiple instances
Fix potential duplicated config if config_writer_complete is called multiple times Reviewed-by: Roy Chan <Roy.Chan@amd.com> Reviewed-by: Evan Damphousse <evan.damphousse@amd.com> Acked-by: Chih-Wei Chien <Chih-Wei.Chien@amd.com> Signed-off-by: Brendan Leder <BrendanSteve.Leder@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31693>
This commit is contained in:

committed by
Marge Bot

parent
b010a2eaf6
commit
257658cbca
@@ -103,7 +103,7 @@ void config_writer_set_type(struct config_writer *writer, enum config_type type,
|
||||
if (writer->status != VPE_STATUS_OK)
|
||||
return;
|
||||
|
||||
if (writer->type != type) {
|
||||
if ((writer->type != type) || (writer->pipe_idx != pipe_idx)) {
|
||||
if (writer->type == CONFIG_TYPE_UNKNOWN) {
|
||||
// new header or only pipe change. don't need to fill it yet until completion
|
||||
writer->pipe_idx = pipe_idx;
|
||||
@@ -281,6 +281,9 @@ void config_writer_complete(struct config_writer *writer)
|
||||
if (size <= sizeof(uint32_t)) {
|
||||
config_writer_reset(writer);
|
||||
return;
|
||||
} else if (writer->completed == true) {
|
||||
// completed has already been called for this packet
|
||||
return;
|
||||
}
|
||||
|
||||
if (writer->status != VPE_STATUS_OK)
|
||||
|
Reference in New Issue
Block a user