Mesa (staging/21.2): lima: fail in get_handle(TYPE_KMS) without a scanout resource
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Jul 30 17:14:46 UTC 2021
Module: Mesa
Branch: staging/21.2
Commit: 39ffd918cd260c646b1eb665113ea92630390e06
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=39ffd918cd260c646b1eb665113ea92630390e06
Author: Simon Ser <contact at emersion.fr>
Date: Tue Jul 27 09:04:14 2021 +0200
lima: fail in get_handle(TYPE_KMS) without a scanout resource
The previous logic was returning a handle valid for the render-only
device if rsc->scanout was NULL. However the caller doesn't expect
this: the caller will use the handle with the KMS device.
Instead of returning a handle for the wrong device, fail if we don't
have one.
Signed-off-by: Simon Ser <contact at emersion.fr>
Reviewed-by: Vasily Khoruzhick <anarsoul at gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12074>
(cherry picked from commit 47f000c170ccb824b308e02db8c2c955a8c00217)
---
.pick_status.json | 2 +-
src/gallium/drivers/lima/lima_resource.c | 5 ++---
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index 421259755dd..b0ff252710c 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -247,7 +247,7 @@
"description": "lima: fail in get_handle(TYPE_KMS) without a scanout resource",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": null
},
diff --git a/src/gallium/drivers/lima/lima_resource.c b/src/gallium/drivers/lima/lima_resource.c
index a783595411a..7b94dd48320 100644
--- a/src/gallium/drivers/lima/lima_resource.c
+++ b/src/gallium/drivers/lima/lima_resource.c
@@ -416,9 +416,8 @@ lima_resource_get_handle(struct pipe_screen *pscreen,
res->modifier_constant = true;
- if (handle->type == WINSYS_HANDLE_TYPE_KMS && screen->ro &&
- renderonly_get_handle(res->scanout, handle))
- return true;
+ if (handle->type == WINSYS_HANDLE_TYPE_KMS && screen->ro)
+ return renderonly_get_handle(res->scanout, handle);
if (!lima_bo_export(res->bo, handle))
return false;
More information about the mesa-commit
mailing list