asahi: Fix batch writer_syncobj cleanup
When an ACTIVE batch takes over the active writer role from a SUBMITTED batch, the written BO has the syncobj from the latter even though the writer is the former. This is correct and an intended state, but it means that then we can't gate the syncobj cleanup in agx_batch_cleanup on being the active writer, since the SUBMITTED batch won't be. Fixes: asahi/mesa#18 Signed-off-by: Asahi Lina <lina@asahilina.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22891>
This commit is contained in:

committed by
Alyssa Rosenzweig

parent
3f55eff0e5
commit
1aaf4bf40a
@@ -210,10 +210,12 @@ agx_batch_cleanup(struct agx_context *ctx, struct agx_batch *batch, bool reset)
|
||||
|
||||
if (writer == batch) {
|
||||
assert(bo->writer_syncobj == batch->syncobj);
|
||||
bo->writer_syncobj = 0;
|
||||
agx_writer_remove(ctx, handle);
|
||||
}
|
||||
|
||||
if (bo->writer_syncobj == batch->syncobj)
|
||||
bo->writer_syncobj = 0;
|
||||
|
||||
agx_bo_unreference(agx_lookup_bo(dev, handle));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user