mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2024-12-02 22:54:05 +08:00
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@emersion.fr>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12074>
(cherry picked from commit 47f000c170
)
This commit is contained in:
parent
7dd32352dd
commit
a7158240c3
@ -1426,7 +1426,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
|
||||
},
|
||||
|
@ -412,9 +412,8 @@ lima_resource_get_handle(struct pipe_screen *pscreen,
|
||||
else
|
||||
handle->modifier = DRM_FORMAT_MOD_LINEAR;
|
||||
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user