Mesa (staging/21.1): renderonly: don't complain when GPU import fails
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Aug 10 21:42:10 UTC 2021
Module: Mesa
Branch: staging/21.1
Commit: 2afd95b8e614a38337291e185c32bcdb7ac2a0ce
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2afd95b8e614a38337291e185c32bcdb7ac2a0ce
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 97f21587dfa..8a07e42ae74 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -364,7 +364,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