From 68bfb6ca49f27120ad604c159e0d21cf148b9050 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Mon, 29 Mar 2021 11:48:21 +0200 Subject: [PATCH] etnaviv/drm: only print out fence error on non timeout While looking at the traces emitted by chromium, I saw a lot of those errors. But looking at the value of ns, it is 0, so it's probably just the application checking whether work is done or not. Not much point in printing out an error. v2: check ret value (Christian) check both timeout codes (Lionel) Signed-off-by: Lionel Landwerlin Reviewed-by: Christian Gmeiner Part-of: --- src/etnaviv/drm/etnaviv_pipe.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/etnaviv/drm/etnaviv_pipe.c b/src/etnaviv/drm/etnaviv_pipe.c index 3656f2e14a0..049b6aad8d7 100644 --- a/src/etnaviv/drm/etnaviv_pipe.c +++ b/src/etnaviv/drm/etnaviv_pipe.c @@ -42,12 +42,10 @@ int etna_pipe_wait_ns(struct etna_pipe *pipe, uint32_t timestamp, uint64_t ns) get_abs_timeout(&req.timeout, ns); ret = drmCommandWrite(dev->fd, DRM_ETNAVIV_WAIT_FENCE, &req, sizeof(req)); - if (ret) { + if (ret && (ret != -EBUSY) && (ret != -ETIMEDOUT)) ERROR_MSG("wait-fence failed! %d (%s)", ret, strerror(errno)); - return ret; - } - return 0; + return ret; } void etna_pipe_del(struct etna_pipe *pipe)