etnaviv: add stride, offset and modifier to resource_get_param
authorSimon Ser <contact@emersion.fr>
Sat, 14 Aug 2021 11:57:15 +0000 (13:57 +0200)
committerMarge Bot <eric+marge@anholt.net>
Thu, 19 Aug 2021 13:12:51 +0000 (13:12 +0000)
commitb5919b0b106dbdf5f5da6733e83cc532bdf257d8
tree41172310e5a0edb7e1f461fbcfd586129e26b0f3
parent63529782d33b4c23282cebd7aef57bd70ff4e3fc
etnaviv: add stride, offset and modifier to resource_get_param

Prior to this commit, the stride, offset and modifier were fetched
via WINSYS_HANDLE_TYPE_KMS. However we can't make such a query
succeed if the buffer couldn't be imported to the KMS device.

Instead, extend the resource_get_param hook to allow users to fetch
this information without WINSYS_HANDLE_TYPE_KMS.

Signed-off-by: Simon Ser <contact@emersion.fr>
Fixes: 9da901d2b2e7 ("etnaviv: fail in get_handle(TYPE_KMS) without a scanout resource")
Reported-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12370>
src/gallium/drivers/etnaviv/etnaviv_resource.c