[Mesa-dev] [PATCH 5/8] ddebug: fix the hang detection timeout calculation

Nicolai Hähnle nhaehnle at gmail.com
Mon Nov 13 14:03:33 UTC 2017


From: Nicolai Hähnle <nicolai.haehnle at amd.com>

Fixes: c9fefa062b36 ("ddebug: rewrite to always use a threaded approach")
---
 src/gallium/drivers/ddebug/dd_draw.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/ddebug/dd_draw.c b/src/gallium/drivers/ddebug/dd_draw.c
index e908410a33d..c404ea0607f 100644
--- a/src/gallium/drivers/ddebug/dd_draw.c
+++ b/src/gallium/drivers/ddebug/dd_draw.c
@@ -1027,24 +1027,24 @@ dd_thread_main(void *input)
          break;
       } else {
          cnd_wait(&dctx->cond, &dctx->mutex);
          continue;
       }
       mtx_unlock(&dctx->mutex);
 
       /* Fences can be NULL legitimately when timeout detection is disabled. */
       if ((fence &&
            !screen->fence_finish(screen, NULL, fence,
-                                 dscreen->timeout_ms * 1000*1000)) ||
+                                 (uint64_t)dscreen->timeout_ms * 1000*1000)) ||
           (fence2 &&
            !screen->fence_finish(screen, NULL, fence2,
-                                 dscreen->timeout_ms * 1000*1000))) {
+                                 (uint64_t)dscreen->timeout_ms * 1000*1000))) {
          mtx_lock(&dctx->mutex);
          list_splice(&records, &dctx->records);
          dd_report_hang(dctx);
          /* we won't actually get here */
          mtx_unlock(&dctx->mutex);
       }
 
       list_for_each_entry_safe(struct dd_draw_record, record, &records, list) {
          dd_maybe_dump_record(dscreen, record);
          list_del(&record->list);
-- 
2.11.0



More information about the mesa-dev mailing list