Mesa (main): renderonly: don't complain when GPU import fails

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Aug 9 22:18:30 UTC 2021


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

Author: Lucas Stach <l.stach at pengutronix.de>
Date:   Wed Oct 28 19:53:43 2020 +0100

renderonly: don't complain when GPU import fails

There are a number of drivers which do a trial-and-error import
of buffers into the KMS side via renderonly. Some of those imports
are expected to fail, so we should not print a error message in
this case. All callers do proper error handling themselves.

Cc: mesa-stable
Signed-off-by: Lucas Stach <l.stach at pengutronix.de>
Reviewed-by: Simon Ser <contact at emersion.fr>
Reviewed-by: Christian Gmeiner <christian.gmeiner at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12018>

---

 src/gallium/auxiliary/renderonly/renderonly.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/gallium/auxiliary/renderonly/renderonly.c b/src/gallium/auxiliary/renderonly/renderonly.c
index 00c8a7eeb45..56dc06bca17 100644
--- a/src/gallium/auxiliary/renderonly/renderonly.c
+++ b/src/gallium/auxiliary/renderonly/renderonly.c
@@ -134,10 +134,8 @@ renderonly_create_gpu_import_for_resource(struct pipe_resource *rsc,
    err = drmPrimeFDToHandle(ro->kms_fd, fd, &scanout->handle);
    close(fd);
 
-   if (err < 0) {
-      fprintf(stderr, "drmPrimeFDToHandle() failed: %s\n", strerror(errno));
+   if (err < 0)
       goto free_scanout;
-   }
 
    return scanout;
 



More information about the mesa-commit mailing list