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@pengutronix.de>
Reviewed-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12018>
(cherry picked from commit 1bc22a2eab)
This commit is contained in:
Lucas Stach 2020-10-28 19:53:43 +01:00 committed by Dylan Baker
parent 936b18f89e
commit c8812a86b2
2 changed files with 2 additions and 4 deletions

View file

@ -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
},

View file

@ -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;