Module: Mesa Branch: staging/23.2 Commit: 3a257694f6adfba5aa85dea5d6e51bd70f9da28f URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3a257694f6adfba5aa85dea5d6e51bd70f9da28f
Author: Paulo Zanoni <[email protected]> Date: Thu Sep 7 17:48:05 2023 -0700 iris: assert bufmgr->bo_deps_lock is held This is the only place that touches bo->deps but does not explicitly lock it and is not a setup/teardown function where locking won't help anything. I'm confident we won't hit this assertion, but I've recently had this lock as the suspect of a bug and had to check the callers to see if we could be calling from any unlocked place. Having the assert helps increasing our confidence. Reviewed-by: José Roberto de Souza <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Paulo Zanoni <[email protected]> (cherry picked from commit 762b9aad01c9bdc78e10f7bf53d750942322b289) Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25404> --- src/gallium/drivers/iris/iris_batch.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/drivers/iris/iris_batch.c b/src/gallium/drivers/iris/iris_batch.c index d9ddedd7183..e2b4ec5e2aa 100644 --- a/src/gallium/drivers/iris/iris_batch.c +++ b/src/gallium/drivers/iris/iris_batch.c @@ -744,6 +744,8 @@ update_bo_syncobjs(struct iris_batch *batch, struct iris_bo *bo, bool write) struct iris_bufmgr *bufmgr = screen->bufmgr; struct iris_context *ice = batch->ice; + simple_mtx_assert_locked(iris_bufmgr_get_bo_deps_lock(bufmgr)); + /* Make sure bo->deps is big enough */ if (screen->id >= bo->deps_size) { int new_size = screen->id + 1;
