freedreno/registers: Add basic kernel header support

This doesn't yet add support for everything the mdp5/mdp4 reg builders
need, but at least gets us to the point where we can use it for GPU
registers, avoiding the need to add reg variant support to headergen2.

See: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7978
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27124>
This commit is contained in:
Rob Clark 2024-01-17 12:06:38 -08:00 committed by Marge Bot
parent ab64afc109
commit 2e733e94d8

View file

@ -782,7 +782,12 @@ The rules-ng-ng source files this header was generated from are:
print("*/")
print()
print("#ifdef __KERNEL__")
print("#include <linux/bug.h>")
print("#define assert(x) BUG_ON(!(x))")
print("#else")
print("#include <assert.h>")
print("#endif")
print()
print("#ifdef __cplusplus")