Skip to content

nouveau: import libdrm_nouveau

Karol Herbst requested to merge karolherbst/mesa:nouveau/libdrm_import into main

Most of the code is copied as is, but there are a couple of changes:

  • drop pre nvif code (which means we require at least linux 4.4 now)
  • nouveau_list -> list_head
  • pthread_mutex_t -> simple_mtx_t
  • nvif_unwrap removed
  • reworked object allocation UAPI calls (I really really don't like the current code and don't even want to have it inside the git history 🙃 )
  • moved assignments out of if statements
  • nouveau_object_mthd -> nouveau_device_info

Most of the reworked object allocation code was copied from NVK. There are a couple of other smaller changes, mostly removing dead code or making code a bit more straight forward to follow. I hope there are no regressions but this still needs to be tested on at least those GPU archs:

  • nv30 (g73)
  • nv50 (gt218)
  • nvc0 (gf108)
  • nve0 (gk208)
  • gp100 (gp108)
  • tu100 (tu102)

Things to still take care of:

  • src/gallium/winsys/nouveau/drm/nouveau.c contains some UAPI bits missing from the kernel headers, those need to be added.

In a follow up merge requests I'm planning to support VM_BIND as this will be required to properly fix modifiers.

Edited by Karol Herbst

Merge request reports

Loading