aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarco Felsch <[email protected]>2019-12-05 17:04:11 +0100
committerMarge Bot <[email protected]>2020-01-14 17:40:10 +0000
commit1607123ae7504ead15129b2a90506811d9e26b6d (patch)
treea2069d4f4532be742ec30bed155acfac93fa9017 /src
parent22217f24ec927e90d6bac1921cc288797ab54d03 (diff)
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 <[email protected]> Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Jonathan Marek <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3381> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3381>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_fence.c3
1 files changed, 2 insertions, 1 deletions
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