panfrost: Simplify panfrost_resource_get_handle
authorAlyssa Rosenzweig <alyssa@collabora.com>
Tue, 22 Feb 2022 16:30:05 +0000 (11:30 -0500)
committerMarge Bot <emma+marge@anholt.net>
Wed, 23 Feb 2022 18:31:55 +0000 (18:31 +0000)
commit51689a2b80b4daf5e78532304df311be8e627715
tree8df1c29fe3621e1900bcdeb5f3d2934226cedc05
parentb5734cc1c4666b4f21446649d2aba85c0c19350e
panfrost: Simplify panfrost_resource_get_handle

Unify the exit paths to clean up the logic. There are logically three modes we
support (KMS without renderonly, KMS with renderonly, and FD); these each
correspond to a leg of a small if statement. Outside of the small if's,
everything else should be identical.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Simon Ser <contact@emersion.fr>
Reviewed-by: James Jones <jajones@nvidia.com>
Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15120>
src/gallium/drivers/panfrost/pan_resource.c