etnaviv: fail in get_handle(TYPE_KMS) without a scanout resource
authorSimon Ser <contact@emersion.fr>
Tue, 27 Jul 2021 06:55:02 +0000 (08:55 +0200)
committerSimon Ser <contact@emersion.fr>
Thu, 29 Jul 2021 19:01:10 +0000 (21:01 +0200)
commit9da901d2b2e7ab5d5f21a0004fc294810f69f04a
tree11147389afa2aebed37ebcbc1e8c2875013fd557
parent3b3cd5128672ab2dd2541b1789a40a4dd2652cc1
etnaviv: 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: Christian Gmeiner <christian.gmeiner@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12074>
src/gallium/drivers/etnaviv/etnaviv_resource.c