From 2afd95b8e614a38337291e185c32bcdb7ac2a0ce Mon Sep 17 00:00:00 2001 From: Lucas Stach Date: Wed, 28 Oct 2020 19:53:43 +0100 Subject: [PATCH] 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 Reviewed-by: Simon Ser Reviewed-by: Christian Gmeiner Part-of: (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;