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)
committerEric Engestrom <eric@engestrom.ch>
Wed, 8 Feb 2023 20:34:43 +0000 (20:34 +0000)
commit2dbe1e8ef383c9cd4792d0de2387e54f1607eec1
tree3c36a24e3d994d82b066276e4f1c33c70e0de534
parent00da41e6c930e08e2de0c683c0be6393c03db647
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>
(cherry picked from commit 175732bb51c81513ae05f9313d6df7c0631ef159)
.pick_status.json
src/gallium/drivers/etnaviv/etnaviv_resource.c