Mesa (master): i965/bufmgr: Set bo->idle after waiting.

Kenneth Graunke kwg at kemper.freedesktop.org
Tue Aug 8 23:46:12 UTC 2017


Module: Mesa
Branch: master
Commit: a1c9a6da18b3fdb094804d1fa2529024261ed265
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a1c9a6da18b3fdb094804d1fa2529024261ed265

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Wed Aug  2 18:06:05 2017 -0700

i965/bufmgr: Set bo->idle after waiting.

After a successful wait, we know the buffer ought to be idle.

Chris points out that: "The only caveat here is that bo is global, and
we have a very unlikely (and probably unnoticeable) race condition with
multiple contexts."

Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>

---

 src/mesa/drivers/dri/i965/brw_bufmgr.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_bufmgr.c b/src/mesa/drivers/dri/i965/brw_bufmgr.c
index e1036f25a4..0a5830da53 100644
--- a/src/mesa/drivers/dri/i965/brw_bufmgr.c
+++ b/src/mesa/drivers/dri/i965/brw_bufmgr.c
@@ -1018,6 +1018,8 @@ brw_bo_wait(struct brw_bo *bo, int64_t timeout_ns)
    if (ret == -1)
       return -errno;
 
+   bo->idle = true;
+
    return ret;
 }
 




More information about the mesa-commit mailing list