nouveau: import libdrm_nouveau

Most of the code is copied as is, but there are a couple of changes:
- drop pre nvif code
- nouveau_list -> list_head
- pthread_mutex_t -> simple_mtx_t
- nvif_unwrap removed
- no assignments in if statements
- nouveau_object_mthd -> nouveau_device_info
- reworked object allocation UAPI calls

Most of the reworked code was copied from NVK or a previous version of it

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27853>
This commit is contained in:
Karol Herbst
2024-02-26 15:50:09 +01:00
committed by Marge Bot
parent a62fba6b62
commit 821f4c8d99
25 changed files with 2203 additions and 46 deletions

View File

@@ -1633,12 +1633,10 @@ endif
# bar are both on use 2.4.3 for both of them
dep_libdrm_amdgpu = null_dep
dep_libdrm_radeon = null_dep
dep_libdrm_nouveau = null_dep
dep_libdrm_intel = null_dep
_drm_amdgpu_ver = '2.4.119'
_drm_radeon_ver = '2.4.71'
_drm_nouveau_ver = '2.4.102'
_drm_intel_ver = '2.4.75'
_drm_ver = '2.4.109'
@@ -1646,7 +1644,6 @@ _libdrm_checks = [
['intel', with_gallium_i915],
['amdgpu', (with_amd_vk and not with_platform_windows) or with_gallium_radeonsi],
['radeon', (with_gallium_radeonsi or with_gallium_r300 or with_gallium_r600)],
['nouveau', with_any_nouveau],
]
# Loop over the enables versions and get the highest libdrm requirement for all