From ef621a73f720e1956ca356c1147d3b3dc680da0d Mon Sep 17 00:00:00 2001 From: Roman Stratiienko Date: Mon, 2 Sep 2019 17:46:22 +0300 Subject: [PATCH] lima: Return fence unconditionally Based on the vc4 implementation. Fixes Android RenderEngine::flush() routine: android.googlesource.com/platform/frameworks/native/+/refs/tags/android-o-mr1-iot-release-smart-clock-fcs/services/surfaceflinger/RenderEngine/RenderEngine.cpp#225 Signed-off-by: Roman Stratiienko Reviewed-by: Qiang Yu --- src/gallium/drivers/lima/lima_draw.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/lima/lima_draw.c b/src/gallium/drivers/lima/lima_draw.c index d39e198cd9b..3b8f7526f32 100644 --- a/src/gallium/drivers/lima/lima_draw.c +++ b/src/gallium/drivers/lima/lima_draw.c @@ -1693,10 +1693,8 @@ lima_pipe_flush(struct pipe_context *pctx, struct pipe_fence_handle **fence, unsigned flags) { struct lima_context *ctx = lima_context(pctx); - if (!lima_ctx_dirty(ctx)) - return; - - _lima_flush(ctx, flags & PIPE_FLUSH_END_OF_FRAME); + if (lima_ctx_dirty(ctx)) + _lima_flush(ctx, flags & PIPE_FLUSH_END_OF_FRAME); if (fence) { int fd; -- 2.30.2