Skip to content

Draft: drm: add asahi native context implementation

Sergio Lopez requested to merge slp/virglrenderer:asahi-native-context into main

This is a WIP implementation of the equivalent of msm native context for the asahi driver.

First, we refactor some drm/msm code so it can also be used by other native context implementations, and then we add the implementation for the asahi driver.

The implementation of the counterpart in Mesa is on this branch: https://gitlab.freedesktop.org/slp/mesa/-/commits/asahi-native-context

v2:

  • Rebase on latest upstream.
  • Drop msm refactoring. Now that there already multiple implementations, it's not clear to me that the cost of maintaining potentially divergent shared code compensate its benefits.
  • Adopt the same syncobj management as other implementations (thanks Rob and Dmitry).
  • Support an arbitrary number of commands in submit().
  • Fix result_buffer handling.

v3:

  • Rebase on !1374
  • Honor GEM_VM_PRIVATE semantics and allow mapping GEM objects without exporting PRIME fds (thanks @asahilina)
  • Apply various security improvements (thanks @DemiMarie)

TODO:

  • Wait for the asahi kernel uAPI to get merged.

@robclark @digetx

Edited by Sergio Lopez

Merge request reports

Loading