freedreno: Fix use_fence_fd typo
authorRob Clark <robdclark@chromium.org>
Sun, 25 Dec 2022 17:22:21 +0000 (09:22 -0800)
committerRob Clark <robdclark@chromium.org>
Fri, 30 Dec 2022 18:41:55 +0000 (10:41 -0800)
This was causing excessive flushes, because requesting an out-fence fd
triggers the drm layer to flush deferred submits instead of continued
merging.

Fixes: 48b5164356c ("freedreno/drm: Return fence from submit flush")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20465>

src/gallium/drivers/freedreno/freedreno_gmem.c

index 774ac78..22e9ebc 100644 (file)
@@ -673,7 +673,7 @@ flush_ring(struct fd_batch *batch)
 
    bool use_fence_fd = false;
    if (batch->fence)
-      use_fence_fd = batch->fence;
+      use_fence_fd = batch->fence->use_fence_fd;
 
    struct fd_fence *fence =
          fd_submit_flush(batch->submit, batch->in_fence_fd, use_fence_fd);