lima: Implement lima_resource_get_param() callback
authorRoman Stratiienko <r.stratiienko@gmail.com>
Fri, 13 Aug 2021 17:04:51 +0000 (20:04 +0300)
committerMarge Bot <eric+marge@anholt.net>
Tue, 17 Aug 2021 10:50:51 +0000 (10:50 +0000)
commit5ec6b6e9bbf607935cf864e63c9b555621fca590
treeb05b7a21f7ae4581cb2977ab6b9fbc312254ca34
parent221871fb6da0a16bf47847040257bdb677042306
lima: Implement lima_resource_get_param() callback

Currently stride, offset, modifier is obtained by invoking
lima_resource_get_handle() with WINSYS_HANDLE_TYPE_KMS.

Before commit 47f000c170cc this path was working. Obtained handle
was simply ignored by DRI frontend and only requested data used.

After commit 47f000c170cc such requests started to fail when
DRI is initialized using KMSRO and resource has no scanout data.

When lima_resource_get_param() is implemented, it will be used in
a first place to obtain resource data.

Fixes: 47f000c170cc ("lima: fail in get_handle(TYPE_KMS) without a scanout resource")
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12362>
src/gallium/drivers/lima/lima_resource.c