From 5d2c9fd161eb1c6b29852e22431fa8bc804bf5af Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Tue, 16 Mar 2021 15:45:38 -0700 Subject: [PATCH] freedreno/drm: Avoid unitialized timestamp in submit fail Saw a flood of "waiting on invalid fence" with a completely bogus looking fence # in a log of a rather strange low-memory crash. Not sure if it is coming from memory corruption in userspace, but if a submit ioctl is failing due to failed allocation (or other reason) we would get left with random stack garbage as the fence #. Let's not have that as a potential problem. Signed-off-by: Rob Clark Part-of: --- src/gallium/drivers/freedreno/freedreno_gmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/freedreno/freedreno_gmem.c b/src/gallium/drivers/freedreno/freedreno_gmem.c index 12bce5743e8..bd066605461 100644 --- a/src/gallium/drivers/freedreno/freedreno_gmem.c +++ b/src/gallium/drivers/freedreno/freedreno_gmem.c @@ -653,7 +653,7 @@ render_sysmem(struct fd_batch *batch) static void flush_ring(struct fd_batch *batch) { - uint32_t timestamp; + uint32_t timestamp = 0; int out_fence_fd = -1; if (FD_DBG(NOHW))