From d384f3be4c0c753c38498f9cf8f66dedafda0024 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 19 Oct 2020 12:14:26 -0700 Subject: [PATCH] turnip: Handle the error path for tu/drm's vkResetFences(). OUT_OF_MEMORY is the only valid error code from this function, but this error is more of a "things went horribly wrong, you can't talk to the GPU" case. Set the device to be in error. Part-of: --- src/freedreno/vulkan/tu_drm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/freedreno/vulkan/tu_drm.c b/src/freedreno/vulkan/tu_drm.c index d5eb12e701e..34b337f8e0a 100644 --- a/src/freedreno/vulkan/tu_drm.c +++ b/src/freedreno/vulkan/tu_drm.c @@ -866,7 +866,10 @@ tu_ResetFences(VkDevice _device, uint32_t fenceCount, const VkFence *pFences) .handles = (uint64_t) (uintptr_t) handles, .count_handles = fenceCount, }); - assert(!ret); + if (ret) { + tu_device_set_lost(device, "DRM_IOCTL_SYNCOBJ_RESET failure: %s", + strerror(errno)); + } return VK_SUCCESS; }