meson: auto-enable etnaviv on arm, arc, mips and loongarch architectures
authorSui Jingfeng <15330273260@189.cn>
Mon, 17 Jan 2022 09:36:50 +0000 (17:36 +0800)
committerEric Engestrom <eric@engestrom.ch>
Tue, 30 Aug 2022 15:03:36 +0000 (16:03 +0100)
There is a Vivante GC1000 gpu in LS2K1000 and LS7A1000.

LS7A1000 is a bridge chip made by Loongson corporation
which act as north and/or south bridge of loongson's
desktop and server level processor. It is equivalent
to RS780E or something like that. In fact, the company
use RS780E as bridge of LS3A3000 at its early stage,
but as RS780E is out of stock long long time ago, the
company have to made one by themself. More details can
be read from its user manual[1].

This bridge chip typically use with LS3A3000, LS3A4000
and LS3A5000.

LS3A3000 is 4 core 1.45gHz mips64r2 compatible cpu.
LS3A4000 is 4 core 1.8gHz mips64r5 compatible cpu.
LS3A5000 is 4 core 2.5gHz loongarch cpu, the company
acclaim that loongarch a new archtecture with its
instruction set is released[2].

LS2K1000 is a double core 1.0Ghz mips64r2 compatible SoC[3].

we need to enable it to test and developing driver on above
listed archtecture.

[1] https://loongson.github.io/LoongArch-Documentation/Loongson-7A1000-usermanual-EN.html
[2] https://loongson.github.io/LoongArch-Documentation/Loongson-3A5000-usermanual-EN.html
[3] https://wiki.debian.org/InstallingDebianOn/Lemote/Loongson2K1000

Signed-off-by: Sui Jingfeng <15330273260@189.cn>
[Eric: rebase over meson changes, add ARM & ARC architectures, and drop
"experimental" from the description]
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
.gitlab-ci.yml
meson.build
meson_options.txt

index 2702723..4a3ed21 100644 (file)
@@ -213,7 +213,7 @@ x86_64-freebsd-container_prep:
     # the workspace to see details about the failed tests.
     - |
       set +e
-      /app/vmctl exec "pkg info; cd $CI_PROJECT_NAME ; meson build --auto-features=enabled -D nouveau=disabled -D valgrind=disabled && ninja -C build"
+      /app/vmctl exec "pkg info; cd $CI_PROJECT_NAME ; meson build --auto-features=enabled -D etnaviv=disabled -D nouveau=disabled -D valgrind=disabled && ninja -C build"
       set -ex
       scp -r vm:$CI_PROJECT_NAME/build/meson-logs .
       /app/vmctl exec "ninja -C $CI_PROJECT_NAME/build install"
index 2b142c6..4249b62 100644 (file)
@@ -165,11 +165,16 @@ summary('Tegra', with_tegra)
 
 with_etnaviv = false
 _etnaviv = get_option('etnaviv')
-if _etnaviv.enabled()
-  if not with_atomics
+if not _etnaviv.disabled()
+  if _etnaviv.enabled() and not with_atomics
     error('libdrm_etnaviv requires atomics.')
   endif
-  with_etnaviv = true
+  with_etnaviv = _etnaviv.enabled() or (
+    with_atomics and [
+      'loongarch64', 'mips', 'mips64',
+      'arm', 'aarch64', 'arc',
+    ].contains(host_machine.cpu_family())
+  )
 endif
 summary('Etnaviv', with_etnaviv)
 
index caddeff..e80d79e 100644 (file)
@@ -74,8 +74,7 @@ option(
 option(
   'etnaviv',
   type : 'feature',
-  value : 'disabled',
-  description : '''Enable support for etnaviv's experimental KMS API.''',
+  description : '''Enable support for etnaviv's KMS API.''',
 )
 option(
   'cairo-tests',