From 1607123ae7504ead15129b2a90506811d9e26b6d Mon Sep 17 00:00:00 2001 From: Marco Felsch Date: Thu, 5 Dec 2019 17:04:11 +0100 Subject: etnaviv: Fix assert when try to accumulate an invalid fd Check if it is a valid fd before merging it to the context's fd. Signed-off-by: Marco Felsch Signed-off-by: Lucas Stach Reviewed-by: Jonathan Marek Tested-by: Marge Bot Part-of: --- src/gallium/drivers/etnaviv/etnaviv_fence.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/gallium/drivers/etnaviv/etnaviv_fence.c b/src/gallium/drivers/etnaviv/etnaviv_fence.c index c0684bccf29..b2400b6aca3 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_fence.c +++ b/src/gallium/drivers/etnaviv/etnaviv_fence.c @@ -88,7 +88,8 @@ etna_fence_server_sync(struct pipe_context *pctx, { struct etna_context *ctx = etna_context(pctx); - sync_accumulate("etnaviv", &ctx->in_fence_fd, pfence->fence_fd); + if (pfence->fence_fd != -1) + sync_accumulate("etnaviv", &ctx->in_fence_fd, pfence->fence_fd); } static int -- cgit v1.2.3