Mesa (staging/21.2): renderonly: don't complain when GPU import fails

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Aug 10 17:38:28 UTC 2021


Module: Mesa
Branch: staging/21.2
Commit: c8812a86b2953c64ad1db569bd1898cca0e7fa92
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c8812a86b2953c64ad1db569bd1898cca0e7fa92

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>
(cherry picked from commit 1bc22a2eabe9e9d7fd013f188e3e532fb797ea89)

---

 .pick_status.json                             | 2 +-
 src/gallium/auxiliary/renderonly/renderonly.c | 4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index cb7e9fb95ba..6a1c13229a3 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -283,7 +283,7 @@
         "description": "renderonly: don't complain when GPU import fails",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": null
     },
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