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