diff options
author | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2016-06-20 16:47:06 +0200 |
---|---|---|
committer | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2016-06-24 12:36:03 +0200 |
commit | 80dd7870fe87969e97045ea71b1f6e8180ac9606 (patch) | |
tree | 3c1c3d48fa849b4add1422dd7066267531c465d0 /src/gallium/drivers/radeonsi/si_hw_context.c | |
parent | ad8438403b32088260ec845fc2e7304586328913 (diff) |
radeonsi: move gfx fence wait out of si_check_vm_faults
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_hw_context.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_hw_context.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeonsi/si_hw_context.c b/src/gallium/drivers/radeonsi/si_hw_context.c index 696217d0bb5..656d435361c 100644 --- a/src/gallium/drivers/radeonsi/si_hw_context.c +++ b/src/gallium/drivers/radeonsi/si_hw_context.c @@ -144,8 +144,14 @@ void si_context_gfx_flush(void *context, unsigned flags, ws->fence_reference(fence, ctx->last_gfx_fence); /* Check VM faults if needed. */ - if (ctx->screen->b.debug_flags & DBG_CHECK_VM) + if (ctx->screen->b.debug_flags & DBG_CHECK_VM) { + /* Use conservative timeout 800ms, after which we won't wait any + * longer and assume the GPU is hung. + */ + ctx->b.ws->fence_wait(ctx->b.ws, ctx->last_gfx_fence, 800*1000*1000); + si_check_vm_faults(ctx); + } si_begin_new_cs(ctx); ctx->gfx_flush_in_progress = false; |