ddebug: fix the hang detection timeout calculation
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Fri, 10 Nov 2017 16:13:27 +0000 (17:13 +0100)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Mon, 20 Nov 2017 17:16:03 +0000 (18:16 +0100)
Fixes: c9fefa062b36 ("ddebug: rewrite to always use a threaded approach")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/ddebug/dd_draw.c

index e908410a33ddc34525479c247ec3be6d61a90497..c404ea0607f88031d11a4e3ed7079bb99fe4716a 100644 (file)
@@ -1034,10 +1034,10 @@ dd_thread_main(void *input)
       /* 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);