Mesa (master): i965: Do not log a perf warning when mapping an idle bo
Chris Wilson
ickle at kemper.freedesktop.org
Thu Oct 19 06:17:53 UTC 2017
Module: Mesa
Branch: master
Commit: b7c655f700d5e12d3cd81b1cb66fce17019f934d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b7c655f700d5e12d3cd81b1cb66fce17019f934d
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Oct 18 09:49:31 2017 +0100
i965: Do not log a perf warning when mapping an idle bo
We only want to scare the user away from causing a GPU stall for mapping
a busy bo. The time taken to instantiate the set of pages for a buffer
and their mmapping is unavoidable and flagging idle bo as being busy is
"crying wolf".
Reported-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
---
src/mesa/drivers/dri/i965/brw_bufmgr.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_bufmgr.c b/src/mesa/drivers/dri/i965/brw_bufmgr.c
index 82bf30727e..7c5a9651eb 100644
--- a/src/mesa/drivers/dri/i965/brw_bufmgr.c
+++ b/src/mesa/drivers/dri/i965/brw_bufmgr.c
@@ -669,11 +669,12 @@ bo_wait_with_stall_warning(struct brw_context *brw,
struct brw_bo *bo,
const char *action)
{
- double elapsed = unlikely(brw && brw->perf_debug) ? -get_time() : 0.0;
+ bool busy = brw && brw->perf_debug && !bo->idle;
+ double elapsed = unlikely(busy) ? -get_time() : 0.0;
brw_bo_wait_rendering(bo);
- if (unlikely(brw && brw->perf_debug)) {
+ if (unlikely(busy)) {
elapsed += get_time();
if (elapsed > 1e-5) /* 0.01ms */
perf_debug("%s a busy \"%s\" BO stalled and took %.03f ms.\n",
More information about the mesa-commit
mailing list