pvr: Squeeze fd handling into winsys layer
authorMatt Coster <matt.coster@imgtec.com>
Thu, 27 Apr 2023 14:49:08 +0000 (15:49 +0100)
committerMarge Bot <emma+marge@anholt.net>
Thu, 18 May 2023 15:56:59 +0000 (15:56 +0000)
commit9edac8657250349e62c8a592368b8c307000d137
tree061b1befc04f219006eaec8a9037f8c8f21035f1
parent7cb945b777074281c10a0639e0565bb7f2bf19c8
pvr: Squeeze fd handling into winsys layer

This sets us up to make use of the common physical device initialization
code.

As well as lifting the fd handles out of the implementations, this
pushes creation and destruction of the fds into the winsys layer. In
order for this to make sense, the winsys object is now created *before*
each pvr_device or pvr_physical_device. If there's an error setting up
the winsys instance, there's no point in continuing to create either
one.

Also lifts alloc to the winsys layer since there's nothing special about
it in either implementation.

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23023>
17 files changed:
src/imagination/vulkan/pvr_device.c
src/imagination/vulkan/pvr_private.h
src/imagination/vulkan/pvr_wsi.c
src/imagination/vulkan/winsys/powervr/pvr_drm.c
src/imagination/vulkan/winsys/powervr/pvr_drm_public.h
src/imagination/vulkan/winsys/pvr_winsys.c
src/imagination/vulkan/winsys/pvr_winsys.h
src/imagination/vulkan/winsys/pvr_winsys_helper.c
src/imagination/vulkan/winsys/pvr_winsys_helper.h
src/imagination/vulkan/winsys/pvrsrvkm/pvr_srv.c
src/imagination/vulkan/winsys/pvrsrvkm/pvr_srv.h
src/imagination/vulkan/winsys/pvrsrvkm/pvr_srv_bo.c
src/imagination/vulkan/winsys/pvrsrvkm/pvr_srv_job_compute.c
src/imagination/vulkan/winsys/pvrsrvkm/pvr_srv_job_render.c
src/imagination/vulkan/winsys/pvrsrvkm/pvr_srv_job_transfer.c
src/imagination/vulkan/winsys/pvrsrvkm/pvr_srv_public.h
src/imagination/vulkan/winsys/pvrsrvkm/pvr_srv_sync_prim.c