Mesa (main): freedreno: Fix the cpu-prep wait to be "infinite".

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Apr 8 00:45:53 UTC 2022


Module: Mesa
Branch: main
Commit: d51aea7f57e9de487c1cf4b666bcc17b96f3d1b4
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d51aea7f57e9de487c1cf4b666bcc17b96f3d1b4

Author: Emma Anholt <emma at anholt.net>
Date:   Thu Apr  7 12:55:37 2022 -0700

freedreno: Fix the cpu-prep wait to be "infinite".

We don't need to restrict our timeout to 5 seconds, because the kernel's
hangcheck will ensure that the wait completes in finite time if the GPU
gets wedged.  If the GPU is making progress, we don't want to time out
early and have pipe_transfer_map() return an error, causing glReadPixels()
to throw a confusing GL_OOM even though we're not out memory.

The INFINITE arg to this function isn't actually infinite, it's limited to
an hour.  But an hour of GPU processing to wait on is probably plenty.

This 5s timeout has caused problems with the CTS on freedreno at high
parallelism, and I suspect is the cause of recent issues in the closed
traces replay jobs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15805>

---

 src/freedreno/drm/msm/msm_bo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/freedreno/drm/msm/msm_bo.c b/src/freedreno/drm/msm/msm_bo.c
index 67de321f889..171d2da3929 100644
--- a/src/freedreno/drm/msm/msm_bo.c
+++ b/src/freedreno/drm/msm/msm_bo.c
@@ -73,7 +73,7 @@ msm_bo_cpu_prep(struct fd_bo *bo, struct fd_pipe *pipe, uint32_t op)
       .op = op,
    };
 
-   get_abs_timeout(&req.timeout, 5000000000);
+   get_abs_timeout(&req.timeout, PIPE_TIMEOUT_INFINITE);
 
    return drmCommandWrite(bo->dev->fd, DRM_MSM_GEM_CPU_PREP, &req, sizeof(req));
 }



More information about the mesa-commit mailing list