etnaviv: fix double scanout import of multiplanar resources
authorLucas Stach <l.stach@pengutronix.de>
Mon, 30 Jan 2023 17:58:30 +0000 (18:58 +0100)
committerMarge Bot <emma+marge@anholt.net>
Thu, 2 Feb 2023 19:08:29 +0000 (19:08 +0000)
commit175732bb51c81513ae05f9313d6df7c0631ef159
tree52d06a24c848cb0fbc40a7d361623d1e4b9b0087
parent8839baee57b051f836557b11441c0772ba27c165
etnaviv: fix double scanout import of multiplanar resources

etna_resource_from_handle() is called for each plane of a multiplanar
resource, so there is no point in looping over all planes to do the
renderonly scanout import. In fact that will cause us to lose track
of the scanout imports from later planes when the earlier planes are
redoing the import, overwriting the pointer to the allocated
renderonly_scanout struct.

Drop the loop and just do the import for the current plane.

Fixes: 826f95778a4e ("etnaviv: always try to create KMS side handles for imported resources")
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20993>
src/gallium/drivers/etnaviv/etnaviv_resource.c