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 <m.felsch@pengutronix.de>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Jonathan Marek <jonathan@marek.ca>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3381>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3381>
This commit is contained in:
Marco Felsch 2019-12-05 17:04:11 +01:00 committed by Marge Bot
parent 22217f24ec
commit 1607123ae7
1 changed files with 2 additions and 1 deletions

View File

@ -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